From a5d00be3accdbc1cecd4174c74c9876293b83e3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 4 Jul 2018 22:01:37 +0200
Subject: [PATCH] fix build for qtbase without session management
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Inappropriate [configuration]

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 kwrited.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kwrited.cpp b/kwrited.cpp
index 1df1f2c..b77cd25 100644
--- a/kwrited.cpp
+++ b/kwrited.cpp
@@ -73,12 +73,14 @@ int main(int argc, char **argv)
     QApplication::setDesktopSettingsAware(false);
     QApplication a(argc, argv);
     KAboutData::setApplicationData(aboutData());
+#ifndef QT_NO_SESSIONMANAGER
     QGuiApplication::setFallbackSessionManagementEnabled(false);
     auto disableSessionManagement = [](QSessionManager &sm) {
             sm.setRestartHint(QSessionManager::RestartNever);
     };
     QObject::connect(&a, &QGuiApplication::commitDataRequest, disableSessionManagement);
     QObject::connect(&a, &QGuiApplication::saveStateRequest, disableSessionManagement);
+#endif
 
     KWrited w;
     return a.exec();
-- 
2.14.3

