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
cc77e4ff
Commit
cc77e4ff
authored
Jan 15, 2021
by
Cyril Rossi
Browse files
KCM Background Services : highlight non default settings
parent
cce7f619
Changes
5
Hide whitespace changes
Inline
Side-by-side
kcms/kded/CMakeLists.txt
View file @
cc77e4ff
...
...
@@ -5,6 +5,7 @@ set(kcm_kded_SRCS
kcmkded.cpp
modulesmodel.cpp
filterproxymodel.cpp
kdedconfigdata.cpp
)
qt5_add_dbus_interface
(
kcm_kded_SRCS
${
KDED_DBUS_INTERFACE
}
kded_interface
)
...
...
@@ -18,7 +19,7 @@ add_library(kcm_kded MODULE ${kcm_kded_SRCS})
kcoreaddons_desktop_to_json
(
kcm_kded
"kcmkded.desktop"
)
target_link_libraries
(
kcm_kded KF5::QuickAddons KF5::Service KF5::I18n Qt5::DBus
)
target_link_libraries
(
kcm_kded KF5::QuickAddons KF5::Service KF5::I18n
KF5::KCMUtils
Qt5::DBus
)
install
(
TARGETS kcm_kded DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kcms
)
...
...
kcms/kded/kcmkded.cpp
View file @
cc77e4ff
...
...
@@ -40,8 +40,9 @@
#include
"filterproxymodel.h"
#include
"kded_interface.h"
#include
"kdedconfigdata.h"
K_PLUGIN_FACTORY_WITH_JSON
(
KCMStyleFactory
,
"kcmkded.json"
,
registerPlugin
<
KDEDConfig
>
();)
K_PLUGIN_FACTORY_WITH_JSON
(
KCMStyleFactory
,
"kcmkded.json"
,
registerPlugin
<
KDEDConfig
>
();
registerPlugin
<
KDEDConfigData
>
();
)
static
const
QString
s_kdedServiceName
=
QStringLiteral
(
"org.kde.kded5"
);
...
...
kcms/kded/kdedconfigdata.cpp
0 → 100644
View file @
cc77e4ff
/* This file is part of the KDE project
Copyright (C) 2021 Cyril Rossi <cyril.rossi@enioka.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include
"kdedconfigdata.h"
#include
<KConfig>
#include
<KConfigGroup>
KDEDConfigData
::
KDEDConfigData
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KCModuleData
(
parent
,
args
)
{
}
bool
KDEDConfigData
::
isDefaults
()
const
{
KConfig
kdedrc
(
QStringLiteral
(
"kded5rc"
),
KConfig
::
NoGlobals
);
const
QStringList
groupList
=
kdedrc
.
groupList
();
for
(
auto
&
groupName
:
groupList
)
{
if
(
groupName
.
startsWith
(
QStringLiteral
(
"Module-"
)))
{
KConfigGroup
cg
(
&
kdedrc
,
groupName
);
if
(
!
cg
.
readEntry
(
QStringLiteral
(
"autoload"
),
true
))
{
return
false
;
}
}
}
return
true
;
}
kcms/kded/kdedconfigdata.h
0 → 100644
View file @
cc77e4ff
/* This file is part of the KDE project
Copyright (C) 2021 Cyril Rossi <cyril.rossi@enioka.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEDCONFIGDATA_H
#define KDEDCONFIGDATA_H
#include
<QObject>
#include
<KCModuleData>
class
KDEDConfigData
:
public
KCModuleData
{
Q_OBJECT
public:
KDEDConfigData
(
QObject
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
bool
isDefaults
()
const
override
;
};
#endif // KDEDCONFIGDATA_H
kcms/kded/package/contents/ui/main.qml
View file @
cc77e4ff
...
...
@@ -24,7 +24,7 @@ import QtQuick.Controls 2.3 as QtControls
import
QtQml
2.15
import
org
.
kde
.
kirigami
2.10
as
Kirigami
import
org
.
kde
.
kcm
1.
2
as
KCM
import
org
.
kde
.
kcm
1.
5
as
KCM
import
org
.
kde
.
private
.
kcms
.
style
1.0
as
Private
KCM.ScrollViewKCM
{
...
...
@@ -194,6 +194,10 @@ KCM.ScrollViewKCM {
QtControls.ToolTip
{
text
:
delegate
.
Accessible
.
description
}
KCM.SettingHighlighter
{
highlight
:
!
model
.
autoloadEnabled
}
}
ColumnLayout
{
...
...
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