Accepting request 1004479 from home:Vogtinator:plasma5.26

- Add patch to fix the KWin supportinfo module:
  * 0001-Find-qdbus-command-correctly.patch

OBS-URL: https://build.opensuse.org/request/show/1004479
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=360
This commit is contained in:
Christophe Giboudeaux 2022-09-18 13:00:36 +00:00 committed by Git OBS Bridge
parent c084b69d91
commit 2655d9ad14
3 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,85 @@
From 0f19cb4254c5a4a197e5d25f34c4be8de207d6ed Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sun, 18 Sep 2022 11:49:06 +0200
Subject: [PATCH] Find qdbus command correctly
qdbus is installed into Qt's own binaries dir and might not be in $PATH.
---
CMakeLists.txt | 3 +++
Modules/kwinsupportinfo/CMakeLists.txt | 2 ++
.../{kcm_kwinsupportinfo.json => kcm_kwinsupportinfo.json.in} | 2 +-
Modules/kwinsupportinfo/main.cpp | 3 ++-
4 files changed, 8 insertions(+), 2 deletions(-)
rename Modules/kwinsupportinfo/{kcm_kwinsupportinfo.json => kcm_kwinsupportinfo.json.in} (98%)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c16af497..947688b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@ include(KDEClangFormat)
include(ECMFindQmlModule)
include(KDEGitCommitHooks)
include(ECMSetupQtPluginMacroNames)
+include(ECMQueryQt)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
@@ -55,6 +56,8 @@ add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
+ecm_query_qt(QtBinariesDir QT_INSTALL_BINS)
+
add_subdirectory( Categories )
add_subdirectory( kcontrol/menus )
add_subdirectory( Modules )
diff --git a/Modules/kwinsupportinfo/CMakeLists.txt b/Modules/kwinsupportinfo/CMakeLists.txt
index b5d8a90e..c354475a 100644
--- a/Modules/kwinsupportinfo/CMakeLists.txt
+++ b/Modules/kwinsupportinfo/CMakeLists.txt
@@ -9,4 +9,6 @@ target_link_libraries(kcm_kwinsupportinfo KF5::CoreAddons KF5::QuickAddons KF5::
install(TARGETS kcm_kwinsupportinfo DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/kinfocenter)
+configure_file(kcm_kwinsupportinfo.json.in ${CMAKE_CURRENT_BINARY_DIR}/kcm_kwinsupportinfo.json @ONLY)
+
kpackage_install_package(package kcm_kwinsupportinfo kcms)
diff --git a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
similarity index 98%
rename from Modules/kwinsupportinfo/kcm_kwinsupportinfo.json
rename to Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
index 4a8dc422..7fd93ff2 100644
--- a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json
+++ b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
@@ -35,6 +35,6 @@
"Name[uk]": "Керування вікнами",
"Name[x-test]": "xxWindow Managerxx"
},
- "TryExec": "qdbus",
+ "TryExec": "@QtBinariesDir@/qdbus",
"X-KDE-KInfoCenter-Category": "graphical_information"
}
diff --git a/Modules/kwinsupportinfo/main.cpp b/Modules/kwinsupportinfo/main.cpp
index e1ca10e9..667c079f 100644
--- a/Modules/kwinsupportinfo/main.cpp
+++ b/Modules/kwinsupportinfo/main.cpp
@@ -8,6 +8,7 @@
#include <KLocalizedString>
#include <KPluginFactory>
#include <KQuickAddons/ConfigModule>
+#include <QLibraryInfo>
#include <CommandOutputContext.h>
@@ -18,7 +19,7 @@ public:
explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: ConfigModule(parent, data, args)
{
- auto outputContext = new CommandOutputContext(QStringLiteral("qdbus"),
+ auto outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
{QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
parent);
qmlRegisterSingletonInstance("org.kde.kinfocenter.kwinsupportinfo.private", 1, 0, "InfoOutputContext", outputContext);
--
2.37.3

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 18 10:01:21 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix the KWin supportinfo module:
* 0001-Find-qdbus-command-correctly.patch
-------------------------------------------------------------------
Thu Sep 15 20:46:28 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -38,6 +38,8 @@ Source: https://download.kde.org/unstable/plasma/%{version}/kinfocenter-
Source1: https://download.kde.org/unstable/plasma/%{version}/kinfocenter-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
# PATCH-FIX-UPSTREAM
Patch1: 0001-Find-qdbus-command-correctly.patch
# PATCH-FIX-OPENSUSE
Patch100: 0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch
BuildRequires: extra-cmake-modules >= %{kf5_version}