Hello community,

here is the log from the commit of package krunner for openSUSE:Factory checked 
in at 2020-12-15 12:29:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/krunner (Old)
 and      /work/SRC/openSUSE:Factory/.krunner.new.2328 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "krunner"

Tue Dec 15 12:29:25 2020 rev:84 rq:855458 version:5.77.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/krunner/krunner.changes  2020-11-23 
10:33:01.621528112 +0100
+++ /work/SRC/openSUSE:Factory/.krunner.new.2328/krunner.changes        
2020-12-15 12:31:40.708062867 +0100
@@ -1,0 +2,18 @@
+Mon Dec  7 17:14:40 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.77.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.77.0
+- Changes since 5.76.0:
+  * Do not use explicitly deleted constructor in autotests
+  * Deprecate KDE4 package remnants
+  * Remove unneeded test
+  * Use isValid() method instead of nullptr check
+  * Simplify nullptr checks
+  * Make use of new KPluginMetaData plugin constructor support of KPluginLoader
+  * Add trailing commas
+  * Add clang-format target
+  * Rework internals of match id methods and add tests for it
+
+-------------------------------------------------------------------

Old:
----
  krunner-5.76.0.tar.xz
  krunner-5.76.0.tar.xz.sig

New:
----
  krunner-5.77.0.tar.xz
  krunner-5.77.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ krunner.spec ++++++
--- /var/tmp/diff_new_pack.fFy9UH/_old  2020-12-15 12:31:41.428063446 +0100
+++ /var/tmp/diff_new_pack.fFy9UH/_new  2020-12-15 12:31:41.428063446 +0100
@@ -17,7 +17,7 @@
 
 
 %define lname   libKF5Runner5
-%define _tar_path 5.76
+%define _tar_path 5.77
 # 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.76.0
+Version:        5.77.0
 Release:        0
 Summary:        KDE Framework for providing different actions given a string 
query
 License:        LGPL-2.1-or-later
@@ -49,9 +49,9 @@
 BuildRequires:  cmake(KF5Solid) >= %{_kf5_bugfix_version}
 BuildRequires:  cmake(KF5ThreadWeaver) >= %{_kf5_bugfix_version}
 BuildRequires:  cmake(KF5WindowSystem) >= %{_kf5_bugfix_version}
-BuildRequires:  cmake(Qt5Gui) >= 5.12.0
-BuildRequires:  cmake(Qt5Quick) >= 5.12.0
-BuildRequires:  cmake(Qt5Test) >= 5.12.0
+BuildRequires:  cmake(Qt5Gui) >= 5.13.0
+BuildRequires:  cmake(Qt5Quick) >= 5.13.0
+BuildRequires:  cmake(Qt5Test) >= 5.13.0
 
 %description
 KDE Framework for providing different actions given a string query.
@@ -69,7 +69,7 @@
 Requires:       %{lname} = %{version}
 Requires:       extra-cmake-modules
 Requires:       cmake(KF5Plasma) >= %{_kf5_bugfix_version}
-Requires:       cmake(Qt5Core) >= 5.12.0
+Requires:       cmake(Qt5Core) >= 5.13.0
 Conflicts:      kapptemplate <= 16.03.80
 
 %description devel


++++++ krunner-5.76.0.tar.xz -> krunner-5.77.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/CMakeLists.txt 
new/krunner-5.77.0/CMakeLists.txt
--- old/krunner-5.76.0/CMakeLists.txt   2020-11-07 13:04:28.000000000 +0100
+++ new/krunner-5.77.0/CMakeLists.txt   2020-12-05 11:13:52.000000000 +0100
@@ -1,12 +1,12 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.76.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.76.0") # handled by release scripts
+set(KF5_VERSION "5.77.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.77.0") # handled by release scripts
 project(KRunner VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.76.0  NO_MODULE)
+find_package(ECM 5.77.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)
 
@@ -24,6 +24,7 @@
 include(KDEPackageAppTemplates)
 include(ECMQtDeclareLoggingCategory)
 include(ECMSetupQtPluginMacroNames)
+include(KDEClangFormat)
 
 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of 
deprecated API excluded from the build [default=0].")
 
@@ -37,7 +38,7 @@
 )
 
 # Dependencies
-set(REQUIRED_QT_VERSION 5.12.0)
+set(REQUIRED_QT_VERSION 5.13.0)
 
 find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Gui Widgets Quick)
 
@@ -107,3 +108,8 @@
         COMPONENT Devel)
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
+# add clang-format target for all our real source files
+file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
+kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/autotests/CMakeLists.txt 
new/krunner-5.77.0/autotests/CMakeLists.txt
--- old/krunner-5.76.0/autotests/CMakeLists.txt 2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/autotests/CMakeLists.txt 2020-12-05 11:13:52.000000000 
+0100
@@ -15,6 +15,11 @@
    LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner Qt5::Widgets
 )
 
+ecm_add_tests(
+        runnermatchmethodstest.cpp
+        LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner Qt5::Widgets
+)
+
 set(demoapp_SRCS testremoterunner.cpp)
 qt5_add_dbus_adaptor(demoapp_SRCS "../src/data/org.kde.krunner1.xml" 
testremoterunner.h TestRemoteRunner)
 add_executable(testremoterunner ${demoapp_SRCS})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/autotests/runnermatchmethodstest.cpp 
new/krunner-5.77.0/autotests/runnermatchmethodstest.cpp
--- old/krunner-5.76.0/autotests/runnermatchmethodstest.cpp     1970-01-01 
01:00:00.000000000 +0100
+++ new/krunner-5.77.0/autotests/runnermatchmethodstest.cpp     2020-12-05 
11:13:52.000000000 +0100
@@ -0,0 +1,158 @@
+/*
+    SPDX-FileCopyrightText: 2017 David Edmundson <[email protected]>
+
+    SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#include "runnermanager.h"
+
+#include <QObject>
+#include <QAction>
+#include <QTest>
+
+using namespace Plasma;
+
+class Runner: public AbstractRunner
+{
+public:
+    Runner()
+        : AbstractRunner(nullptr, 
KPluginMetaData(QStringLiteral("metadata.desktop")), QVariantList())
+    {
+    }
+};
+namespace
+{
+inline QueryMatch createMatch(const QString &id, Runner *r = nullptr)
+{
+    QueryMatch m(r);
+    m.setId(id);
+    return m;
+}
+}
+
+class RunnerContextMatchMethodsTest: public QObject
+{
+Q_OBJECT
+public:
+    RunnerContextMatchMethodsTest();
+    ~RunnerContextMatchMethodsTest();
+
+    RunnerContext *ctx = nullptr;
+    Runner *runner1;
+    Runner *runner2;
+private Q_SLOTS:
+    void init();
+    void testAdd();
+    void testAddMulti();
+    void testRemoveMatch();
+    void testRemoveMatchMulti();
+    void testRemoveMatchByRunner();
+    void testGetMatchById();
+    void testNonExistentMatchIds();
+};
+
+RunnerContextMatchMethodsTest::RunnerContextMatchMethodsTest()
+    : QObject(),
+      runner1(new Runner()),
+      runner2(new Runner())
+{
+}
+
+RunnerContextMatchMethodsTest::~RunnerContextMatchMethodsTest()
+{
+    delete runner1;
+    delete runner2;
+}
+
+void RunnerContextMatchMethodsTest::init()
+{
+    delete ctx;
+    ctx = new RunnerContext();
+}
+
+void RunnerContextMatchMethodsTest::testAdd()
+{
+    QVERIFY(ctx->matches().isEmpty());
+    QVERIFY(ctx->addMatch(createMatch(QStringLiteral("m1"))));
+    QVERIFY(ctx->addMatch(createMatch(QStringLiteral("m2"))));
+    QCOMPARE(ctx->matches().count(), 2);
+    QVERIFY(ctx->addMatch(createMatch(QStringLiteral("m3"))));
+    QCOMPARE(ctx->matches().count(), 3);
+}
+
+void RunnerContextMatchMethodsTest::testAddMulti()
+{
+    QVERIFY(ctx->matches().isEmpty());
+    QVERIFY(ctx->addMatches({createMatch(QStringLiteral("m1")), 
createMatch(QStringLiteral("m2"))}));
+    QCOMPARE(ctx->matches().count(), 2);
+}
+
+void RunnerContextMatchMethodsTest::testRemoveMatch()
+{
+    QueryMatch m = createMatch(QStringLiteral("m1"));
+    ctx->addMatches({m, createMatch(QStringLiteral("m2"))});
+    QCOMPARE(ctx->matches().count(), 2);
+    QVERIFY(ctx->removeMatch(m.id()));
+    QCOMPARE(ctx->matches().count(), 1);
+}
+
+void RunnerContextMatchMethodsTest::testRemoveMatchByRunner()
+{
+    QVERIFY(ctx->matches().isEmpty());
+    QueryMatch m1 = createMatch(QStringLiteral("m1"), runner1);
+    QueryMatch m2 = createMatch(QStringLiteral("m2"), runner1);
+    QueryMatch m3 = createMatch(QStringLiteral("m3"), runner2);
+    ctx->addMatches({m1, m2, m3});
+    QCOMPARE(ctx->matches().count(), 3);
+    QVERIFY(ctx->removeMatches(runner1));
+    QCOMPARE(ctx->matches().count(), 1);
+    QCOMPARE(ctx->matches().constFirst(), m3);
+}
+
+void RunnerContextMatchMethodsTest::testRemoveMatchMulti()
+{
+    QVERIFY(ctx->matches().isEmpty());
+    QueryMatch m1 = createMatch(QStringLiteral("m1"));
+    QueryMatch m2 = createMatch(QStringLiteral("m2"));
+    QueryMatch m3 = createMatch(QStringLiteral("m3"));
+    ctx->addMatches({m1, m2, m3});
+    QCOMPARE(ctx->matches().count(), 3);
+
+    // Nothing should happen in case of an empty list
+    QVERIFY(!ctx->removeMatches(QStringList()));
+    QCOMPARE(ctx->matches().count(), 3);
+
+    QVERIFY(ctx->removeMatches({m1.id(), m2.id()}));
+    QCOMPARE(ctx->matches().count(), 1);
+    QCOMPARE(ctx->matches().constFirst(), m3);
+}
+
+void RunnerContextMatchMethodsTest::testGetMatchById()
+{
+    QueryMatch m1 = createMatch(QStringLiteral("m1"), runner1);
+    QueryMatch m2 = createMatch(QStringLiteral("m2"), runner1);
+    QueryMatch m3 = createMatch(QStringLiteral("m3"), runner2);
+    ctx->addMatches({m1, m2, m3});
+    QCOMPARE(ctx->matches().count(), 3);
+    QCOMPARE(ctx->match(m1.id()), m1);
+    // ID gets internally concatenated with runner id
+    QCOMPARE(ctx->match(QStringLiteral("metadata_m1")), m1);
+}
+
+void RunnerContextMatchMethodsTest::testNonExistentMatchIds()
+{
+    QueryMatch m1 = createMatch(QStringLiteral("m1"));
+    QueryMatch m2 = createMatch(QStringLiteral("m2"));
+    ctx->addMatches({m1, m2});
+    QCOMPARE(ctx->matches().count(), 2);
+    QVERIFY(!ctx->removeMatch(QStringLiteral("does_not_exist")));
+    QCOMPARE(ctx->matches().count(), 2);
+
+    QVERIFY(!ctx->match(QStringLiteral("does_not_exist")).isValid());
+    QCOMPARE(ctx->match(QStringLiteral("does_not_exist")).runner(), nullptr);
+}
+
+QTEST_MAIN(RunnerContextMatchMethodsTest)
+
+
+#include "runnermatchmethodstest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/CMakeLists.txt 
new/krunner-5.77.0/src/CMakeLists.txt
--- old/krunner-5.76.0/src/CMakeLists.txt       2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/CMakeLists.txt       2020-12-05 11:13:52.000000000 
+0100
@@ -32,7 +32,7 @@
     GROUP_BASE_NAME KF
     VERSION ${KF5_VERSION}
     DEPRECATED_BASE_VERSION 0
-    DEPRECATION_VERSIONS 5.28 5.71 5.72 5.73 5.76
+    DEPRECATION_VERSIONS 5.28 5.71 5.72 5.73 5.76 5.77
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/abstractrunner.cpp 
new/krunner-5.77.0/src/abstractrunner.cpp
--- old/krunner-5.76.0/src/abstractrunner.cpp   2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/abstractrunner.cpp   2020-12-05 11:13:52.000000000 
+0100
@@ -24,12 +24,14 @@
 namespace Plasma
 {
 
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
 AbstractRunner::AbstractRunner(QObject *parent, const QString &path)
     : QObject(parent),
       d(new AbstractRunnerPrivate(this))
 {
     d->init(path);
 }
+#endif
 
 AbstractRunner::AbstractRunner(const KPluginMetaData &pluginMetaData, QObject 
*parent)
     : QObject(parent),
@@ -47,6 +49,16 @@
 }
 #endif
 
+AbstractRunner::AbstractRunner(QObject *parent, const KPluginMetaData 
&pluginMetaData, const QVariantList &args)
+    : QObject(parent),
+      d(new AbstractRunnerPrivate(this))
+{
+    Q_UNUSED(args)
+
+    d->init(pluginMetaData);
+}
+
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
 AbstractRunner::AbstractRunner(QObject *parent, const QVariantList &args)
     : QObject(parent),
       d(new AbstractRunnerPrivate(this))
@@ -74,6 +86,7 @@
 #endif
     }
 }
+#endif
 
 AbstractRunner::~AbstractRunner()
 {
@@ -477,11 +490,13 @@
 }
 #endif
 
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
 void AbstractRunnerPrivate::init(const QString &path)
 {
     runnerDescription = KPluginMetaData(path + 
QStringLiteral("/metadata.desktop"));
     init();
 }
+#endif
 
 } // Plasma namespace
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/abstractrunner.h 
new/krunner-5.77.0/src/abstractrunner.h
--- old/krunner-5.76.0/src/abstractrunner.h     2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/abstractrunner.h     2020-12-05 11:13:52.000000000 
+0100
@@ -66,7 +66,7 @@
         /** Specifies a nominal speed for the runner */
         enum Speed {
             SlowSpeed,
-            NormalSpeed
+            NormalSpeed,
         };
 
         /** Specifies a priority for the runner */
