diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 77b3a1dc3..7e03778c7 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -342,11 +342,18 @@ MainApplication::MainApplication(int &argc, char** argv) } } + QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, DataPaths::currentProfilePath()); + + connect(this, SIGNAL(messageReceived(QString)), this, SLOT(messageReceived(QString))); + connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings())); + QTimer::singleShot(0, this, SLOT(postLaunch())); } MainApplication::~MainApplication() { + m_isClosing = true; + IconProvider::instance()->saveIconsToDatabase(); // Wait for all QtConcurrent jobs to finish @@ -714,11 +721,6 @@ void MainApplication::postLaunch() getWindow()->toggleFullScreen(); } - QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, DataPaths::currentProfilePath()); - - connect(this, SIGNAL(messageReceived(QString)), this, SLOT(messageReceived(QString))); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings())); - createJumpList(); initPulseSupport();