[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [systemsettings] /: Use platform detection in SystemSettings
From:       Martin_Flöser <null () kde ! org>
Date:       2018-03-21 5:50:48
Message-ID: E1eyWe8-0003AR-Qx () code ! kde ! org
[Download RAW message or body]

Git commit 2d8296904bb495eca50886f9a61727f27da66e7b by Martin Flöser.
Committed on 21/03/2018 at 05:50.
Pushed by graesslin into branch 'master'.

Use platform detection in SystemSettings

Summary:
SystemSettings needs to run on Wayland in a Wayland session and on X11
in an X11 session.

Test Plan:
unset QT_QPA_PLATFORM and XDG_SESSION_TYPE -> x11 window,
reset XDG_SESSION_TYPE to wayland -> wayland window

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11445

M  +2    -0    CMakeLists.txt
M  +1    -0    app/CMakeLists.txt
M  +4    -0    app/main.cpp

https://commits.kde.org/systemsettings/2d8296904bb495eca50886f9a61727f27da66e7b

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 623a801..578c030 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,8 @@ ecm_find_qmlmodule(org.kde.kcm 1.0)
 
 find_package(KF5Kirigami2 2.1 REQUIRED)
 
+find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED)
+
 add_subdirectory(core)
 add_subdirectory(app)
 add_subdirectory(categories)
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 0a4dd5c..1f3dd63 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -30,6 +30,7 @@ target_link_libraries( systemsettings5 systemsettingsview
     KF5::XmlGui
     KF5::DBusAddons
     KF5::ConfigGui
+    PW::KWorkspace
 )
 
 install( TARGETS systemsettings5 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
diff --git a/app/main.cpp b/app/main.cpp
index 17afd93..f386f58 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -25,6 +25,8 @@
 #include <KAboutData>
 #include <KCrash>
 
+#include <kworkspace.h>
+
 #include "SystemSettingsApp.h"
 #include "SettingsBase.h"
 
@@ -33,6 +35,8 @@ int main( int argc, char *argv[] )
     //exec is systemsettings5, but we need the QPT to use the right config from the qApp constructor
     //which is before KAboutData::setApplicationData
     QCoreApplication::setApplicationName(QStringLiteral("systemsettings"));
+
+    KWorkSpace::detectPlatform(argc, argv);
     SystemSettingsApp application(argc, argv);
     KCrash::initialize();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic