[Runners] Use icon name
Summary: `QIcon` isn't thread-safe and here we just pass a theme icon name anyway, so we can have the runner UI do the work as needed. Test Plan: Compiles Reviewers: #kde_connect, nicolasfella Reviewed By: #kde_connect, nicolasfella Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D19158
This commit is contained in:
parent
a4509d9640
commit
7970e3d1c4
2 changed files with 2 additions and 4 deletions
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "findmyphonerunner.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
#include <KLocalizedString>
|
||||
|
||||
|
@ -63,7 +62,7 @@ void FindMyPhoneRunner::match(Plasma::RunnerContext &context)
|
|||
Plasma::QueryMatch match(this);
|
||||
match.setType(Plasma::QueryMatch::PossibleMatch);
|
||||
match.setId(deviceId);
|
||||
match.setIcon(QIcon::fromTheme("kdeconnect"));
|
||||
match.setIconName(QStringLiteral("kdeconnect"));
|
||||
match.setText(i18n("Find %1", deviceName));
|
||||
match.setData(deviceId);
|
||||
context.addMatch(match);
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "remotecommandsrunner.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
|
||||
#include "interfaces/dbusinterfaces.h"
|
||||
|
@ -70,7 +69,7 @@ void RemoteCommandsRunner::match(Plasma::RunnerContext &context)
|
|||
Plasma::QueryMatch match(this);
|
||||
match.setType(Plasma::QueryMatch::PossibleMatch);
|
||||
match.setId(it.key());
|
||||
match.setIcon(QIcon::fromTheme("kdeconnect"));
|
||||
match.setIconName(QStringLiteral("kdeconnect"));
|
||||
match.setText(deviceName + ": " + commandName);
|
||||
match.setSubtext(cont.value(QStringLiteral("command")).toString());
|
||||
match.setData(deviceId + "$" + it.key());
|
||||
|
|
Loading…
Reference in a new issue