Commit e683dd21 authored by Piyush Aggarwal's avatar Piyush Aggarwal 🎮
Browse files

indicator: add singleClick to open main app interface

parent 89e7c361
Pipeline #68299 passed with stage
in 4 minutes and 6 seconds
...@@ -140,8 +140,11 @@ int main(int argc, char** argv) ...@@ -140,8 +140,11 @@ int main(int argc, char** argv)
systray.setToolTip(i18np("%1 device connected", "%1 devices connected", model.rowCount())); systray.setToolTip(i18np("%1 device connected", "%1 devices connected", model.rowCount()));
}); });
QObject::connect(&systray, &QSystemTrayIcon::activated, [&iface](QSystemTrayIcon::ActivationReason reason) { QObject::connect(&systray, &QSystemTrayIcon::activated, [&iface](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::DoubleClick) { if (reason == QSystemTrayIcon::Trigger) {
iface.openConfiguration(); const QString kdeconnectAppExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-app"), { QCoreApplication::applicationDirPath() });
if (!kdeconnectAppExecutable.isEmpty()) {
QProcess::startDetached(kdeconnectAppExecutable);
}
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment