Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package krunner for openSUSE:Factory checked in at 2021-04-12 12:34:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/krunner (Old) and /work/SRC/openSUSE:Factory/.krunner.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "krunner" Mon Apr 12 12:34:43 2021 rev:88 rq:884285 version:5.81.0 Changes: -------- --- /work/SRC/openSUSE:Factory/krunner/krunner.changes 2021-03-16 15:42:26.888849337 +0100 +++ /work/SRC/openSUSE:Factory/.krunner.new.2401/krunner.changes 2021-04-12 12:36:48.849330875 +0200 @@ -1,0 +2,12 @@ +Mon Apr 5 07:12:45 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.81.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.81.0 +- Changes since 5.80.0: + * autotests: Add tests for RunnerManager history functionality + * Deprecate concept of delayed runners & related methods + * Deprecate methods to remove matches in RunnerContext + +------------------------------------------------------------------- Old: ---- krunner-5.80.0.tar.xz krunner-5.80.0.tar.xz.sig New: ---- krunner-5.81.0.tar.xz krunner-5.81.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ krunner.spec ++++++ --- /var/tmp/diff_new_pack.tZwtet/_old 2021-04-12 12:36:49.465331592 +0200 +++ /var/tmp/diff_new_pack.tZwtet/_new 2021-04-12 12:36:49.469331596 +0200 @@ -17,7 +17,7 @@ %define lname libKF5Runner5 -%define _tar_path 5.80 +%define _tar_path 5.81 # 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.80.0 +Version: 5.81.0 Release: 0 Summary: KDE Framework for providing different actions given a string query License: LGPL-2.1-or-later ++++++ krunner-5.80.0.tar.xz -> krunner-5.81.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/CMakeLists.txt new/krunner-5.81.0/CMakeLists.txt --- old/krunner-5.80.0/CMakeLists.txt 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/CMakeLists.txt 2021-04-03 11:37:00.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.5) -set(KF_VERSION "5.80.0") # handled by release scripts -set(KF_DEP_VERSION "5.80.0") # handled by release scripts +set(KF_VERSION "5.81.0") # handled by release scripts +set(KF_DEP_VERSION "5.81.0") # handled by release scripts project(KRunner VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.80.0 NO_MODULE) +find_package(ECM 5.81.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,7 +24,6 @@ include(KDEPackageAppTemplates) include(ECMQtDeclareLoggingCategory) include(ECMSetupQtPluginMacroNames) -include(KDEClangFormat) include(KDEGitCommitHooks) set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") @@ -72,7 +71,7 @@ ) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054F00) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055000) add_definitions(-DPLASMA_DISABLE_DEPRECATED_BEFORE_AND_AT=0x050500) # needed because we use Plasma::Package in the API add_definitions(-DQT_NO_FOREACH -DQT_NO_KEYWORDS) @@ -121,7 +120,4 @@ 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}) kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/autotests/CMakeLists.txt new/krunner-5.81.0/autotests/CMakeLists.txt --- old/krunner-5.80.0/autotests/CMakeLists.txt 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/autotests/CMakeLists.txt 2021-04-03 11:37:00.000000000 +0200 @@ -2,12 +2,14 @@ include(ECMAddTests) +remove_definitions(-DQT_NO_CAST_FROM_ASCII) + if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.76.0 AND NOT WIN32) ecm_add_tests( - runnercontexttest.cpp - LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner + runnercontexttest.cpp + LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner ) endif() @@ -17,7 +19,13 @@ ) ecm_add_tests( runnermatchmethodstest.cpp - LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner Qt5::Widgets + LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner Qt5::Widgets +) + + +ecm_add_tests( + runnermanagerhistorytest.cpp + LINK_LIBRARIES Qt5::Test KF5::KIOCore KF5Runner Qt5::Widgets ) set(demoapp_SRCS testremoterunner.cpp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/autotests/fakerunner.h new/krunner-5.81.0/autotests/fakerunner.h --- old/krunner-5.80.0/autotests/fakerunner.h 1970-01-01 01:00:00.000000000 +0100 +++ new/krunner-5.81.0/autotests/fakerunner.h 2021-04-03 11:37:00.000000000 +0200 @@ -0,0 +1,17 @@ +/* + SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.loh...@gmx.de> + SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +*/ + +#include "abstractrunner.h" + +using namespace Plasma; + +class FakeRunner : public AbstractRunner +{ +public: + FakeRunner() + : AbstractRunner(nullptr, KPluginMetaData(QStringLiteral("metadata.desktop")), QVariantList()) + { + } +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/autotests/runnermanagerhistorytest.cpp new/krunner-5.81.0/autotests/runnermanagerhistorytest.cpp --- old/krunner-5.80.0/autotests/runnermanagerhistorytest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/krunner-5.81.0/autotests/runnermanagerhistorytest.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -0,0 +1,89 @@ +/* + SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.loh...@gmx.de> + SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +*/ + +#include "fakerunner.h" +#include "runnermanager.h" + +#include <QAction> +#include <QObject> +#include <QProcess> +#include <QStandardPaths> +#include <QTest> + +using namespace Plasma; + +class RunnerManagerHistoryTest : public QObject +{ + Q_OBJECT + +private: + void addToHistory(const QStringList &queries, RunnerManager &manager) + { + FakeRunner runner; + for (const QString &query : queries) { + QueryMatch match(&runner); + // Make sure internally the term and untrimmedTerm are set + manager.launchQuery(query, "thisrunnerdoesnotexist"); + manager.searchContext()->setQuery(query); + manager.runMatch(match); + } + } + +private Q_SLOTS: + void init() + { + QStandardPaths::setTestModeEnabled(true); + QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QDir::separator() + "krunnerstaterc"; + if (QFileInfo::exists(path)) { + QFile::remove(path); + } + } + void testRunnerHistory(); + void testRunnerHistory_data(); + void testHistorySuggestionsAndRemoving(); +}; + +void RunnerManagerHistoryTest::testRunnerHistory() +{ + QFETCH(const QStringList, queries); + QFETCH(const QStringList, expectedEntries); + + RunnerManager manager; + addToHistory(queries, manager); + QCOMPARE(manager.history(), expectedEntries); +} + +void RunnerManagerHistoryTest::testRunnerHistory_data() +{ + QTest::addColumn<QStringList>("queries"); + QTest::addColumn<QStringList>("expectedEntries"); + + QTest::newRow("should add simple entry to history") << QStringList{"test"} << QStringList{"test"}; + QTest::newRow("should not add entry that starts with space") << QStringList{" test"} << QStringList{}; + QTest::newRow("should not add duplicate entries") << QStringList{"test", "test"} << QStringList{"test"}; + QTest::newRow("should not add duplicate entries but put last run at beginning") << QStringList{"test", "test2", "test"} << QStringList{"test", "test2"}; +} + +void RunnerManagerHistoryTest::testHistorySuggestionsAndRemoving() +{ + RunnerManager manager; + const QStringList queries = {"test1", "test2", "test3"}; + addToHistory(queries, manager); + QStringList expectedBeforeRemoval = QStringList{"test3", "test2", "test1"}; + QCOMPARE(manager.history(), expectedBeforeRemoval); + QCOMPARE(manager.getHistorySuggestion("t"), "test3"); + QCOMPARE(manager.getHistorySuggestion("doesnotexist"), QString()); + + manager.removeFromHistory(42); + QCOMPARE(manager.history(), expectedBeforeRemoval); + manager.removeFromHistory(0); + QStringList expectedAfterRemoval = QStringList{"test2", "test1"}; + QCOMPARE(manager.history(), expectedAfterRemoval); + QCOMPARE(manager.getHistorySuggestion("t"), "test2"); +} + +QTEST_MAIN(RunnerManagerHistoryTest) + +#include "runnermanagerhistorytest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/autotests/runnermatchmethodstest.cpp new/krunner-5.81.0/autotests/runnermatchmethodstest.cpp --- old/krunner-5.80.0/autotests/runnermatchmethodstest.cpp 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/autotests/runnermatchmethodstest.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -1,9 +1,11 @@ /* - SPDX-FileCopyrightText: 2017 David Edmundson <davidedmund...@kde.org> + SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.loh...@gmx.de> SPDX-License-Identifier: LGPL-2.0-or-later */ +#include "abstractrunner.h" +#include "fakerunner.h" #include "runnermanager.h" #include <QAction> @@ -12,17 +14,9 @@ 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) +inline QueryMatch createMatch(const QString &id, AbstractRunner *r = nullptr) { QueryMatch m(r); m.setId(id); @@ -38,15 +32,17 @@ ~RunnerContextMatchMethodsTest(); RunnerContext *ctx = nullptr; - Runner *runner1; - Runner *runner2; + FakeRunner *runner1; + FakeRunner *runner2; private Q_SLOTS: void init(); void testAdd(); void testAddMulti(); +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void testRemoveMatch(); void testRemoveMatchMulti(); void testRemoveMatchByRunner(); +#endif #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 79) void testGetMatchById(); void testNonExistentMatchIds(); @@ -55,8 +51,8 @@ RunnerContextMatchMethodsTest::RunnerContextMatchMethodsTest() : QObject() - , runner1(new Runner()) - , runner2(new Runner()) + , runner1(new FakeRunner()) + , runner2(new FakeRunner()) { } @@ -89,6 +85,7 @@ QCOMPARE(ctx->matches().count(), 2); } +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void RunnerContextMatchMethodsTest::testRemoveMatch() { QueryMatch m = createMatch(QStringLiteral("m1")); @@ -97,7 +94,9 @@ QVERIFY(ctx->removeMatch(m.id())); QCOMPARE(ctx->matches().count(), 1); } +#endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void RunnerContextMatchMethodsTest::testRemoveMatchByRunner() { QVERIFY(ctx->matches().isEmpty()); @@ -110,7 +109,9 @@ QCOMPARE(ctx->matches().count(), 1); QCOMPARE(ctx->matches().constFirst(), m3); } +#endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void RunnerContextMatchMethodsTest::testRemoveMatchMulti() { QVERIFY(ctx->matches().isEmpty()); @@ -128,6 +129,7 @@ QCOMPARE(ctx->matches().count(), 1); QCOMPARE(ctx->matches().constFirst(), m3); } +#endif #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 79) void RunnerContextMatchMethodsTest::testGetMatchById() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/CMakeLists.txt new/krunner-5.81.0/src/CMakeLists.txt --- old/krunner-5.80.0/src/CMakeLists.txt 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/CMakeLists.txt 2021-04-03 11:37:00.000000000 +0200 @@ -35,7 +35,7 @@ GROUP_BASE_NAME KF VERSION ${KF_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 5.28 5.71 5.72 5.73 5.76 5.77 5.79 + DEPRECATION_VERSIONS 5.28 5.71 5.72 5.73 5.76 5.77 5.79 5.81 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/abstractrunner.cpp new/krunner-5.81.0/src/abstractrunner.cpp --- old/krunner-5.80.0/src/abstractrunner.cpp 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/abstractrunner.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -137,6 +137,7 @@ } #endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void AbstractRunner::performMatch(Plasma::RunnerContext &localContext) { static const int reasonableRunTime = 1500; @@ -169,6 +170,7 @@ } } } +#endif QList<QAction *> AbstractRunner::actionsForMatch(const Plasma::QueryMatch &match) { @@ -240,6 +242,7 @@ } #endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) AbstractRunner::Speed AbstractRunner::speed() const { // the only time the read lock will fail is if we were slow are going to speed up @@ -253,13 +256,16 @@ d->speedLock.unlock(); return s; } +#endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) void AbstractRunner::setSpeed(Speed speed) { d->speedLock.lockForWrite(); d->speed = speed; d->speedLock.unlock(); } +#endif AbstractRunner::Priority AbstractRunner::priority() const { @@ -444,7 +450,9 @@ AbstractRunnerPrivate::AbstractRunnerPrivate(AbstractRunner *r) : priority(AbstractRunner::NormalPriority) +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) , speed(AbstractRunner::NormalSpeed) +#endif , blackListed(RunnerContext::None) , runner(r) , fastRuns(0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/abstractrunner.h new/krunner-5.81.0/src/abstractrunner.h --- old/krunner-5.80.0/src/abstractrunner.h 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/abstractrunner.h 2021-04-03 11:37:00.000000000 +0200 @@ -62,11 +62,13 @@ Q_PROPERTY(QRegularExpression matchRegex READ matchRegex WRITE setMatchRegex) public: +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** Specifies a nominal speed for the runner */ enum Speed { SlowSpeed, NormalSpeed, }; +#endif /** Specifies a priority for the runner */ enum Priority { @@ -85,7 +87,7 @@ /** * This is the main query method. It should trigger creation of * QueryMatch instances through RunnerContext::addMatch and - * RunnerContext::addMatches. It is called internally by performMatch(). + * RunnerContext::addMatches. * * If the runner can run precisely the requested term (RunnerContext::query()), * it should create an exact match by setting the type to RunnerContext::ExactMatch. @@ -133,12 +135,18 @@ */ virtual void match(Plasma::RunnerContext &context); +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * Triggers a call to match. This will call match() internally. * * @param context the search context used in executing this match. + * @deprecated Since 5.81, use match(Plasma::RunnerContext &context) instead. + * This method contains logic to delay slow runners, which is now deprecated. Consequently you + * should call match(Plasma::RunnerContext &context) directly. */ + KRUNNER_DEPRECATED_VERSION(5, 81, "use match(Plasma::RunnerContext &context) instead") void performMatch(Plasma::RunnerContext &context); +#endif #if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 71) /** @@ -202,11 +210,14 @@ virtual QIcon categoryIcon(const QString &category) const; #endif +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * The nominal speed of the runner. * @see setSpeed */ + KRUNNER_DEPRECATED_VERSION(5, 81, "the concept of delayed runners is deprecated, see method docs of setSpeed(Speed) for details") Speed speed() const; +#endif /** * The priority of the runner. @@ -472,13 +483,20 @@ void setHasRunOptions(bool hasRunOptions); #endif +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * Sets the nominal speed of the runner. Only slow runners need * to call this within their constructor because the default * speed is NormalSpeed. Runners that use D-Bus should call * this within their constructors. + * @deprecated Since 5.81, the concept of delayed runners is deprecated. + * If you have resource or memory intensive tasks consider porting the runner to a D-Bus runner. + * Otherwise you can set the priority of the runner to LowPriority and implement the wait using a QTimer and an + * event loop. It is important to check if the RunnerContext is still valid after the waiting interval. */ + KRUNNER_DEPRECATED_VERSION(5, 81, "the concept of delayed runners is deprecated, see method docs for porting instructions") void setSpeed(Speed newSpeed); +#endif /** * Sets the priority of the runner. Lower priority runners are executed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/abstractrunner_p.h new/krunner-5.81.0/src/abstractrunner_p.h --- old/krunner-5.80.0/src/abstractrunner_p.h 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/abstractrunner_p.h 2021-04-03 11:37:00.000000000 +0200 @@ -37,7 +37,9 @@ void init(const QString &path); #endif AbstractRunner::Priority priority; +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) AbstractRunner::Speed speed; +#endif RunnerContext::Types blackListed; KPluginMetaData runnerDescription; AbstractRunner *runner; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/runnercontext.cpp new/krunner-5.81.0/src/runnercontext.cpp --- old/krunner-5.80.0/src/runnercontext.cpp 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/runnercontext.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -126,6 +126,7 @@ q = &s_dummyContext; } +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) QueryMatch *findMatchById(const QString &id) { QueryMatch *match = nullptr; @@ -139,6 +140,7 @@ lock.unlock(); return match; } +#endif QReadWriteLock lock; QList<QueryMatch> matches; @@ -327,6 +329,7 @@ return true; } +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) bool RunnerContext::removeMatches(const QStringList matchIdList) { bool success = false; @@ -338,7 +341,9 @@ return success; } +#endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) bool RunnerContext::removeMatch(const QString matchId) { if (!isValid()) { @@ -357,7 +362,9 @@ return true; } +#endif +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) bool RunnerContext::removeMatches(Plasma::AbstractRunner *runner) { if (!isValid()) { @@ -387,6 +394,7 @@ Q_EMIT d->q->matchesChanged(); return true; } +#endif QList<QueryMatch> RunnerContext::matches() const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/runnercontext.h new/krunner-5.81.0/src/runnercontext.h --- old/krunner-5.80.0/src/runnercontext.h 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/runnercontext.h 2021-04-03 11:37:00.000000000 +0200 @@ -163,6 +163,7 @@ */ bool addMatch(const QueryMatch &match); +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * Removes a match from the existing list of matches. * @@ -172,9 +173,13 @@ * * @return true if the match was removed, false otherwise. * @since 4.4 + * @deprecated Since 5.81, feature is unused, aggregate and filter the matches before adding them to the runnercontext instead */ + KRUNNER_DEPRECATED_VERSION(5, 81, "feature is unused, aggregate and filter the matches before adding them to the runnercontext instead") bool removeMatch(const QString matchId); +#endif +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * Removes lists of matches from the existing list of matches. * @@ -184,9 +189,13 @@ * * @return true if at least one match was removed, false otherwise. * @since 4.4 + * @deprecated Since 5.81, feature is unused, aggregate and filter the matches before adding them to the runnercontext instead */ + KRUNNER_DEPRECATED_VERSION(5, 81, "feature is unused, aggregate and filter the matches before adding them to the runnercontext instead") bool removeMatches(const QStringList matchIdList); +#endif +#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 81) /** * Removes lists of matches from a given AbstractRunner * @@ -196,8 +205,11 @@ * * @return true if at least one match was removed, false otherwise. * @since 4.10 + * @deprecated Since 5.81, feature is unused, aggregate and filter the matches before adding them to the runnercontext instead */ + KRUNNER_DEPRECATED_VERSION(5, 81, "feature is unused, aggregate and filter the matches before adding them to the runnercontext instead") bool removeMatches(AbstractRunner *runner); +#endif /** * Retrieves all available matches for the current search term. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/runnerjobs.cpp new/krunner-5.81.0/src/runnerjobs.cpp --- old/krunner-5.80.0/src/runnerjobs.cpp 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/runnerjobs.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -18,6 +18,7 @@ namespace Plasma { +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) DelayedRunnerPolicy::DelayedRunnerPolicy() : QueuePolicy() { @@ -58,6 +59,7 @@ { Q_UNUSED(job) } +#endif DefaultRunnerPolicy::DefaultRunnerPolicy() : QueuePolicy() @@ -114,35 +116,28 @@ : ThreadWeaver::Job() , m_context(*context, nullptr) , m_runner(runner) - , m_timer(nullptr) { QMutexLocker l(mutex()); Q_UNUSED(l); +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) if (runner->speed() == Plasma::AbstractRunner::SlowSpeed) { assignQueuePolicy(&DelayedRunnerPolicy::instance()); } else { assignQueuePolicy(&DefaultRunnerPolicy::instance()); } +#else + assignQueuePolicy(&DefaultRunnerPolicy::instance()); +#endif } FindMatchesJob::~FindMatchesJob() { } -QTimer *FindMatchesJob::delayTimer() const -{ - return m_timer; -} - -void FindMatchesJob::setDelayTimer(QTimer *timer) -{ - m_timer = timer; -} - void FindMatchesJob::run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *) { if (m_context.isValid()) { - m_runner->performMatch(m_context); + m_runner->match(m_context); } Q_EMIT done(self); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/runnerjobs_p.h new/krunner-5.81.0/src/runnerjobs_p.h --- old/krunner-5.80.0/src/runnerjobs_p.h 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/runnerjobs_p.h 2021-04-03 11:37:00.000000000 +0200 @@ -23,6 +23,7 @@ namespace Plasma { +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) // Queue policies // QueuePolicy that only allows a job to be executed after @@ -43,6 +44,7 @@ DelayedRunnerPolicy(); QMutex m_mutex; }; +#endif // QueuePolicy that limits the instances of a particular runner class DefaultRunnerPolicy : public ThreadWeaver::QueuePolicy @@ -88,8 +90,16 @@ int priority() const override; Plasma::AbstractRunner *runner() const; - QTimer *delayTimer() const; - void setDelayTimer(QTimer *timer); +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) + QTimer *delayTimer() const + { + return m_timer; + } + void setDelayTimer(QTimer *timer) + { + m_timer = timer; + } +#endif Q_SIGNALS: void done(ThreadWeaver::JobPointer self); @@ -100,7 +110,9 @@ private: Plasma::RunnerContext m_context; Plasma::AbstractRunner *m_runner; - QTimer *m_timer; +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) + QTimer *m_timer = nullptr; +#endif }; class DelayedJobCleaner : public QObject diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/src/runnermanager.cpp new/krunner-5.81.0/src/runnermanager.cpp --- old/krunner-5.80.0/src/runnermanager.cpp 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/src/runnermanager.cpp 2021-04-03 11:37:00.000000000 +0200 @@ -427,9 +427,12 @@ #endif QSharedPointer<FindMatchesJob> job(new FindMatchesJob(runner, &context, Queue::instance())); QObject::connect(job.data(), SIGNAL(done(ThreadWeaver::JobPointer)), q, SLOT(jobDone(ThreadWeaver::JobPointer))); + +#if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) if (runner->speed() == AbstractRunner::SlowSpeed) { job->setDelayTimer(&delayTimer); } +#endif Queue::instance()->enqueue(job); searchJobs.insert(job); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/krunner-5.80.0/templates/runnerpython/runnerpy.kdevtemplate new/krunner-5.81.0/templates/runnerpython/runnerpy.kdevtemplate --- old/krunner-5.80.0/templates/runnerpython/runnerpy.kdevtemplate 2021-03-01 20:22:02.000000000 +0100 +++ new/krunner-5.81.0/templates/runnerpython/runnerpy.kdevtemplate 2021-04-03 11:37:00.000000000 +0200 @@ -28,6 +28,7 @@ Name[sv]=Python-insticksprogram f??r K??r program Name[uk]=?????????????? ???? KRunner ?????????? Python Name[x-test]=xxPython KRunner Pluginxx +Name[zh_CN]=Python KRunner ?????? Comment=Template for a KRunner Python Plugin using D-Bus Comment[az]=D-Bus il?? istifad?? olunan KRunner Python Qo??mas?? ??????n n??mun?? Comment[ca]=Plantilla per a un connector Python del KRunner usant D-Bus @@ -55,4 +56,5 @@ Comment[sv]=Mall f??r ett Python-insticksprogram f??r K??r program med anv??ndning av D-Bus Comment[uk]=???????????? ?????? ?????????????? Python KRunner ?? ?????????????????????????? D-Bus Comment[x-test]=xxTemplate for a KRunner Python Plugin using D-Busxx +Comment[zh_CN]=?????? D-Bus ??? KRunner Python ???????????? Category=Plasma/KRunner