@@ -75,7 +75,7 @@
             LowPriority,
             NormalPriority,
             HighPriority,
-            HighestPriority
+            HighestPriority,
         };
 
         /** An ordered list of runners */
@@ -429,7 +429,13 @@
         friend class RunnerManager;
         friend class RunnerManagerPrivate;
 
-        explicit AbstractRunner(QObject *parent = nullptr, const QString &path 
= QString());
+#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 77)
+    KRUNNER_DEPRECATED_VERSION(5, 77, "use AbstractRunner(QObject *, const 
KPluginMetaData &, const QVariantList &)")
+    explicit AbstractRunner(QObject *parent = nullptr, const QString &path = 
QString());
+#else
+    explicit AbstractRunner(QObject *parent = nullptr, const QString &path = 
QString()) = delete;
+#endif
+
 #if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 72)
 #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 0)
          /// @deprecated Since 5.72, use AbstractRunner(const KPluginMetaData 
&, QObject *)
@@ -439,8 +445,13 @@
 #endif
         /// @since 5.72
         explicit AbstractRunner(const KPluginMetaData &pluginMetaData, QObject 
*parent = nullptr);
-
+        /// @since 5.77
+        AbstractRunner(QObject *parent, const KPluginMetaData &pluginMetaData, 
const QVariantList &args);
+#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 77)
+         /// @deprecated Since 5.77, use AbstractRunner(QObject *, const 
KPluginMetaData &, const QVariantList &)
+        KRUNNER_DEPRECATED_VERSION(5, 77, "use AbstractRunner(QObject *, const 
KPluginMetaData &, const QVariantList &)")
         AbstractRunner(QObject *parent, const QVariantList &args);
