summaryrefslogtreecommitdiffstats
path: root/patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch')
-rw-r--r--patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch b/patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch
new file mode 100644
index 000000000..c9fa5065b
--- /dev/null
+++ b/patches/qt-everywhere-opensource-src-5.6.0/0102-qtbase-examples-fix-building-without-session-managem.patch
@@ -0,0 +1,53 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 29 Feb 2016 16:21:24 +0100
+Subject: [PATCH] qtbase: examples: fix building without session management
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qtbase/examples/widgets/mainwindows/application/mainwindow.cpp | 4 ++++
+ qtbase/examples/widgets/mainwindows/application/mainwindow.h | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/qtbase/examples/widgets/mainwindows/application/mainwindow.cpp b/qtbase/examples/widgets/mainwindows/application/mainwindow.cpp
+index 861b908189d8..9b8ae818282a 100644
+--- a/qtbase/examples/widgets/mainwindows/application/mainwindow.cpp
++++ b/qtbase/examples/widgets/mainwindows/application/mainwindow.cpp
+@@ -59,9 +59,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);
+@@ -388,6 +390,7 @@ QString MainWindow::strippedName(const QString &fullFileName)
+ }
+ //! [49]
+
++#ifndef QT_NO_SESSIONMANAGER
+ void MainWindow::commitData(QSessionManager &manager)
+ {
+ if (manager.allowsInteraction()) {
+@@ -399,3 +402,4 @@ void MainWindow::commitData(QSessionManager &manager)
+ save();
+ }
+ }
++#endif
+diff --git a/qtbase/examples/widgets/mainwindows/application/mainwindow.h b/qtbase/examples/widgets/mainwindows/application/mainwindow.h
+index 9712604125b5..690e8ebc32ea 100644
+--- a/qtbase/examples/widgets/mainwindows/application/mainwindow.h
++++ b/qtbase/examples/widgets/mainwindows/application/mainwindow.h
+@@ -70,7 +70,9 @@ private slots:
+ bool saveAs();
+ void about();
+ void documentWasModified();
++#ifndef QT_NO_SESSIONMANAGER
+ void commitData(QSessionManager &);
++#endif
+
+ private:
+ void createActions();