Skip to content
GitLab
Menu
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
58c34db4
Commit
58c34db4
authored
Mar 06, 2021
by
Ahmad Samir
Browse files
Add private helper method to replace KGlobalSettins::emitChange()
parent
df03fb87
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcms/kcms-common_p.h
0 → 100644
View file @
58c34db4
/*
This file is part of the KDE Project
SPDX-FileCopyrightText: 2021 Ahmad Samir <a.samirh78@gmail.com>
SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef KCMS_COMMON_P_H
#define KCMS_COMMON_P_H
#include <QDBusConnection>
#include <QDBusMessage>
// These two enums are copied from KHintSettings (which copied them from KGlobalSettings)
enum
GlobalChangeType
{
PaletteChanged
=
0
,
FontChanged
,
StyleChanged
,
// 2
SettingsChanged
,
IconChanged
,
CursorChanged
,
// 5
ToolbarStyleChanged
,
ClipboardConfigChanged
,
BlockShortcuts
,
NaturalSortingChanged
,
};
enum
GlobalSettingsCategory
{
SETTINGS_MOUSE
,
SETTINGS_COMPLETION
,
SETTINGS_PATHS
,
SETTINGS_POPUPMENU
,
SETTINGS_QT
,
SETTINGS_SHORTCUTS
,
SETTINGS_LOCALE
,
SETTINGS_STYLE
,
};
void
notifyKcmChange
(
GlobalChangeType
changeType
,
int
arg
=
0
)
{
QDBusMessage
message
=
QDBusMessage
::
createSignal
(
QStringLiteral
(
"/KGlobalSettings"
),
QStringLiteral
(
"org.kde.KGlobalSettings"
),
QStringLiteral
(
"notifyChange"
));
message
.
setArguments
({
changeType
,
arg
});
QDBusConnection
::
sessionBus
().
send
(
message
);
}
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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