+#endif
 
         /**
          * Sets whether or not the runner is available for match requests. 
Useful to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/abstractrunner_p.h 
new/krunner-5.77.0/src/abstractrunner_p.h
--- old/krunner-5.76.0/src/abstractrunner_p.h   2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/abstractrunner_p.h   2020-12-05 11:13:52.000000000 
+0100
@@ -34,8 +34,9 @@
 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 72) && 
KSERVICE_BUILD_DEPRECATED_SINCE(5, 0)
     void init(const KService::Ptr service);
 #endif
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
     void init(const QString &path);
-
+#endif
     AbstractRunner::Priority priority;
     AbstractRunner::Speed speed;
     RunnerContext::Types blackListed;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/declarative/runnermodel.h 
new/krunner-5.77.0/src/declarative/runnermodel.h
--- old/krunner-5.76.0/src/declarative/runnermodel.h    2020-11-07 
13:04:28.000000000 +0100
+++ new/krunner-5.77.0/src/declarative/runnermodel.h    2020-12-05 
11:13:52.000000000 +0100
@@ -64,7 +64,7 @@
         Enabled,
         RunnerId,
         RunnerName,
-        Actions
+        Actions,
     };
 
     RunnerModel(QObject *parent = nullptr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/querymatch.h 
new/krunner-5.77.0/src/querymatch.h
--- old/krunner-5.76.0/src/querymatch.h 2020-11-07 13:04:28.000000000 +0100
+++ new/krunner-5.77.0/src/querymatch.h 2020-12-05 11:13:52.000000000 +0100
@@ -54,7 +54,7 @@
                                  while typing. They must be explicitly 
selected to
                                  be activated, but unlike InformationalMatch 
cause
                                  an action to be triggered. */
-            ExactMatch = 100 /**< An exact match to the query */
+            ExactMatch = 100, /**< An exact match to the query */
         };
 
         /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/runnercontext.cpp 
new/krunner-5.77.0/src/runnercontext.cpp
--- old/krunner-5.76.0/src/runnercontext.cpp    2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/runnercontext.cpp    2020-12-05 11:13:52.000000000 
+0100
@@ -130,9 +130,22 @@
             q = &s_dummyContext;
         }
 
+        QueryMatch* findMatchById(const QString &id)
+        {
+            QueryMatch *match = nullptr;
+            lock.lockForRead();
+            for (auto &matchEntry : matches) {
+                if (matchEntry.id() == id) {
+                    match = &matchEntry;
+                    break;
+                }
+            }
+            lock.unlock();
+            return match;
+        }
+
         QReadWriteLock lock;
         QList<QueryMatch> matches;
-        QMap<QString, const QueryMatch*> matchesById;
         QHash<QString, int> launchCounts;
         QString term;
         QString mimeType;
@@ -201,7 +214,6 @@
     // ref count was 1 (e.g. only the RunnerContext is using
     // the dptr) then we won't get a copy made
     if (!d->matches.isEmpty()) {
-        d->matchesById.clear();
         d->matches.clear();
         Q_EMIT matchesChanged();
     }
@@ -287,7 +299,6 @@
         }
 
         d->matches.append(match);
-        d->matchesById.insert(match.id(), &d->matches.at(d->matches.size() - 
1));
     }
     UNLOCK(d);
     // A copied searchContext may share the d pointer,
@@ -314,7 +325,6 @@
     }
 
     d->matches.append(m);
-    d->matchesById.insert(m.id(), &d->matches.at(d->matches.size() - 1));
     UNLOCK(d);
     Q_EMIT d->q->matchesChanged();
 
@@ -323,39 +333,14 @@
 
 bool RunnerContext::removeMatches(const QStringList matchIdList)
 {
-    if (!isValid()) {
-        return false;
-    }
-
-    QStringList presentMatchIdList;
-    QList<const QueryMatch*> presentMatchList;
-
-    LOCK_FOR_READ(d)
-    for (const QString &matchId : matchIdList) {
-        const QueryMatch* match = d->matchesById.value(matchId, nullptr);
-        if (match) {
-            presentMatchList << match;
-            presentMatchIdList << matchId;
+    bool success = false;
+    for (const QString &id : matchIdList) {
+        if (removeMatch(id)) {
+            success = true;
         }
     }
-    UNLOCK(d)
-
-    if (presentMatchIdList.isEmpty()) {
-        return false;
-    }
-
-    LOCK_FOR_WRITE(d)
-    for (const QueryMatch *match : qAsConst(presentMatchList)) {
-        d->matches.removeAll(*match);
-    }
-    for (const QString &matchId : qAsConst(presentMatchIdList)) {
-        d->matchesById.remove(matchId);
-    }
-    UNLOCK(d)
 
-    Q_EMIT d->q->matchesChanged();
-
-    return true;
+    return success;
 }
 
 bool RunnerContext::removeMatch(const QString matchId)
@@ -364,14 +349,13 @@
         return false;
     }
     LOCK_FOR_READ(d)
-    const QueryMatch* match = d->matchesById.value(matchId, nullptr);
+    const QueryMatch* match = d->findMatchById(matchId);
     UNLOCK(d)
     if (!match) {
         return false;
     }
     LOCK_FOR_WRITE(d)
     d->matches.removeAll(*match);
-    d->matchesById.remove(matchId);
     UNLOCK(d)
     Q_EMIT d->q->matchesChanged();
 
@@ -400,7 +384,6 @@
 
     LOCK_FOR_WRITE(d)
     for (const QueryMatch &match : qAsConst(presentMatchList)) {
-        d->matchesById.remove(match.id());
         d->matches.removeAll(match);
     }
     UNLOCK(d)
@@ -420,14 +403,9 @@
 QueryMatch RunnerContext::match(const QString &id) const
 {
     LOCK_FOR_READ(d)
-    const QueryMatch *match = d->matchesById.value(id, nullptr);
+    const QueryMatch *match = d->findMatchById(id);
     UNLOCK(d)
-
-    if (match) {
-        return *match;
-    }
-
-    return QueryMatch(nullptr);
+    return match ? *match : QueryMatch(nullptr);
 }
 
 void RunnerContext::setSingleRunnerQueryMode(bool enabled)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/runnercontext.h 
new/krunner-5.77.0/src/runnercontext.h
--- old/krunner-5.76.0/src/runnercontext.h      2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/runnercontext.h      2020-12-05 11:13:52.000000000 
+0100
@@ -43,7 +43,7 @@
             Executable = 16,
             ShellCommand = 32,
             Help = 64,
-            FileSystem = Directory | File | Executable | ShellCommand
+            FileSystem = Directory | File | Executable | ShellCommand,
         };
 
         Q_DECLARE_FLAGS(Types, Type)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/runnermanager.cpp 
new/krunner-5.77.0/src/runnermanager.cpp
--- old/krunner-5.76.0/src/runnermanager.cpp    2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/runnermanager.cpp    2020-12-05 11:13:52.000000000 
+0100
@@ -159,8 +159,7 @@
             clearSingleRunner();
         }
 
