MainApplication: Move connections from postLaunch to constructor

Also set m_isClosing in destructor
remotes/origin/anmolgautam
David Rosca 8 years ago
parent b8b43f9732
commit 2ab2e80630
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 12
      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();

Loading…
Cancel
Save