Commit 391beb17 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove "Plasma" namespace from KRunner plugins

By setting the deprecation version for KRunner to 5.91,
the negated deprecation wrapper will evaulate to true and
we get compatibility typedefs.

This way we do not need to add the typedefs manually or
add `using namespace Plasma` to the plugins.

Task: https://phabricator.kde.org/T15140
parent cb0d2459
Pipeline #122985 passed with stage
in 4 minutes and 46 seconds
add_definitions(-DKRUNNER_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055b00)
if(KF5Baloo_FOUND)
add_subdirectory(baloo)
endif()
......
......@@ -23,13 +23,13 @@
K_PLUGIN_CLASS_WITH_JSON(InstallerRunner, "plasma-runner-appstream.json")
InstallerRunner::InstallerRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("Installation Suggestions"));
// We want to give the other runners time to check if there are matching applications already installed
setPriority(AbstractRunner::LowestPriority);
addSyntax(Plasma::RunnerSyntax(":q:", i18n("Looks for non-installed components according to :q:")));
addSyntax(RunnerSyntax(":q:", i18n("Looks for non-installed components according to :q:")));
setMinLetterCount(3);
}
......@@ -66,7 +66,7 @@ static QIcon componentIcon(const AppStream::Component &comp)
return ret;
}
void InstallerRunner::match(Plasma::RunnerContext &context)
void InstallerRunner::match(RunnerContext &context)
{
// Give the other runners a bit of time to produce results
QEventLoop loop;
......@@ -80,7 +80,7 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
// Check if other plugins have already found an executable, if that is the case we do
// not want to ask the user to install anything else
const QList<Plasma::QueryMatch> matches = context.matches();
const QList<QueryMatch> matches = context.matches();
for (const auto &match : matches) {
if (match.id().startsWith(QLatin1String("exec://"))) {
return;
......@@ -119,8 +119,8 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
if (!servicesFound.isEmpty())
continue;
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::PossibleMatch);
QueryMatch match(this);
match.setType(QueryMatch::PossibleMatch);
match.setId(componentId);
match.setIcon(componentIcon(component));
match.setText(i18n("Get %1…", component.name()));
......@@ -131,7 +131,7 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
}
}
void InstallerRunner::run(const Plasma::RunnerContext & /*context*/, const Plasma::QueryMatch &match)
void InstallerRunner::run(const RunnerContext & /*context*/, const QueryMatch &match)
{
const QUrl appstreamUrl = match.data().toUrl();
if (!QDesktopServices::openUrl(appstreamUrl))
......
......@@ -10,7 +10,7 @@
#include <KRunner/AbstractRunner>
#include <QMutex>
class InstallerRunner : public Plasma::AbstractRunner
class InstallerRunner : public AbstractRunner
{
Q_OBJECT
......@@ -18,8 +18,8 @@ public:
InstallerRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~InstallerRunner() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override;
void match(RunnerContext &context) override;
void run(const RunnerContext &context, const QueryMatch &action) override;
private:
QList<AppStream::Component> findComponentsByString(const QString &query);
......
......@@ -9,7 +9,6 @@
#include "browsers/firefox.h"
using namespace Plasma;
class TestBookmarksMatch : public QObject
{
Q_OBJECT
......
......@@ -12,8 +12,6 @@
#include "favicon.h"
#include <QTest>
using namespace Plasma;
void TestChromeBookmarks::initTestCase()
{
m_configHome = QFINDTESTDATA("chrome-config-home");
......
......@@ -19,33 +19,33 @@ BookmarkMatch::BookmarkMatch(const QIcon &icon, const QString &searchTerm, const
{
}
Plasma::QueryMatch BookmarkMatch::asQueryMatch(Plasma::AbstractRunner *runner)
QueryMatch BookmarkMatch::asQueryMatch(AbstractRunner *runner)
{
Plasma::QueryMatch::Type type;
QueryMatch::Type type;
qreal relevance = 0;
if (m_bookmarkTitle.compare(m_searchTerm, Qt::CaseInsensitive) == 0
|| (!m_description.isEmpty() && m_description.compare(m_searchTerm, Qt::CaseInsensitive) == 0)) {
type = Plasma::QueryMatch::ExactMatch;
type = QueryMatch::ExactMatch;
relevance = 1.0;
} else if (m_bookmarkTitle.contains(m_searchTerm, Qt::CaseInsensitive)) {
type = Plasma::QueryMatch::PossibleMatch;
type = QueryMatch::PossibleMatch;
relevance = 0.45;
} else if (!m_description.isEmpty() && m_description.contains(m_searchTerm, Qt::CaseInsensitive)) {
type = Plasma::QueryMatch::PossibleMatch;
type = QueryMatch::PossibleMatch;
relevance = 0.3;
} else if (m_bookmarkURL.contains(m_searchTerm, Qt::CaseInsensitive)) {
type = Plasma::QueryMatch::PossibleMatch;
type = QueryMatch::PossibleMatch;
relevance = 0.2;
} else {
type = Plasma::QueryMatch::PossibleMatch;
type = QueryMatch::PossibleMatch;
relevance = 0.18;
}
bool isNameEmpty = m_bookmarkTitle.isEmpty();
bool isDescriptionEmpty = m_description.isEmpty();
Plasma::QueryMatch match(runner);
QueryMatch match(runner);
match.setType(type);
match.setRelevance(relevance);
match.setIcon(m_icon);
......
......@@ -21,7 +21,7 @@ public:
const QString &bookmarkURL,
const QString &description = QString());
void addTo(QList<BookmarkMatch> &listOfResults, bool addEvenOnNoMatch);
Plasma::QueryMatch asQueryMatch(Plasma::AbstractRunner *runner);
QueryMatch asQueryMatch(AbstractRunner *runner);
Q_REQUIRED_RESULT QString bookmarkTitle() const
{
......
......@@ -26,15 +26,15 @@
K_PLUGIN_CLASS_WITH_JSON(BookmarksRunner, "plasma-runner-bookmarks.json")
BookmarksRunner::BookmarksRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: 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:.")));
addSyntax(Plasma::RunnerSyntax(i18nc("list of all web browser bookmarks", "bookmarks"), i18n("List all web browser bookmarks")));
addSyntax(RunnerSyntax(QStringLiteral(":q:"), i18n("Finds web browser bookmarks matching :q:.")));
addSyntax(RunnerSyntax(i18nc("list of all web browser bookmarks", "bookmarks"), i18n("List all web browser bookmarks")));
connect(this, &Plasma::AbstractRunner::prepare, this, &BookmarksRunner::prep);
connect(this, &AbstractRunner::prepare, this, &BookmarksRunner::prep);
setMinLetterCount(3);
}
......@@ -45,14 +45,14 @@ void BookmarksRunner::prep()
auto browser = m_browserFactory->find(findBrowserName(), this);
if (m_browser != browser) {
m_browser = browser;
connect(this, &Plasma::AbstractRunner::teardown, dynamic_cast<QObject *>(m_browser), [this]() {
connect(this, &AbstractRunner::teardown, dynamic_cast<QObject *>(m_browser), [this]() {
m_browser->teardown();
});
}
m_browser->prepare();
}
void BookmarksRunner::match(Plasma::RunnerContext &context)
void BookmarksRunner::match(RunnerContext &context)
{
const QString term = context.query();
bool allBookmarks = term.compare(i18nc("list of all konqueror bookmarks", "bookmarks"), Qt::CaseInsensitive) == 0;
......@@ -82,7 +82,7 @@ QString BookmarksRunner::findBrowserName()
return exec;
}
void BookmarksRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action)
void BookmarksRunner::run(const RunnerContext &context, const QueryMatch &action)
{
Q_UNUSED(context);
const QString term = action.data().toString();
......
......@@ -14,7 +14,7 @@ class Browser;
class BrowserFactory;
/** This runner searchs for bookmarks in browsers like Konqueror, Firefox and Opera */
class BookmarksRunner : public Plasma::AbstractRunner
class BookmarksRunner : public AbstractRunner
{
Q_OBJECT
......@@ -22,8 +22,8 @@ public:
BookmarksRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~BookmarksRunner() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override;
void match(RunnerContext &context) override;
void run(const RunnerContext &context, const QueryMatch &action) override;
private:
/** @returns the browser to get the bookmarks from
......
......@@ -31,7 +31,7 @@ void CalculatorRunnerTest::testQuery()
QFETCH(QString, result);
launchQuery(query);
const QList<Plasma::QueryMatch> matches = manager->matches();
const QList<QueryMatch> matches = manager->matches();
QCOMPARE(matches.size(), 1);
QCOMPARE(matches.first().text(), result);
}
......
......@@ -22,7 +22,7 @@
K_PLUGIN_CLASS_WITH_JSON(CalculatorRunner, "plasma-runner-calculator.json")
CalculatorRunner::CalculatorRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: AbstractRunner(parent, metaData, args)
{
m_engine = new QalculateEngine;
......@@ -31,9 +31,9 @@ CalculatorRunner::CalculatorRunner(QObject *parent, const KPluginMetaData &metaD
QString description = i18n(
"Calculates the value of :q: when :q: is made up of numbers and "
"mathematical symbols such as +, -, /, *, ! and ^.");
addSyntax(Plasma::RunnerSyntax(QStringLiteral(":q:"), description));
addSyntax(Plasma::RunnerSyntax(QStringLiteral("=:q:"), description));
addSyntax(Plasma::RunnerSyntax(QStringLiteral(":q:="), description));
addSyntax(RunnerSyntax(QStringLiteral(":q:"), description));
addSyntax(RunnerSyntax(QStringLiteral("=:q:"), description));
addSyntax(RunnerSyntax(QStringLiteral(":q:="), description));
m_actions = {new QAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("Copy to Clipboard"), this)};
setMinLetterCount(2);
......@@ -56,7 +56,7 @@ void CalculatorRunner::userFriendlySubstitutions(QString &cmd)
}
}
void CalculatorRunner::match(Plasma::RunnerContext &context)
void CalculatorRunner::match(RunnerContext &context)
{
const QString term = context.query();
QString cmd = term;
......@@ -69,8 +69,8 @@ void CalculatorRunner::match(Plasma::RunnerContext &context)
}
if (cmd.toLower() == QLatin1String("universe") || cmd.toLower() == QLatin1String("life")) {
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::InformationalMatch);
QueryMatch match(this);
match.setType(QueryMatch::InformationalMatch);
match.setIconName(QStringLiteral("accessories-calculator"));
match.setText(QStringLiteral("42"));
match.setData(QStringLiteral("42"));
......@@ -121,8 +121,8 @@ void CalculatorRunner::match(Plasma::RunnerContext &context)
result = QLatin1String("0x") + QString::number(result.toInt(), 16).toUpper();
}
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::InformationalMatch);
QueryMatch match(this);
match.setType(QueryMatch::InformationalMatch);
match.setIconName(QStringLiteral("accessories-calculator"));
match.setText(result);
if (isApproximate) {
......@@ -148,7 +148,7 @@ QString CalculatorRunner::calculate(const QString &term, bool *isApproximate)
return result.replace(QLatin1Char('.'), QLocale().decimalPoint(), Qt::CaseInsensitive);
}
void CalculatorRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
void CalculatorRunner::run(const RunnerContext &context, const QueryMatch &match)
{
Q_UNUSED(context)
if (match.selectedAction()) {
......@@ -156,7 +156,7 @@ void CalculatorRunner::run(const Plasma::RunnerContext &context, const Plasma::Q
}
}
QMimeData *CalculatorRunner::mimeDataForMatch(const Plasma::QueryMatch &match)
QMimeData *CalculatorRunner::mimeDataForMatch(const QueryMatch &match)
{
QMimeData *result = new QMimeData();
result->setText(match.text());
......
......@@ -18,7 +18,7 @@ class QalculateEngine;
/**
* This class evaluates the basic expressions given in the interface.
*/
class CalculatorRunner : public Plasma::AbstractRunner
class CalculatorRunner : public AbstractRunner
{
Q_OBJECT
......@@ -26,11 +26,11 @@ public:
CalculatorRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~CalculatorRunner() override;
void match(Plasma::RunnerContext &context) override;
void match(RunnerContext &context) override;
protected Q_SLOTS:
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
QMimeData *mimeDataForMatch(const Plasma::QueryMatch &match) override;
void run(const RunnerContext &context, const QueryMatch &match) override;
QMimeData *mimeDataForMatch(const QueryMatch &match) override;
private:
QString calculate(const QString &term, bool *isApproximate);
......
......@@ -12,8 +12,6 @@
#include <QAction>
#include <QObject>
using namespace Plasma;
class HelpRunner : public AbstractRunner
{
public:
......
......@@ -21,7 +21,7 @@
K_PLUGIN_CLASS_WITH_JSON(KillRunner, "plasma-runner-kill.json")
KillRunner::KillRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: AbstractRunner(parent, metaData, args)
, m_processes(nullptr)
{
setObjectName(QStringLiteral("Kill Runner"));
......@@ -32,8 +32,8 @@ KillRunner::KillRunner(QObject *parent, const KPluginMetaData &metaData, const Q
sigkill->setData(9);
m_actionList = {sigterm, sigkill};
connect(this, &Plasma::AbstractRunner::prepare, this, &KillRunner::prep);
connect(this, &Plasma::AbstractRunner::teardown, this, &KillRunner::cleanup);
connect(this, &AbstractRunner::prepare, this, &KillRunner::prep);
connect(this, &AbstractRunner::teardown, this, &KillRunner::cleanup);
m_delayedCleanupTimer.setInterval(50);
m_delayedCleanupTimer.setSingleShot(true);
......@@ -52,8 +52,8 @@ void KillRunner::reloadConfiguration()
m_hasTrigger = !m_triggerWord.isEmpty();
m_sorting = (Sort)grp.readEntry(CONFIG_SORTING, static_cast<int>(Sort::NONE));
QList<Plasma::RunnerSyntax> syntaxes;
syntaxes << Plasma::RunnerSyntax(m_triggerWord + QStringLiteral(":q:"), i18n("Terminate running applications whose names match the query."));
QList<RunnerSyntax> syntaxes;
syntaxes << RunnerSyntax(m_triggerWord + QStringLiteral(":q:"), i18n("Terminate running applications whose names match the query."));
setSyntaxes(syntaxes);
if (m_hasTrigger) {
setTriggerWords({m_triggerWord});
......@@ -85,7 +85,7 @@ void KillRunner::cleanup()
}
}
void KillRunner::match(Plasma::RunnerContext &context)
void KillRunner::match(RunnerContext &context)
{
QString term = context.query();
m_prepLock.lockForRead();
......@@ -103,7 +103,7 @@ void KillRunner::match(Plasma::RunnerContext &context)
term = term.right(term.length() - m_triggerWord.length());
QList<Plasma::QueryMatch> matches;
QList<QueryMatch> matches;
const QList<KSysGuard::Process *> processlist = m_processes->getAllProcesses();
for (const KSysGuard::Process *process : processlist) {
if (!context.isValid()) {
......@@ -115,7 +115,7 @@ void KillRunner::match(Plasma::RunnerContext &context)
}
const quint64 pid = process->pid();
Plasma::QueryMatch match(this);
QueryMatch match(this);
match.setText(i18n("Terminate %1", name));
match.setSubtext(i18n("Process ID: %1", QString::number(pid)));
match.setIconName(QStringLiteral("application-exit"));
......@@ -142,7 +142,7 @@ void KillRunner::match(Plasma::RunnerContext &context)
context.addMatches(matches);
}
void KillRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
void KillRunner::run(const RunnerContext &context, const QueryMatch &match)
{
Q_UNUSED(context)
......
......@@ -21,7 +21,7 @@ class Processes;
class Process;
}
class KillRunner : public Plasma::AbstractRunner
class KillRunner : public AbstractRunner
{
Q_OBJECT
......@@ -29,8 +29,8 @@ public:
KillRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~KillRunner() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
void match(RunnerContext &context) override;
void run(const RunnerContext &context, const QueryMatch &match) override;
void reloadConfiguration() override;
private Q_SLOTS:
......
......@@ -53,7 +53,7 @@ void LocationsRunnerTest::shouldProduceResult()
QFETCH(QString, query);
QFETCH(QVariant, data);
launchQuery(query);
const QList<Plasma::QueryMatch> matches = manager->matches();
const QList<QueryMatch> matches = manager->matches();
QCOMPARE(1, matches.size());
QCOMPARE(matches.first().data(), data);
}
......
......@@ -25,19 +25,18 @@
K_PLUGIN_CLASS_WITH_JSON(LocationsRunner, "plasma-runner-locations.json")
LocationsRunner::LocationsRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: AbstractRunner(parent, metaData, args)
{
// set the name shown after the result in krunner window
setObjectName(QStringLiteral("Locations"));
addSyntax(
Plasma::RunnerSyntax(QStringLiteral(":q:"), i18n("Finds local directories and files, network locations and Internet sites with paths matching :q:.")));
addSyntax(RunnerSyntax(QStringLiteral(":q:"), i18n("Finds local directories and files, network locations and Internet sites with paths matching :q:.")));
}
LocationsRunner::~LocationsRunner()
{
}
void LocationsRunner::match(Plasma::RunnerContext &context)
void LocationsRunner::match(RunnerContext &context)
{
QString term = context.query();
// If we have a query with an executable and optionally arguments, BUG: 433053
......@@ -55,19 +54,19 @@ void LocationsRunner::match(Plasma::RunnerContext &context)
const QFileInfo fileInfo = QFileInfo(url.toLocalFile());
if (fileInfo.exists()) {
Plasma::QueryMatch match(this);
match.setType(Plasma::QueryMatch::ExactMatch);
QueryMatch match(this);
match.setType(QueryMatch::ExactMatch);
match.setText(i18n("Open %1", context.query()));
match.setIconName(fileInfo.isFile() ? KIO::iconNameForUrl(url) : QStringLiteral("system-file-manager"));
match.setRelevance(1);
match.setData(url);
match.setUrls({url});
match.setType(Plasma::QueryMatch::ExactMatch);
match.setType(QueryMatch::ExactMatch);
context.addMatch(match);
} else if (!url.isLocalFile() && !url.isEmpty() && !url.scheme().isEmpty()) {
const QString protocol = url.scheme();
Plasma::QueryMatch match(this);
QueryMatch match(this);
match.setData(url);
match.setUrls({url});
......@@ -99,7 +98,7 @@ void LocationsRunner::match(Plasma::RunnerContext &context)
}
}
void LocationsRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
void LocationsRunner::run(const RunnerContext &context, const QueryMatch &match)
{
Q_UNUSED(context)
......
......@@ -8,7 +8,7 @@
#include <krunner/abstractrunner.h>
class LocationsRunner : public Plasma::AbstractRunner
class LocationsRunner : public AbstractRunner
{
Q_OBJECT
......@@ -16,6 +16,6 @@ public:
LocationsRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~LocationsRunner() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override;
void match(RunnerContext &context) override;
void run(const RunnerContext &context, const QueryMatch &action) override;
};
......@@ -21,14 +21,13 @@
K_PLUGIN_CLASS_WITH_JSON(PlacesRunner, "plasma-runner-places.json")
// Q_DECLARE_METATYPE(Plasma::RunnerContext)
PlacesRunner::PlacesRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
: Plasma::AbstractRunner(parent, metaData, args)
: AbstractRunner(parent, metaData, args)
{
setObjectName(QStringLiteral("Places"));
Plasma::RunnerSyntax defaultSyntax(i18n("places"), i18n("Lists all file manager locations"));
RunnerSyntax defaultSyntax(i18n("places"), i18n("Lists all file manager locations"));
addSyntax(defaultSyntax);
addSyntax(Plasma::RunnerSyntax(QStringLiteral(":q:"), i18n("Finds file manager locations that match :q:")));
addSyntax(RunnerSyntax(QStringLiteral(":q:"), i18n("Finds file manager locations that match :q:")));
// ensure the bookmarkmanager, etc. in the places model gets creates created in the main thread
// otherwise crashes ensue
......@@ -40,7 +39,7 @@ PlacesRunner::~PlacesRunner()
{
}
void PlacesRunner::match(Plasma::RunnerContext &context)
void PlacesRunner::match(RunnerContext &context)
{
if (QThread::currentThread() == QCoreApplication::instance()->thread()) {
// from the main thread
......@@ -71,32 +70,32 @@ PlacesRunnerHelper::PlacesRunnerHelper(PlacesRunner *runner)
});
}
void PlacesRunnerHelper::match(Plasma::RunnerContext *c)
void PlacesRunnerHelper::match(RunnerContext *c)
{
Plasma::RunnerContext &context = *c;
RunnerContext &context = *c;
if (!context.isValid()) {
return;
}
const QString term = context.query();
QList<Plasma::QueryMatch> matches;
QList<QueryMatch> matches;
const bool all = term.compare(i18n("places"), Qt::CaseInsensitive) == 0;
for (int i = 0; i <= m_places.rowCount(); i++) {
QModelIndex current_index = m_places.index(i, 0);
Plasma::QueryMatch::Type type = Plasma::QueryMatch::NoMatch;
QueryMatch::Type type = QueryMatch::NoMatch;
qreal relevance = 0;
const QString text = m_places.text(current_index);
if ((all && !text.isEmpty()) || text.compare(term, Qt::CaseInsensitive) == 0) {
type = Plasma::QueryMatch::ExactMatch;
type = QueryMatch::ExactMatch;
relevance = all ? 0.9 : 1.0;
} else if (text.contains(term, Qt::CaseInsensitive)) {
type = Plasma::QueryMatch::PossibleMatch;
type = QueryMatch::PossibleMatch;
relevance = 0.7;
}
if (type != Plasma::QueryMatch::NoMatch) {
Plasma::QueryMatch match(static_cast<PlacesRunner *>(parent()));
if (type != QueryMatch::NoMatch) {
QueryMatch match(static_cast<PlacesRunner *>(parent()));
match.setType(type);
match.setRelevance(relevance);
match.setIcon(m_places.icon(current_index));
......@@ -142,7 +141,7 @@ void PlacesRunnerHelper::openDevice(const QString &udi)
}
}
void PlacesRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action)
void PlacesRunner::run(const RunnerContext &context, const QueryMatch &action)
{
Q_UNUSED(context);
// I don't just pass the model index because the list could change before the user clicks on it, which would make everything go wrong. Ideally we don't want
......
......@@ -19,7 +19,7 @@ public:
explicit PlacesRunnerHelper(PlacesRunner *runner);
public Q_SLOTS:
void match(Plasma::RunnerContext *context);
void match(RunnerContext *context);
void openDevice(const QString &udi);
private:
......@@ -27,7 +27,7 @@ private:
QString m_pendingUdi;
};
class PlacesRunner : public Plasma::AbstractRunner
class PlacesRunner : public AbstractRunner
{
Q_OBJECT