Commit 42068e17 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau Committed by Alexander Lohnau
Browse files

Runners: port to KPluginMetaData argument using AbstractRunner constructor

parent 2a9100b5
......@@ -5,7 +5,7 @@ set(PROJECT_VERSION "5.20.80")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.74")
set(KF5_MIN_VERSION "5.77")
set(INSTALL_SDDM_THEME TRUE)
set(CMAKE_CXX_STANDARD 17)
......
......@@ -24,8 +24,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(ActivityRunner, "plasma-runner-activityrunner.json")
ActivityRunner::ActivityRunner(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args),
ActivityRunner::ActivityRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args),
m_activities(new KActivities::Controller(this)),
m_consumer(new KActivities::Consumer(this)),
m_keywordi18n(i18nc("KRunner keyword", "activity")),
......
......@@ -30,7 +30,7 @@ class ActivityRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
ActivityRunner(QObject *parent, const QVariantList &args);
ActivityRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~ActivityRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -35,8 +35,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(InstallerRunner, "plasma-runner-appstream.json")
InstallerRunner::InstallerRunner(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
InstallerRunner::InstallerRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("Installation Suggestions"));
setPriority(AbstractRunner::HighestPriority);
......
......@@ -30,7 +30,7 @@ class InstallerRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
InstallerRunner(QObject *parent, const QVariantList &args);
InstallerRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~InstallerRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -93,6 +93,7 @@ Type=Service
X-KDE-ServiceTypes=Plasma/Runner
X-KDE-PluginInfo-Author=Aleix Pol Gonzalez
X-KDE-PluginInfo-Email=aleixpol@blue-systems.com
X-KDE-PluginInfo-Name=appstream
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
......@@ -39,8 +39,10 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(BookmarksRunner, "plasma-runner-bookmarks.json")
BookmarksRunner::BookmarksRunner( QObject* parent, const QVariantList &args )
: Plasma::AbstractRunner(parent, args), m_browser(nullptr), m_browserFactory(new BrowserFactory(this))
BookmarksRunner::BookmarksRunner(QObject* parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
, m_browser(nullptr)
, m_browserFactory(new BrowserFactory(this))
{
setObjectName(QStringLiteral("Bookmarks"));
addSyntax(Plasma::RunnerSyntax(QStringLiteral(":q:"), i18n("Finds web browser bookmarks matching :q:.")));
......
......@@ -34,7 +34,7 @@ class BookmarksRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
BookmarksRunner(QObject* parent, const QVariantList &args);
BookmarksRunner(QObject* parent, const KPluginMetaData &metaData, const QVariantList &args);
~BookmarksRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -38,8 +38,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(CalculatorRunner, "plasma-runner-calculator.json")
CalculatorRunner::CalculatorRunner(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
CalculatorRunner::CalculatorRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
{
#ifdef ENABLE_QALCULATE
m_engine = new QalculateEngine;
......
......@@ -36,7 +36,7 @@ class CalculatorRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
CalculatorRunner(QObject *parent, const QVariantList &args);
CalculatorRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~CalculatorRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -33,8 +33,9 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(KillRunner, "plasma-runner-kill.json")
KillRunner::KillRunner(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args), m_processes(nullptr)
KillRunner::KillRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
, m_processes(nullptr)
{
setObjectName(QStringLiteral("Kill Runner"));
......
......@@ -40,7 +40,7 @@ class KillRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
KillRunner(QObject *parent, const QVariantList &args);
KillRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~KillRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -36,8 +36,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(LocationsRunner, "plasma-runner-locations.json")
LocationsRunner::LocationsRunner(QObject *parent, const QVariantList& args)
: Plasma::AbstractRunner(parent, args)
LocationsRunner::LocationsRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList& args)
: Plasma::AbstractRunner(parent, metaData, args)
{
// set the name shown after the result in krunner window
setObjectName(QStringLiteral("Locations"));
......
......@@ -26,7 +26,7 @@ class LocationsRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
LocationsRunner(QObject *parent, const QVariantList& args);
LocationsRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList& args);
~LocationsRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -33,8 +33,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(PlacesRunner, "plasma-runner-places.json")
//Q_DECLARE_METATYPE(Plasma::RunnerContext)
PlacesRunner::PlacesRunner(QObject* parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
PlacesRunner::PlacesRunner(QObject* parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("Places"));
Plasma::RunnerSyntax defaultSyntax(i18n("places"), i18n("Lists all file manager locations"));
......
......@@ -47,7 +47,7 @@ class PlacesRunner : public Plasma::AbstractRunner
Q_OBJECT
public:
PlacesRunner(QObject* parent, const QVariantList &args);
PlacesRunner(QObject* parent, const KPluginMetaData &metaData, const QVariantList &args);
~PlacesRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -33,8 +33,8 @@
K_EXPORT_PLASMA_RUNNER_WITH_JSON(PowerDevilRunner, "plasma-runner-powerdevil.json")
PowerDevilRunner::PowerDevilRunner(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
PowerDevilRunner::PowerDevilRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("PowerDevil"));
updateStatus();
......
......@@ -27,7 +27,7 @@ class PowerDevilRunner : public Plasma::AbstractRunner
{
Q_OBJECT
public:
PowerDevilRunner( QObject *parent, const QVariantList &args );
PowerDevilRunner( QObject *parent, const KPluginMetaData &metaData, const QVariantList &args );
~PowerDevilRunner() override;
void match(Plasma::RunnerContext &context) override;
......
......@@ -38,8 +38,8 @@ using namespace KActivities::Stats::Terms;
K_EXPORT_PLASMA_RUNNER_WITH_JSON(RecentDocuments, "plasma-runner-recentdocuments.json")
RecentDocuments::RecentDocuments(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
RecentDocuments::RecentDocuments(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("Recent Documents"));
......
......@@ -28,7 +28,7 @@ class RecentDocuments : public Plasma::AbstractRunner {
Q_OBJECT
public:
RecentDocuments( QObject *parent, const QVariantList& args );
RecentDocuments( QObject *parent, const KPluginMetaData &metaData, const QVariantList& args );
~RecentDocuments() override;
void match(Plasma::RunnerContext &context) override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment