deviceindicator: add path to look in for kdeconnect-handler.exe

This commit is contained in:
Piyush Aggarwal 2021-06-25 14:14:06 +05:30
parent d71af0134e
commit 4d868a2e92

View file

@ -73,7 +73,7 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface* device)
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_photo")), [getPhoto](bool available) { getPhoto->setVisible(available); }, this); setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_photo")), [getPhoto](bool available) { getPhoto->setVisible(available); }, this);
// Send file // Send file
const QString kdeconnectHandlerExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-handler")); const QString kdeconnectHandlerExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-handler"), { QCoreApplication::applicationDirPath() });
if (!kdeconnectHandlerExecutable.isEmpty()) { if (!kdeconnectHandlerExecutable.isEmpty()) {
auto handlerApp = addAction(QIcon::fromTheme(QStringLiteral("document-share")), i18n("Send a file/URL")); auto handlerApp = addAction(QIcon::fromTheme(QStringLiteral("document-share")), i18n("Send a file/URL"));
QObject::connect(handlerApp, &QAction::triggered, device, [device, kdeconnectHandlerExecutable] () { QObject::connect(handlerApp, &QAction::triggered, device, [device, kdeconnectHandlerExecutable] () {