Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
296de907
Commit
296de907
authored
Jul 12, 2021
by
Piyush Aggarwal
🎮
Browse files
indicator: fix single-click to open app and remove unnecessary capture
parent
1d666fce
Pipeline
#70008
passed with stage
in 4 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
indicator/main.cpp
View file @
296de907
...
@@ -139,11 +139,11 @@ int main(int argc, char** argv)
...
@@ -139,11 +139,11 @@ int main(int argc, char** argv)
QObject
::
connect
(
&
model
,
&
DevicesModel
::
rowsChanged
,
&
model
,
[
&
systray
,
&
model
]()
{
QObject
::
connect
(
&
model
,
&
DevicesModel
::
rowsChanged
,
&
model
,
[
&
systray
,
&
model
]()
{
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
,
[](
QSystemTrayIcon
::
ActivationReason
reason
)
{
if
(
reason
==
QSystemTrayIcon
::
Trigger
)
{
if
(
reason
==
QSystemTrayIcon
::
Trigger
)
{
const
QString
kdeconnectAppExecutable
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"kdeconnect-app"
),
{
QCoreApplication
::
applicationDirPath
()
});
const
QString
kdeconnectAppExecutable
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"kdeconnect-app"
),
{
QCoreApplication
::
applicationDirPath
()
});
if
(
!
kdeconnectAppExecutable
.
isEmpty
())
{
if
(
!
kdeconnectAppExecutable
.
isEmpty
())
{
QProcess
::
startDetached
(
kdeconnectAppExecutable
);
QProcess
::
startDetached
(
kdeconnectAppExecutable
,
{}
);
}
}
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment