forked from pool/kde-cli-tools5
- Add patches to support wayland sessions without QT_QPA_PLUGIN:
* 0001-Call-KLocalizedString-setApplicationDomain-after-Q-A.patch * 0002-Use-platform-detection-from-KWorkSpace-in-KCMShell.patch * 0003-Fix-build-in-kcmshell5-accidentially-landed-the-wron.patch OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kde-cli-tools5?expand=0&rev=187
This commit is contained in:
parent
db834be9d0
commit
2a6104db55
@ -0,0 +1,29 @@
|
||||
From e83437e6e5caf39c1c5df4e7ab5600440e43ff28 Mon Sep 17 00:00:00 2001
|
||||
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
|
||||
Date: Sat, 10 Feb 2018 14:04:57 +0100
|
||||
Subject: [PATCH 1/3] Call KLocalizedString::setApplicationDomain after Q*App
|
||||
creation
|
||||
|
||||
As now recommended, to ensure all locale settings are done from Qt side
|
||||
---
|
||||
kcmshell/main.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp
|
||||
index dd4ed1c..93dd6f8 100644
|
||||
--- a/kcmshell/main.cpp
|
||||
+++ b/kcmshell/main.cpp
|
||||
@@ -173,9 +173,9 @@ void KCMShell::appExit(const QString &appId, const QString &oldName, const QStri
|
||||
|
||||
extern "C" Q_DECL_EXPORT int kdemain(int _argc, char *_argv[])
|
||||
{
|
||||
+ KCMShell app(_argc, _argv);
|
||||
KLocalizedString::setApplicationDomain("kcmshell5");
|
||||
|
||||
- KCMShell app(_argc, _argv);
|
||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
|
||||
KAboutData aboutData("kcmshell5", i18n("System Settings Module"),
|
||||
--
|
||||
2.16.2
|
||||
|
@ -0,0 +1,79 @@
|
||||
From cc5f6765b3e25f411120d2100fb14f0d69de75a1 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Tue, 27 Mar 2018 09:24:09 +0200
|
||||
Subject: [PATCH 2/3] Use platform detection from KWorkSpace in KCMShell
|
||||
|
||||
Summary: In a Wayland session, KCMs need to use the wayland platform plugin.
|
||||
|
||||
Test Plan: kcmshell5 kscreen now works properly.
|
||||
|
||||
Reviewers: #plasma, romangg
|
||||
|
||||
Reviewed By: #plasma, romangg
|
||||
|
||||
Subscribers: romangg, plasma-devel
|
||||
|
||||
Tags: #plasma
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D11739
|
||||
---
|
||||
CMakeLists.txt | 2 ++
|
||||
kcmshell/CMakeLists.txt | 1 +
|
||||
kcmshell/main.cpp | 8 ++++++++
|
||||
3 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 26d5e7e..0c04e8d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -50,6 +50,8 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
||||
QUIET
|
||||
)
|
||||
|
||||
+find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED)
|
||||
+
|
||||
# Disables automatic conversions from QString (or char *) to QUrl.
|
||||
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
||||
|
||||
diff --git a/kcmshell/CMakeLists.txt b/kcmshell/CMakeLists.txt
|
||||
index f787136..7c33290 100644
|
||||
--- a/kcmshell/CMakeLists.txt
|
||||
+++ b/kcmshell/CMakeLists.txt
|
||||
@@ -11,6 +11,7 @@ target_link_libraries(kdeinit_kcmshell5
|
||||
KF5::I18n
|
||||
KF5::WindowSystem
|
||||
KF5::Activities
|
||||
+ PW::KWorkspace
|
||||
)
|
||||
|
||||
install(TARGETS kdeinit_kcmshell5 ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp
|
||||
index 93dd6f8..d855b96 100644
|
||||
--- a/kcmshell/main.cpp
|
||||
+++ b/kcmshell/main.cpp
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <KStartupInfo>
|
||||
#include <KActivities/ResourceInstance>
|
||||
|
||||
+#include <kworkspace.h>
|
||||
+
|
||||
#include <QIcon>
|
||||
#include <QCommandLineParser>
|
||||
#include <QCommandLineOption>
|
||||
@@ -173,7 +175,13 @@ void KCMShell::appExit(const QString &appId, const QString &oldName, const QStri
|
||||
|
||||
extern "C" Q_DECL_EXPORT int kdemain(int _argc, char *_argv[])
|
||||
{
|
||||
+ const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM");
|
||||
+ KWorkSpace::detectPlatform(argc, argv);
|
||||
KCMShell app(_argc, _argv);
|
||||
+ if (!qpaVariable) {
|
||||
+ // don't leak the env variable to processes we start
|
||||
+ qunsetenv("QT_QPA_PLATFORM");
|
||||
+ }
|
||||
KLocalizedString::setApplicationDomain("kcmshell5");
|
||||
|
||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
--
|
||||
2.16.2
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 74969bbb1ee83ee90d9d078cb38d4213c92a14ec Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Tue, 27 Mar 2018 21:31:39 +0200
|
||||
Subject: [PATCH 3/3] Fix build in kcmshell5, accidentially landed the wrong
|
||||
revision
|
||||
|
||||
Needs to be _argc, _argv.
|
||||
---
|
||||
kcmshell/main.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp
|
||||
index d855b96..aa2cd05 100644
|
||||
--- a/kcmshell/main.cpp
|
||||
+++ b/kcmshell/main.cpp
|
||||
@@ -176,7 +176,7 @@ void KCMShell::appExit(const QString &appId, const QString &oldName, const QStri
|
||||
extern "C" Q_DECL_EXPORT int kdemain(int _argc, char *_argv[])
|
||||
{
|
||||
const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM");
|
||||
- KWorkSpace::detectPlatform(argc, argv);
|
||||
+ KWorkSpace::detectPlatform(_argc, _argv);
|
||||
KCMShell app(_argc, _argv);
|
||||
if (!qpaVariable) {
|
||||
// don't leak the env variable to processes we start
|
||||
--
|
||||
2.16.2
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 28 08:20:00 UTC 2018 - fabian@ritter-vogt.de
|
||||
|
||||
- Add patches to support wayland sessions without QT_QPA_PLUGIN:
|
||||
* 0001-Call-KLocalizedString-setApplicationDomain-after-Q-A.patch
|
||||
* 0002-Use-platform-detection-from-KWorkSpace-in-KCMShell.patch
|
||||
* 0003-Fix-build-in-kcmshell5-accidentially-landed-the-wron.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 27 15:40:47 CEST 2018 - fabian@ritter-vogt.de
|
||||
|
||||
|
@ -27,6 +27,10 @@ Url: http://www.kde.org
|
||||
Source: http://download.kde.org/stable/plasma/%{version}/kde-cli-tools-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE kdesu-add-some-i18n-love.patch -- boo#852256
|
||||
Patch0: kdesu-add-some-i18n-love.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Call-KLocalizedString-setApplicationDomain-after-Q-A.patch
|
||||
Patch2: 0002-Use-platform-detection-from-KWorkSpace-in-KCMShell.patch
|
||||
Patch3: 0003-Fix-build-in-kcmshell5-accidentially-landed-the-wron.patch
|
||||
BuildRequires: extra-cmake-modules >= 1.3.0
|
||||
BuildRequires: kf5-filesystem
|
||||
BuildRequires: xz
|
||||
@ -63,7 +67,7 @@ Additional CLI tools for KDE applications and workspaces.
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n kde-cli-tools-%{version}
|
||||
%patch0 -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build
|
||||
|
Loading…
Reference in New Issue
Block a user