mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
envmanager: Ensure KConfigGroup being written to is not derived from const
This otherwise causes an assertion failure if assertions are enabled.
This commit is contained in:
parent
5c41092c0f
commit
2fae8b3381
1 changed files with 3 additions and 2 deletions
|
|
@ -127,8 +127,9 @@ void Settings::loadKeys(const QString &fileName, KSharedConfig::Ptr &config, con
|
|||
// NOTE: this only saves a value if it hasn't already been saved
|
||||
void Settings::saveConfigSetting(const QString &fileName, const QString &group, const QString &key, const QVariant value)
|
||||
{
|
||||
const auto savedGroup = KConfigGroup{m_mobileConfig, SAVED_CONFIG_GROUP};
|
||||
const auto fileGroup = KConfigGroup{&savedGroup, fileName};
|
||||
// These are not const because we are writing an entry
|
||||
auto savedGroup = KConfigGroup{m_mobileConfig, SAVED_CONFIG_GROUP};
|
||||
auto fileGroup = KConfigGroup{&savedGroup, fileName};
|
||||
auto keyGroup = KConfigGroup{&fileGroup, group};
|
||||
|
||||
if (!keyGroup.hasKey(key)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue