diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 17e43ec..4112c2c 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -104,21 +104,26 @@ MainWindow::MainWindow(QWidget* parent, KActionCollection* coll) : m_ActionCollection(coll) { setupUi(this); + QTimer::singleShot(0, this, SLOT(init())); +} - FileSystemFactory::init(); +void MainWindow::init() +{ connect(GlobalLog::instance(), SIGNAL(newMessage(log::Level, const QString&)), SLOT(onNewLogMessage(log::Level, const QString&))); setupActions(); - setupStatusBar(); + setupStatusBar(); setupConnections(); // If we were called with an action collection we're supposed to be a KPart, so don't // create the GUI in that case. - if (coll != NULL) + if (m_ActionCollection != NULL) setupGUI(ToolBar | Keys | StatusBar | Save); else setupGUI(ToolBar | Keys | StatusBar | Save | Create); + FileSystemFactory::init(); + loadConfig(); dockInformation().setWidget(&infoPane()); diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 465724b..49ea890 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -160,6 +160,7 @@ class LIBPARTITIONMANAGERPRIVATE_EXPORT MainWindow : public KXmlGuiWindow, publi void onNewLogMessage(log::Level logLevel, const QString& s); void onFinished(); void scanDevices(); + void init(); private: LibParted m_LibParted;