Verified Commit 078a1c99 authored by Fushan Wen's avatar 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
......@@ -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;
......
......@@ -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;
......
......@@ -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…")
}
......
Supports Markdown
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