Hello community, here is the log from the commit of package krunner for openSUSE:Factory checked in at 2020-05-11 13:29:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/krunner (Old) and /work/SRC/openSUSE:Factory/.krunner.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "krunner" Mon May 11 13:29:50 2020 rev:76 rq:802112 version:5.70.0 Changes: -------- --- /work/SRC/openSUSE:Factory/krunner/krunner.changes 2020-04-15 20:04:23.894019269 +0200 +++ /work/SRC/openSUSE:Factory/.krunner.new.2738/krunner.changes 2020-05-11 13:31:58.507937979 +0200 @@ -1,0 +2,13 @@ +Sun May 3 09:40:11 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.70.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.70.0 +- Changes since 5.69.0: + * DBus Runner: Add service property to request actions once + * Print a warning if runner is incompatible with KRunner + * KRunner: Improve code snippet + * Use ecm_setup_qtplugin_macro_names + +------------------------------------------------------------------- Old: ---- krunner-5.69.0.tar.xz krunner-5.69.0.tar.xz.sig New: ---- krunner-5.70.0.tar.xz krunner-5.70.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ krunner.spec ++++++ --- /var/tmp/diff_new_pack.d3hOb7/_old 2020-05-11 13:31:59.331939707 +0200 +++ /var/tmp/diff_new_pack.d3hOb7/_new 2020-05-11 13:31:59.331939707 +0200 @@ -17,7 +17,7 @@ %define lname libKF5Runner5 -%define _tar_path 5.69 +%define _tar_path 5.70 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -25,7 +25,7 @@ # Only needed for the package signature condition %bcond_without lang Name: krunner -Version: 5.69.0 +Version: 5.70.0 Release: 0 Summary: Plugins responsible for better integration of Qt applications in KDE Workspace License: LGPL-2.1-or-later ++++++ krunner-5.69.0.tar.xz -> krunner-5.70.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/CMakeLists.txt new/krunner-5.70.0/CMakeLists.txt --- old/krunner-5.69.0/CMakeLists.txt 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/CMakeLists.txt 2020-05-03 00:00:24.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.69.0") # handled by release scripts -set(KF5_DEP_VERSION "5.69.0") # handled by release scripts +set(KF5_VERSION "5.70.0") # handled by release scripts +set(KF5_DEP_VERSION "5.70.0") # handled by release scripts project(KRunner VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.69.0 NO_MODULE) +find_package(ECM 5.70.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -23,6 +23,7 @@ include(CMakePackageConfigHelpers) include(KDEPackageAppTemplates) include(ECMQtDeclareLoggingCategory) +include(ECMSetupQtPluginMacroNames) set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") @@ -48,12 +49,14 @@ find_package(KF5Plasma ${KF5_DEP_VERSION} REQUIRED) find_package(KF5ThreadWeaver ${KF5_DEP_VERSION} REQUIRED) -set(KRunner_AUTOMOC_MACRO_NAMES "K_EXPORT_PLASMA_RUNNER" "K_EXPORT_RUNNER_CONFIG") -if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") - # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. - # 3.10+ lets us provide more macro names that require automoc. - list(APPEND CMAKE_AUTOMOC_MACRO_NAMES ${KRunner_AUTOMOC_MACRO_NAMES}) -endif() +ecm_setup_qtplugin_macro_names( + JSON_NONE + "K_EXPORT_PLASMA_RUNNER" + "K_EXPORT_RUNNER_CONFIG" + CONFIG_CODE_VARIABLE + PACKAGE_SETUP_AUTOMOC_VARIABLES +) + add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400) add_definitions(-DPLASMA_DISABLE_DEPRECATED_BEFORE_AND_AT=0x050500) # needed because we use Plasma::Package in the API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/KF5RunnerConfig.cmake.in new/krunner-5.70.0/KF5RunnerConfig.cmake.in --- old/krunner-5.69.0/KF5RunnerConfig.cmake.in 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/KF5RunnerConfig.cmake.in 2020-05-03 00:00:24.000000000 +0200 @@ -4,11 +4,7 @@ find_dependency(Qt5Core "@REQUIRED_QT_VERSION@") find_dependency(KF5Plasma "@KF5_DEP_VERSION@") -if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") - # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. - # 3.10+ lets us provide more macro names that require automoc. - list(APPEND CMAKE_AUTOMOC_MACRO_NAMES @KRunner_AUTOMOC_MACRO_NAMES@) -endif() +@PACKAGE_SETUP_AUTOMOC_VARIABLES@ include("${CMAKE_CURRENT_LIST_DIR}/KF5RunnerTargets.cmake") @PACKAGE_INCLUDE_QCHTARGETS@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/autotests/dbusrunnertest.cpp new/krunner-5.70.0/autotests/dbusrunnertest.cpp --- old/krunner-5.69.0/autotests/dbusrunnertest.cpp 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/autotests/dbusrunnertest.cpp 2020-05-03 00:00:24.000000000 +0200 @@ -24,6 +24,8 @@ #include "runnermanager.h" #include <QSignalSpy> #include <QProcess> +#include <QTime> +#include <QTimer> #include <KSycoca> @@ -44,6 +46,7 @@ void cleanupTestCase(); void testMatch(); void testMulti(); + void testRequestActionsOnce(); private: QStringList m_filesForCleanup; }; @@ -83,7 +86,7 @@ void DBusRunnerTest::cleanupTestCase() { - for(const QString path: m_filesForCleanup) { + for(const QString &path: qAsConst(m_filesForCleanup)) { QFile::remove(path); } } @@ -173,7 +176,38 @@ process2.waitForFinished(); } +void DBusRunnerTest::testRequestActionsOnce() +{ + QProcess process; + process.start(QFINDTESTDATA("testremoterunner"), QStringList({QStringLiteral("net.krunnertests.dave")})); + QVERIFY(process.waitForStarted()); + QTest::qSleep(500); + RunnerManager m; + auto s = KService::serviceByDesktopPath(QStringLiteral("dbusrunnertest.desktop")); + QVERIFY(s); + m.loadRunner(s); + + // Wait because dbus signal is async + QEventLoop loop; + QTimer t; + QTimer::connect(&t, &QTimer::timeout, &loop, &QEventLoop::quit); + t.start(500); + loop.exec(); + + // Construct a fake match with necesarry data + QueryMatch fakeMatch(m.runner(QStringLiteral("dbusrunnertest"))); + fakeMatch.setId(QStringLiteral("dbusrunnertest_id1")); + fakeMatch.setData(QStringLiteral("net.krunnertests.dave")); + + // We haven't called the prepare slot, if the implementation works + // the actions should alredy be available + auto actions = m.actionsForMatch(fakeMatch); + QCOMPARE(actions.count(), 1); + + process.kill(); + process.waitForFinished(); +} QTEST_MAIN(DBusRunnerTest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/autotests/dbusrunnertest.desktop new/krunner-5.70.0/autotests/dbusrunnertest.desktop --- old/krunner-5.69.0/autotests/dbusrunnertest.desktop 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/autotests/dbusrunnertest.desktop 2020-05-03 00:00:24.000000000 +0200 @@ -13,3 +13,4 @@ X-Plasma-API=DBus X-Plasma-DBusRunner-Service=net.krunnertests.dave X-Plasma-DBusRunner-Path=/dave +X-Plasma-Request-Actions-Once=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/src/abstractrunner.h new/krunner-5.70.0/src/abstractrunner.h --- old/krunner-5.69.0/src/abstractrunner.h 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/src/abstractrunner.h 2020-05-03 00:00:24.000000000 +0200 @@ -110,12 +110,11 @@ * to have a separate class doing all the work like so: * * \code - * void MyFancyAsyncRunner::match( RunnerContext& context ) + * void MyFancyAsyncRunner::match(RunnerContext &context) * { * QEventLoop loop; - * MyAsyncWorker worker( context ); - * connect( &worker, SIGNAL(finished()), - * &loop, SLOT(quit()) ); + * MyAsyncWorker worker(context); + * connect(&worker, &MyAsyncWorker::finished, &loop, &MyAsyncWorker::quit); * worker.work(); * loop.exec(); * } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/src/data/servicetypes/plasma-runner.desktop new/krunner-5.70.0/src/data/servicetypes/plasma-runner.desktop --- old/krunner-5.69.0/src/data/servicetypes/plasma-runner.desktop 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/src/data/servicetypes/plasma-runner.desktop 2020-05-03 00:00:24.000000000 +0200 @@ -68,3 +68,8 @@ [PropertyDef::X-Plasma-DBusRunner-Path] Type=QString + +# Request actions only when the plugin is initialized instead +# of each match session, default is false +[PropertyDef::X-Plasma-Request-Actions-Once] +Type=bool diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/src/dbusrunner.cpp new/krunner-5.70.0/src/dbusrunner.cpp --- old/krunner-5.69.0/src/dbusrunner.cpp 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/src/dbusrunner.cpp 2020-05-03 00:00:24.000000000 +0200 @@ -84,8 +84,11 @@ //don't check when not wildcarded, as it could be used with DBus-activation m_matchingServices << requestedServiceName; } - - connect(this, &AbstractRunner::prepare, this, &DBusRunner::requestActions); + if (service->property(QStringLiteral("X-Plasma-Request-Actions-Once")).toBool()) { + requestActions(); + } else { + connect(this, &AbstractRunner::prepare, this, &DBusRunner::requestActions); + } } DBusRunner::~DBusRunner() = default; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.69.0/src/runnermanager.cpp new/krunner-5.70.0/src/runnermanager.cpp --- old/krunner-5.69.0/src/runnermanager.cpp 2020-04-05 00:37:25.000000000 +0200 +++ new/krunner-5.70.0/src/runnermanager.cpp 2020-05-03 00:00:24.000000000 +0200 @@ -299,7 +299,8 @@ if (api.isEmpty()) { QVariantList args; args << service->storageId(); - if (Plasma::isPluginVersionCompatible(KPluginLoader(*service).pluginVersion())) { + const quint64 pluginVersion = KPluginLoader(*service).pluginVersion(); + if (Plasma::isPluginVersionCompatible(pluginVersion)) { QString error; runner = service->createInstance<AbstractRunner>(q, args, &error); if (!runner) { @@ -307,6 +308,10 @@ // qCDebug(KRUNNER) << "Failed to load runner:" << service->name() << ". error reported:" << error; #endif } + } else { + const QString runnerVersion = QStringLiteral("%1.%2.%3").arg(pluginVersion >> 16).arg((pluginVersion >> 8) & 0x00ff).arg(pluginVersion & 0x0000ff); + qCWarning(KRUNNER) << "Cannot load runner" << service->name() <<"- versions mismatch: KRunner" + << Plasma::versionString()<< "," << service->name() << runnerVersion; } } else if (api == QLatin1String("DBus")){ runner = new DBusRunner(service, q);