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 Desktop
Commits
599d888e
Verified
Commit
599d888e
authored
Mar 17, 2022
by
Fushan Wen
Browse files
fixup! kcms/runners: Move KRunner settings to individual KCM
parent
aa74199f
Pipeline
#151378
passed with stage
in 3 minutes and 29 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
kcms/runners/kcm.cpp
View file @
599d888e
...
...
@@ -80,14 +80,9 @@ SearchConfigModule::SearchConfigModule(QWidget *parent, const QVariantList &args
m_krunnerSettingsButton
=
new
QPushButton
(
QIcon
::
fromTheme
(
QStringLiteral
(
"krunner"
)),
QStringLiteral
(
"Configure KRunner…"
),
this
);
connect
(
m_krunnerSettingsButton
,
&
QPushButton
::
clicked
,
this
,
[
this
]
{
if
(
!
m_krunnerSettingsDialog
)
{
const
KPluginMetaData
krunnerModule
(
QPluginLoader
(
"plasma/kcms/desktop/kcm_krunnersettings"
));
if
(
krunnerModule
.
isValid
())
{
m_krunnerSettingsDialog
=
new
KCMultiDialog
(
this
);
m_krunnerSettingsDialog
->
addModule
(
krunnerModule
,
{
QLatin1String
(
"openedFromPluginSettings"
)});
}
else
{
return
;
}
m_krunnerSettingsDialog
=
new
KCMultiDialog
(
this
);
m_krunnerSettingsDialog
->
addModule
(
KPluginMetaData
(
QStringLiteral
(
"plasma/kcms/desktop/kcm_krunnersettings"
)),
{
QStringLiteral
(
"openedFromPluginSettings"
)});
}
m_krunnerSettingsDialog
->
show
();
...
...
kcms/runners/kcm_krunnersettings.json
View file @
599d888e
{
"KPlugin"
:
{
"Authors"
:
[
{
"Email"
:
"qydwhotmail@gmail.com"
,
"Name"
:
"Fushan Wen"
}
],
"Description"
:
"Configure KRunner behavior"
,
"FormFactors"
:
[
"desktop"
,
"handset"
,
"tablet"
],
"Icon"
:
"krunner"
,
"Id"
:
"kcm_krunnersettings"
,
"License"
:
"GPL"
,
"Name"
:
"KRunner Settings"
,
"Version"
:
"0.1"
"Name"
:
"KRunner Settings"
}
}
kcms/runners/krunnersettings.cpp
View file @
599d888e
...
...
@@ -30,7 +30,7 @@ KRunnerSettings::KRunnerSettings(QObject *parent, const KPluginMetaData &metaDat
->
group
(
"PlasmaRunnerManager"
)
.
group
(
"History"
))
,
m_historyKeys
(
m_historyConfigGroup
.
keyList
())
,
m_doesShowPluginButton
(
args
.
size
()
==
0
||
args
.
constFirst
()
!=
QLatin1String
(
"openedFromPluginSettings"
))
,
m_doesShowPluginButton
(
args
.
isEmpty
()
||
args
.
constFirst
()
!=
QLatin1String
(
"openedFromPluginSettings"
))
{
qmlRegisterType
<
KRunnerSettingsBase
>
();
...
...
@@ -41,10 +41,6 @@ KRunnerSettings::KRunnerSettings(QObject *parent, const KPluginMetaData &metaDat
connect
(
m_consumer
,
&
KActivities
::
Consumer
::
activitiesChanged
,
this
,
&
KRunnerSettings
::
hasSingleHistoryChanged
);
}
KRunnerSettings
::~
KRunnerSettings
()
{
}
KRunnerSettingsBase
*
KRunnerSettings
::
krunnerSettings
()
const
{
return
m_data
->
settings
();
...
...
kcms/runners/krunnersettings.h
View file @
599d888e
...
...
@@ -37,7 +37,6 @@ class KRunnerSettings : public KQuickAddons::ManagedConfigModule
public:
KRunnerSettings
(
QObject
*
parent
,
const
KPluginMetaData
&
metaData
,
const
QVariantList
&
args
);
~
KRunnerSettings
()
override
;
KRunnerSettingsBase
*
krunnerSettings
()
const
;
...
...
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