Accepting request 818407 from home:Vogtinator:branches:KDE:Applications

RFC. I'm not sure whether this is the right approach, as this is saved in the config, which would no longer work once we fully migrated to Qt6.
If you agree, I'd send a patch upstream to autodetect qdbus-qt5.

- Add patch to fix suggested commands in the runcommand config:
  * 0001-Use-qdbus-qt5.patch

OBS-URL: https://build.opensuse.org/request/show/818407
OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kdeconnect-kde?expand=0&rev=9
This commit is contained in:
Luca Beltrame 2020-07-09 05:13:20 +00:00 committed by Git OBS Bridge
parent 5599d212c4
commit e3d7de8080
3 changed files with 40 additions and 2 deletions

31
0001-Use-qdbus-qt5.patch Normal file
View File

@ -0,0 +1,31 @@
From 92a7982a202f9c374a84ee3218a4ba5657b294d4 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Thu, 2 Jul 2020 22:26:10 +0200
Subject: [PATCH] Use qdbus-qt5
---
plugins/runcommand/runcommand_config.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/runcommand/runcommand_config.cpp b/plugins/runcommand/runcommand_config.cpp
index 7a7ed772..c375a832 100644
--- a/plugins/runcommand/runcommand_config.cpp
+++ b/plugins/runcommand/runcommand_config.cpp
@@ -43,11 +43,11 @@ RunCommandConfig::RunCommandConfig(QWidget* parent, const QVariantList& args)
{
QMenu* defaultMenu = new QMenu(this);
addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("systemctl suspend"));
- addSuggestedCommand(defaultMenu, i18n("Maximum Brightness"), QStringLiteral("qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`"));
+ addSuggestedCommand(defaultMenu, i18n("Maximum Brightness"), QStringLiteral("qdbus-qt5 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `qdbus-qt5 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`"));
addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("loginctl lock-session"));
addSuggestedCommand(defaultMenu, i18n("Unlock Screen"), QStringLiteral("loginctl unlock-session"));
- addSuggestedCommand(defaultMenu, i18n("Close All Vaults"), QStringLiteral("qdbus org.kde.kded5 /modules/plasmavault closeAllVaults"));
- addSuggestedCommand(defaultMenu, i18n("Forcefully Close All Vaults"), QStringLiteral("qdbus org.kde.kded5 /modules/plasmavault forceCloseAllVaults"));
+ addSuggestedCommand(defaultMenu, i18n("Close All Vaults"), QStringLiteral("qdbus-qt5 org.kde.kded5 /modules/plasmavault closeAllVaults"));
+ addSuggestedCommand(defaultMenu, i18n("Forcefully Close All Vaults"), QStringLiteral("qdbus-qt5 org.kde.kded5 /modules/plasmavault forceCloseAllVaults"));
QTableView* table = new QTableView(this);
table->horizontalHeader()->setStretchLastSection(true);
--
2.25.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 2 20:33:01 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix suggested commands in the runcommand config:
* 0001-Use-qdbus-qt5.patch
-------------------------------------------------------------------
Tue Jun 9 12:14:39 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -34,6 +34,8 @@ Source100: kdeconnect-kde.SuSEfirewall
Source101: kdeconnect-kde-firewalld.xml
# PATCH-FIX-UPSTREAM
Patch0: 0001-Use-ecm_qt_declare_logging_category-to-declare-the-l.patch
# PATCH-FIX-OPENSUSE
Patch100: 0001-Use-qdbus-qt5.patch
BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem
@ -93,8 +95,7 @@ ZSH command line completion support for %{name}.
%lang_package
%prep
%setup -q
%patch0 -p1
%autosetup -p1
%build
%cmake_kf5 -d build