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
ae89638e
Commit
ae89638e
authored
Apr 03, 2022
by
Alexander Lohnau
Committed by
Nate Graham
Apr 03, 2022
Browse files
KRunner: Disable help button when runner is disabled
BUG: 451509
parent
88c3f465
Pipeline
#158908
passed with stage
in 5 minutes and 42 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
krunner/view.cpp
View file @
ae89638e
...
...
@@ -58,6 +58,8 @@ View::View(QWindow *)
Q_UNUSED
(
names
);
if
(
group
.
name
()
==
QLatin1String
(
"General"
))
{
loadConfig
();
}
else
if
(
group
.
name
()
==
QLatin1String
(
"Plugins"
))
{
Q_EMIT
helpEnabledChanged
();
}
});
...
...
krunner/view.h
View file @
ae89638e
...
...
@@ -8,6 +8,7 @@
#include
<KConfigGroup>
#include
<KConfigWatcher>
#include
<KPluginMetaData>
#include
<KSharedConfig>
#include
<QPointer>
#include
<QQuickView>
...
...
@@ -42,6 +43,7 @@ class View : public PlasmaQuick::Dialog
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
Q_PROPERTY
(
Plasma
::
RunnerManager
*
runnerManager
WRITE
setRunnerManager
)
Q_PROPERTY
(
bool
helpEnabled
READ
helpEnabled
NOTIFY
helpEnabledChanged
)
public:
explicit
View
(
QWindow
*
parent
=
nullptr
);
...
...
@@ -69,8 +71,16 @@ public:
m_manager
=
manager
;
}
bool
helpEnabled
()
{
const
static
auto
metaData
=
KPluginMetaData
(
QStringLiteral
(
"kf5/krunner/helprunner"
));
const
KConfigGroup
grp
=
KSharedConfig
::
openConfig
()
->
group
(
"Plugins"
);
return
metaData
.
isEnabled
(
grp
);
}
Q_SIGNALS:
void
pinnedChanged
();
void
helpEnabledChanged
();
protected:
bool
event
(
QEvent
*
event
)
override
;
...
...
lookandfeel/contents/runcommand/RunCommand.qml
View file @
ae89638e
...
...
@@ -221,6 +221,7 @@ ColumnLayout {
}
}
PlasmaComponents3.ToolButton
{
visible
:
runnerWindow
.
helpEnabled
checkable
:
true
checked
:
root
.
query
.
startsWith
(
"
?
"
)
// Reset if out quers starts with "?", otherwise set it to "?"
...
...
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