generic: adjust to runners changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-18 05:15:44 +03:00
parent f78ce0a379
commit 9b267f5808
10 changed files with 12 additions and 17 deletions

View file

@ -292,9 +292,8 @@ void ConverterRunner::match(Plasma::RunnerContext &context)
} }
} }
void ConverterRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) void ConverterRunner::run(const Plasma::QueryMatch &match)
{ {
Q_UNUSED(context)
#warning TODO: notify the user that the data has been copied to the clipboard #warning TODO: notify the user that the data has been copied to the clipboard
// other runners silently do the same (e.g. spellcheck), how would the user know what just happened? // other runners silently do the same (e.g. spellcheck), how would the user know what just happened?
const QString data = match.data().toString(); const QString data = match.data().toString();

View file

@ -32,7 +32,7 @@ public:
~ConverterRunner(); ~ConverterRunner();
void match(Plasma::RunnerContext &context); void match(Plasma::RunnerContext &context);
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); void run(const Plasma::QueryMatch &match);
private: private:
QStringList m_separators; QStringList m_separators;

View file

@ -159,9 +159,8 @@ void KateSessions::match(Plasma::RunnerContext &context)
} }
} }
void KateSessions::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) void KateSessions::run(const Plasma::QueryMatch &match)
{ {
Q_UNUSED(context)
QString session = match.data().toString(); QString session = match.data().toString();
kDebug() << "Open Kate Session " << session; kDebug() << "Open Kate Session " << session;

View file

@ -32,7 +32,7 @@ class KateSessions : public Plasma::AbstractRunner {
~KateSessions(); ~KateSessions();
void match(Plasma::RunnerContext &context); void match(Plasma::RunnerContext &context);
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); void run(const Plasma::QueryMatch &match);
private Q_SLOTS: private Q_SLOTS:
void loadSessions(); void loadSessions();

View file

@ -137,9 +137,8 @@ void KonsoleSessions::match(Plasma::RunnerContext &context)
} }
} }
void KonsoleSessions::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) void KonsoleSessions::run(const Plasma::QueryMatch &match)
{ {
Q_UNUSED(context)
const QString session = match.data().toString(); const QString session = match.data().toString();
kDebug() << "Open Konsole Session " << session; kDebug() << "Open Konsole Session " << session;

View file

@ -33,10 +33,11 @@ public:
~KonsoleSessions(); ~KonsoleSessions();
void match(Plasma::RunnerContext &context); void match(Plasma::RunnerContext &context);
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); void run(const Plasma::QueryMatch &match);
protected slots: protected slots:
void loadSessions(); void loadSessions();
private: private:
KIcon m_icon; KIcon m_icon;
QHash<QString, QString> m_sessions; QHash<QString, QString> m_sessions;

View file

@ -115,10 +115,9 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
} }
} }
void SpellCheckRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) void SpellCheckRunner::run(const Plasma::QueryMatch &match)
{ {
Q_UNUSED(context) // Copy words to clipboard
//Copy words to clipboard
kapp->clipboard()->setText(match.data().toString()); kapp->clipboard()->setText(match.data().toString());
} }

View file

@ -35,7 +35,7 @@ public:
SpellCheckRunner(QObject* parent, const QVariantList &args); SpellCheckRunner(QObject* parent, const QVariantList &args);
void match(Plasma::RunnerContext &context); void match(Plasma::RunnerContext &context);
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action); void run(const Plasma::QueryMatch &action);
void reloadConfiguration(); void reloadConfiguration();

View file

@ -78,10 +78,8 @@ void KEmuControlRunner::match(Plasma::RunnerContext &context)
} }
} }
void KEmuControlRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) void KEmuControlRunner::run(const Plasma::QueryMatch &match)
{ {
Q_UNUSED(context)
const QStringList data = match.data().toStringList(); const QStringList data = match.data().toStringList();
Q_ASSERT(data.size() == 2); Q_ASSERT(data.size() == 2);
const QString command = data.at(0); const QString command = data.at(0);

View file

@ -30,7 +30,7 @@ public:
~KEmuControlRunner(); ~KEmuControlRunner();
void match(Plasma::RunnerContext &context); void match(Plasma::RunnerContext &context);
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); void run(const Plasma::QueryMatch &match);
}; };
K_EXPORT_PLASMA_RUNNER(kemucontrol, KEmuControlRunner) K_EXPORT_PLASMA_RUNNER(kemucontrol, KEmuControlRunner)