-        AbstractRunner *loadedRunner = q->runner(singleModeRunnerId);
-        if (loadedRunner) {
+        if (AbstractRunner *loadedRunner = q->runner(singleModeRunnerId)) {
             singleRunnerWasLoaded = false;
             currentSingleRunner = loadedRunner;
             return;
@@ -342,13 +341,14 @@
             KPluginLoader pluginLoader(pluginMetaData.fileName());
             const quint64 pluginVersion = pluginLoader.pluginVersion();
             if (Plasma::isPluginVersionCompatible(pluginVersion)) {
-                KPluginFactory *factory = pluginLoader.factory();
-                if (factory) {
+                if (KPluginFactory *factory = pluginLoader.factory()) {
                     const QVariantList args {
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
 #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 0)
                         pluginMetaData.metaDataFileName(),
 #endif
                         QVariant::fromValue(pluginMetaData),
+#endif
                     };
                     runner = factory->create<AbstractRunner>(q, args);
                 } else {
@@ -455,9 +455,7 @@
             return;
         }
 
-        AbstractRunner *runner = qobject_cast<AbstractRunner *>(q->sender());
-
-        if (runner) {
+        if (auto *runner = qobject_cast<AbstractRunner *>(q->sender())) {
             startJob(runner);
         }
     }
@@ -610,13 +608,13 @@
 {
     const QString runnerName = pluginMetaData.pluginId();
     if (!runnerName.isEmpty() && !d->runners.contains(runnerName)) {
-        AbstractRunner *runner = d->loadInstalledRunner(pluginMetaData);
-        if (runner) {
+        if (AbstractRunner *runner = d->loadInstalledRunner(pluginMetaData)) {
             d->runners.insert(runnerName, runner);
         }
     }
 }
 
+#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77)
 void RunnerManager::loadRunner(const QString &path)
 {
     if (!d->runners.contains(path)) {
@@ -625,6 +623,7 @@
         d->runners.insert(path, runner);
     }
 }
+#endif
 
 AbstractRunner* RunnerManager::runner(const QString &name) const
 {
@@ -739,8 +738,7 @@
 
 QList<QAction*> RunnerManager::actionsForMatch(const QueryMatch &match)
 {
-    AbstractRunner *runner = match.runner();
-    if (runner) {
+    if (AbstractRunner *runner = match.runner()) {
         return runner->actionsForMatch(match);
     }
 
@@ -755,12 +753,7 @@
 
 QMimeData * RunnerManager::mimeDataForMatch(const QueryMatch &match) const
 {
-    AbstractRunner *runner = match.runner();
-    if (runner) {
-        return runner->mimeDataForMatch(match);
-    }
-
-    return nullptr;
+    return match.isValid() ? match.runner()->mimeDataForMatch(match) : nullptr;
 }
 
 QVector<KPluginMetaData> RunnerManager::runnerMetaDataList(const QString 
&parentApp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/src/runnermanager.h 
new/krunner-5.77.0/src/runnermanager.h
--- old/krunner-5.76.0/src/runnermanager.h      2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/src/runnermanager.h      2020-12-05 11:13:52.000000000 
+0100
@@ -200,6 +200,7 @@
          */
         void loadRunner(const KPluginMetaData &pluginMetaData);
 
+#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 77)
         /**
          * Attempts to add the AbstractRunner from a Plasma::Package on disk.
          * Usually one can simply let the configuration of plugins
@@ -208,8 +209,11 @@
          *
          * @param path the path to a Runner package to load
          * @since 4.5
+         * @deprecated Since 5.0, the KPackage support was removed in Plasma 
5.0
          */
+        KRUNNER_DEPRECATED_VERSION_BELATED(5, 77, 5, 0,  "the KPackage support 
was removed in Plasma 5.0")
         void loadRunner(const QString &path);
+#endif
 
         /**
          * @return the list of allowed plugins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/krunner-5.76.0/templates/runnerpython/runnerpy.kdevtemplate 
new/krunner-5.77.0/templates/runnerpython/runnerpy.kdevtemplate
--- old/krunner-5.76.0/templates/runnerpython/runnerpy.kdevtemplate     
2020-11-07 13:04:28.000000000 +0100
+++ new/krunner-5.77.0/templates/runnerpython/runnerpy.kdevtemplate     
2020-12-05 11:13:52.000000000 +0100
@@ -10,6 +10,7 @@
 Name[es]=Complemento en Python para KRunner
 Name[et]=Pythoni KRunneri plugin
 Name[fr]=module externe « KRunner » pour Python
+Name[ia]=Plugin de KRunner de Python
 Name[it]=Estensione Python di KRunner
 Name[ko]=Python KRunner 플러그인
 Name[nl]=Python KRunner-plug-in
@@ -18,6 +19,7 @@
 Name[pt]='Plugin' do KRunner em Python
 Name[pt_BR]=Plugin Python do KRunner
 Name[ro]=Extensie Python pentru KRunner
+Name[ru]=Расширение KRunner на Python
 Name[sk]=Zásuvný modul Python pre KRunner
 Name[sl]=Vtičnik za Python KRunner
 Name[sv]=Python-insticksprogram för Kör program
@@ -33,6 +35,7 @@
 Comment[es]=Plantilla para un complemento en Python para KRunner que usa D-Bus
 Comment[et]=D-Busi kasutav KRunneri Pythoni plugina mall
 Comment[fr]=Modèle pour le module externe « KRunner » pour Python, utilisant « 
D-Bus »
+Comment[ia]=Patrono per un Plugin de Python de KRunner usante D-Bus
 Comment[it]=Modello per un'estensione Python di KRunner che usa D-Bus
 Comment[ko]=D-Bus를 사용하는 KRunner Python 플러그인 템플릿
 Comment[nl]=Sjabloon voor een Python-plug-in van KRunner met gebruik van D-Bus
@@ -40,6 +43,7 @@
 Comment[pt]=Modelo para um 'Plugin' em Python do KRunner que usa o D-Bus
 Comment[pt_BR]=Modelo para um plugin Python do KRunner usando o D-Bus
 Comment[ro]=Șablon pentru o extensie KRunner în Python folosind DBus
+Comment[ru]=Шаблон расширения KRunner на Python, использующий D-Bus
 Comment[sk]=Šablóna pre KRunner Python plugin využívajúci D-Bus
 Comment[sl]=Predloga za vtičnik Python KRunner z uporabo D-Bus
 Comment[sv]=Mall för ett Python-insticksprogram för Kör program med användning 
av D-Bus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/tests/CMakeLists.txt 
new/krunner-5.77.0/tests/CMakeLists.txt
--- old/krunner-5.76.0/tests/CMakeLists.txt     2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/tests/CMakeLists.txt     2020-12-05 11:13:52.000000000 
+0100
@@ -1,7 +1,3 @@
 add_executable(runnermodeltest runnermodeltest.cpp 
../src/declarative/runnermodel.cpp)
 target_link_libraries(runnermodeltest Qt5::Widgets KF5::Service KF5Runner)
 ecm_mark_as_test(runnermodeltest)
-
-add_executable(runnertest runnertest.cpp)
-target_link_libraries(runnertest Qt5::Widgets KF5::Runner)
-ecm_mark_as_test(runnertest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krunner-5.76.0/tests/runnertest.cpp 
new/krunner-5.77.0/tests/runnertest.cpp
--- old/krunner-5.76.0/tests/runnertest.cpp     2020-11-07 13:04:28.000000000 
+0100
+++ new/krunner-5.77.0/tests/runnertest.cpp     1970-01-01 01:00:00.000000000 
+0100
@@ -1,53 +0,0 @@
-/*
-    SPDX-FileCopyrightText: 2014 Vishesh Handa <[email protected]>
-
-    SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include <QGuiApplication>
-#include <QCommandLineParser>
-#include <QCommandLineOption>
-#include <QDebug>
-
-#include "runnermanager.h"
-
-using namespace Plasma;
-
-int main(int argc, char **argv)
-{
-    QGuiApplication app(argc, argv);
-    app.setQuitLockEnabled(false);
-
-    QCommandLineParser parser;
-    parser.addPositionalArgument(QStringLiteral("query"), 
QStringLiteral("words to query"));
-
-    parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("r") 
<< QStringLiteral("runner"),
-                                        QStringLiteral("Name of the runner"),
-                                        QStringLiteral("runnerName")));
-
-    parser.addHelpOption();
-    parser.process(app);
-
-    QString query = parser.positionalArguments().join(QLatin1Char(' '));
-    if (query.isEmpty()) {
-        parser.showHelp(1);
-    }
-    QString runnerName = parser.value(QStringLiteral("runner"));
-
-    RunnerManager manager;
-
-    QList<Plasma::QueryMatch> matches;
-    QObject::connect(&manager, &RunnerManager::matchesChanged, [&](const 
QList<Plasma::QueryMatch>& list) {
-        matches = list;
-    });
-    QObject::connect(&manager, &RunnerManager::queryFinished, [&]() {
-        qDebug() << "Found matches:";
-        for (const auto& match : qAsConst(matches)) {
-            qDebug() << match.matchCategory() << match.text();
-        }
-        app.quit();
-    });
-
-    manager.launchQuery(query, runnerName);
-    return app.exec();
-}
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to