Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
libksysguard
Commits
c2ec5710
Commit
c2ec5710
authored
Nov 04, 2020
by
Alexander Lohnau
💬
Browse files
Remove defunct action to open KRunner
CCBUG: 428657
parent
ea21775a
Changes
1
Hide whitespace changes
Inline
Side-by-side
processui/ksysguardprocesslist.cpp
View file @
c2ec5710
...
...
@@ -436,28 +436,6 @@ KSysGuardProcessList::KSysGuardProcessList(QWidget* parent, const QString &hostN
addByDesktopName
(
QStringLiteral
(
"org.kde.kmag"
));
addByDesktopName
(
QStringLiteral
(
"htop"
));
// Add Run Command...
//
auto
runCommandAction
=
new
QAction
(
i18nc
(
"@action:inmenu"
,
"Run Command"
),
this
);
// //INFO: This is one way of how to find out the two required parameters for the globalShortcut method:
// auto list = KGlobalAccel::getGlobalShortcutsByKey(QKeySequence(QStringLiteral("Alt+Space")));
// foreach (auto item, list) {
// qDebug() << item.componentUniqueName() << item.uniqueName();
// //prints: 'krunner', 'run command'
// }
const
auto
runCommandShortcutList
=
KGlobalAccel
::
self
()
->
globalShortcut
(
QStringLiteral
(
"krunner"
),
QStringLiteral
(
"run command"
));
runCommandAction
->
setShortcuts
(
runCommandShortcutList
);
runCommandAction
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"system-run"
)));
connect
(
runCommandAction
,
&
QAction
::
triggered
,
this
,
[
this
](){
KService
::
Ptr
service
=
KService
::
serviceByDesktopName
(
QStringLiteral
(
"krunner"
));
if
(
service
)
{
auto
*
job
=
new
KIO
::
ApplicationLauncherJob
(
service
);
job
->
setUiDelegate
(
new
KDialogJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
window
()));
job
->
start
();
}
});
d
->
mToolsMenu
->
addAction
(
runCommandAction
);
// Add the xkill functionality...
auto
killWindowAction
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-close"
)),
i18nc
(
"@action:inmenu"
,
"Kill a Window"
),
this
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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