indicator: add singleClick to open main app interface
This commit is contained in:
parent
89e7c36158
commit
e683dd218a
1 changed files with 5 additions and 2 deletions
|
@ -140,8 +140,11 @@ int main(int argc, char** argv)
|
|||
systray.setToolTip(i18np("%1 device connected", "%1 devices connected", model.rowCount()));
|
||||
});
|
||||
QObject::connect(&systray, &QSystemTrayIcon::activated, [&iface](QSystemTrayIcon::ActivationReason reason) {
|
||||
if (reason == QSystemTrayIcon::DoubleClick) {
|
||||
iface.openConfiguration();
|
||||
if (reason == QSystemTrayIcon::Trigger) {
|
||||
const QString kdeconnectAppExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-app"), { QCoreApplication::applicationDirPath() });
|
||||
if (!kdeconnectAppExecutable.isEmpty()) {
|
||||
QProcess::startDetached(kdeconnectAppExecutable);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue