diff --git a/pass.cpp b/pass.cpp index bc8d13a..12b9856 100644 --- a/pass.cpp +++ b/pass.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -84,11 +85,9 @@ void Pass::reloadConfiguration() #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) auto icon = QIcon::fromTheme(passAction.icon, QIcon::fromTheme("object-unlocked")); - //KRunner::Action(actionId, QStringLiteral("process-stop"), i18n("Send SIGKILL")), auto *act = new QAction(icon, passAction.name, this); act->setData(passAction.regex); #else - actionIdCounter++; auto *act = new KRunner::Action(passAction.regex, QIcon::hasThemeIcon(passAction.icon) ? passAction.icon : QStringLiteral("object-unlocked"), passAction.name); #endif diff --git a/pass.h b/pass.h index eddcdd3..551cae9 100644 --- a/pass.h +++ b/pass.h @@ -50,7 +50,10 @@ public: void clip(const QString &msg); void match(KRunner::RunnerContext &) override; void run(const KRunner::RunnerContext &, const KRunner::QueryMatch &) override; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QList actionsForMatch(const KRunner::QueryMatch &) override; +#endif + void reloadConfiguration() override; @@ -71,7 +74,11 @@ private: QFileSystemWatcher watcher; bool showActions; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QList orderedActions; +#else + QList orderedActions; +#endif const QRegularExpression queryPrefix = QRegularExpression("^pass( .+)?$"); };