Commit 9e3f9fb2 authored by Laurent Montel's avatar Laurent Montel 😁

Make it compile against qt5.15. ::unite is deprecated.

Summary: Make it compile against qt5.15

Reviewers: davidedmundson, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27866
parent ca2b0862
......@@ -103,10 +103,8 @@ void AdvancedConfig::load()
configUi->rebootCommand->setUrl(QUrl::fromLocalFile(mConfig->group("General").readEntry("RebootCommand")));
}
QVariantMap AdvancedConfig::save()
void AdvancedConfig::save(QVariantMap &args)
{
QVariantMap args;
args[QStringLiteral("kde_settings.conf/Autologin/User")] = ( configUi->autoLogin->isChecked() ) ? configUi->userList->currentText() : QString();
args[QStringLiteral("kde_settings.conf/Autologin/Session")] = ( configUi->autoLogin->isChecked() ) ? configUi->sessionList->currentData() : QString();
......@@ -122,8 +120,6 @@ QVariantMap AdvancedConfig::save()
args[QStringLiteral("kde_settings.conf/General/HaltCommand")] = configUi->haltCommand->url().toLocalFile();
args[QStringLiteral("kde_settings.conf/General/RebootCommand")] = configUi->rebootCommand->url().toLocalFile();
return args;
}
void AdvancedConfig::slotUidRangeChanged()
......
......@@ -37,7 +37,7 @@ public:
explicit AdvancedConfig(const KSharedConfigPtr &config, QWidget *parent = nullptr);
~AdvancedConfig();
QVariantMap save();
void save(QVariantMap &args);
Q_SIGNALS:
void changed(bool changed=true);
......
......@@ -82,8 +82,8 @@ void SddmKcm::save()
}
qDebug() << "Ovr:" << args[QStringLiteral("theme.conf.user")].toString();
args.unite(mThemeConfig->save());
args.unite(mAdvancedConfig->save());
mThemeConfig->save(args);
mAdvancedConfig->save(args);
KAuth::Action saveAction = authAction();
......
......@@ -70,15 +70,13 @@ ThemeConfig::~ThemeConfig()
delete configUi;
}
QVariantMap ThemeConfig::save()
void ThemeConfig::save(QVariantMap &args)
{
QModelIndex index = configUi->themesListView->currentIndex();
if (!index.isValid()) {
return QVariantMap();
return;
}
QVariantMap args;
args[QStringLiteral("kde_settings.conf/Theme/Current")] = index.data(ThemesModel::IdRole);
if (!mThemeConfigPath.isEmpty()) {
......@@ -89,7 +87,6 @@ QVariantMap ThemeConfig::save()
args[QStringLiteral("theme.conf.user/General/type")] = QStringLiteral("color");
}
}
return args;
}
QString ThemeConfig::themeConfigPath() const
......
......@@ -34,7 +34,7 @@ public:
explicit ThemeConfig(const KSharedConfigPtr &config, QWidget *parent = nullptr);
~ThemeConfig();
QVariantMap save();
void save(QVariantMap &args);
QString themeConfigPath() const;
Q_SIGNALS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment