Quit VRMode before aboutToQuit runs

This commit is contained in:
Atlante45 2015-04-06 17:55:48 +02:00
parent efbd74f539
commit a3f8076641
3 changed files with 5 additions and 2 deletions

View file

@ -564,8 +564,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
}
void Application::aboutToQuit() {
_aboutToQuit = true;
emit beforeAboutToQuit();
_aboutToQuit = true;
cleanupBeforeQuit();
}

View file

@ -337,6 +337,8 @@ signals:
void faceURLChanged(const QString& newValue);
void skeletonURLChanged(const QString& newValue);
void beforeAboutToQuit();
public slots:
void domainChanged(const QString& domainHostname);

View file

@ -87,7 +87,7 @@ HMDToolsDialog::HMDToolsDialog(QWidget* parent) :
}
// when the application is about to quit, leave HDM mode
connect(Application::getInstance(), SIGNAL(aboutToQuit()), this, SLOT(aboutToQuit()));
connect(Application::getInstance(), SIGNAL(beforeAboutToQuit()), this, SLOT(aboutToQuit()));
// keep track of changes to the number of screens
connect(QApplication::desktop(), &QDesktopWidget::screenCountChanged, this, &HMDToolsDialog::screenCountChanged);