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
Plasma Workspace
Commits
078a1c99
Verified
Commit
078a1c99
authored
Mar 16, 2022
by
Fushan Wen
Browse files
krunner: Replace custom verifier with `KCMShell.authorize`
This saves some lines.
parent
33f2d322
Pipeline
#151189
passed with stage
in 7 minutes and 47 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
krunner/view.cpp
View file @
078a1c99
...
...
@@ -342,11 +342,6 @@ void View::displayConfiguration()
settingsDialog
->
show
();
}
bool
View
::
canConfigure
()
const
{
return
KAuthorized
::
authorizeControlModule
(
QStringLiteral
(
"kcm_plasmasearch.desktop"
));
}
void
View
::
setVisible
(
bool
visible
)
{
m_requestedVisible
=
visible
;
...
...
krunner/view.h
View file @
078a1c99
...
...
@@ -38,7 +38,6 @@ class View : public PlasmaQuick::Dialog
Q_OBJECT
Q_CLASSINFO
(
"D-Bus Interface"
,
"org.kde.krunner.App"
)
Q_PROPERTY
(
bool
canConfigure
READ
canConfigure
CONSTANT
)
Q_PROPERTY
(
bool
pinned
READ
pinned
WRITE
setPinned
NOTIFY
pinnedChanged
)
Q_PROPERTY
(
QStringList
history
READ
history
NOTIFY
historyChanged
)
// TODO KF6 This is kept for compatibility with third party themes which override the RunCommand.qml file
...
...
@@ -53,7 +52,6 @@ public:
bool
freeFloating
()
const
;
void
setFreeFloating
(
bool
floating
);
bool
canConfigure
()
const
;
QStringList
history
()
const
;
bool
pinned
()
const
;
...
...
lookandfeel/contents/runcommand/RunCommand.qml
View file @
078a1c99
...
...
@@ -7,6 +7,8 @@
import
QtQuick
2.6
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Window
2.1
import
org
.
kde
.
kquickcontrolsaddons
2.0
// For KCMShell
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
...
...
@@ -72,7 +74,7 @@ ColumnLayout {
}
Accessible.name
:
i18nd
(
"
plasma_lookandfeel_org.kde.lookandfeel
"
,
"
Configure
"
)
Accessible.description
:
i18nd
(
"
plasma_lookandfeel_org.kde.lookandfeel
"
,
"
Configure KRunner Behavior
"
)
visible
:
runnerWindow
.
canConfigure
visible
:
KCMShell
.
authorize
(
"
kcm_krunnersettings.desktop
"
).
length
>
0
PlasmaComponents3.ToolTip
{
text
:
i18nd
(
"
plasma_lookandfeel_org.kde.lookandfeel
"
,
"
Configure KRunner…
"
)
}
...
...
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