summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows/application/mainwindow.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-05-03 17:03:26 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-05-03 18:58:24 +0000
commit69c2a606b36858454ec0b53b5d9789cf8e524806 (patch)
tree86a97816b5e4bf4be5937774f5b8fd2a126b8086 /examples/widgets/mainwindows/application/mainwindow.cpp
parent224db5e6eb07154ba2e974a96ee617bf7d740134 (diff)
parent6357813207c866c99aadfd91af8fb3affe891f1d (diff)
Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev
Diffstat (limited to 'examples/widgets/mainwindows/application/mainwindow.cpp')
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/widgets/mainwindows/application/mainwindow.cpp b/examples/widgets/mainwindows/application/mainwindow.cpp
index 4115b8245b..dc93fe4eb2 100644
--- a/examples/widgets/mainwindows/application/mainwindow.cpp
+++ b/examples/widgets/mainwindows/application/mainwindow.cpp
@@ -69,9 +69,11 @@ MainWindow::MainWindow()
connect(textEdit->document(), &QTextDocument::contentsChanged,
this, &MainWindow::documentWasModified);
+#ifndef QT_NO_SESSIONMANAGER
QGuiApplication::setFallbackSessionManagementEnabled(false);
connect(qApp, &QGuiApplication::commitDataRequest,
this, &MainWindow::commitData);
+#endif
setCurrentFile(QString());
setUnifiedTitleAndToolBarOnMac(true);
@@ -397,7 +399,7 @@ QString MainWindow::strippedName(const QString &fullFileName)
return QFileInfo(fullFileName).fileName();
}
//! [49]
-
+#ifndef QT_NO_SESSIONMANAGER
void MainWindow::commitData(QSessionManager &manager)
{
if (manager.allowsInteraction()) {
@@ -409,3 +411,4 @@ void MainWindow::commitData(QSessionManager &manager)
save();
}
}
+#endif