summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2017-04-12 10:44:57 (GMT)
committerMarco Martin <notmart@gmail.com>2017-04-12 10:47:14 (GMT)
commitfcecf928409c7b9b00f1812b308c1bbba8e93bdc (patch)
treeb381e37e533b5f2248412bfc0b453ea22b0e00ac
parentc8d7f0363a568b6a4c5f0d7061a5858028a0526d (diff)
make sure the "default" sheme is actually default
-rw-r--r--kcms/colors/scmeditordialog.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/kcms/colors/scmeditordialog.cpp b/kcms/colors/scmeditordialog.cpp
index 83ab53d..aad9430 100644
--- a/kcms/colors/scmeditordialog.cpp
+++ b/kcms/colors/scmeditordialog.cpp
@@ -40,11 +40,18 @@ SchemeEditorDialog::SchemeEditorDialog(const QString &path, QWidget *parent)
, m_disableUpdates(false)
, m_unsavedChanges(false)
{
- m_config = KSharedConfig::openConfig(path);
+ if (!path.isEmpty()) {
+ m_config = KSharedConfig::openConfig(path);
+ } else {
+ m_config = KSharedConfig::openConfig(QStringLiteral("kdeglobals"));
+ m_config->setReadDefaults(true);
+ }
m_schemeName = KConfigGroup(m_config, "General").readEntry("Name");
setupUi(this);
- this->setWindowTitle(m_schemeName);
+ if (!path.isEmpty()) {
+ this->setWindowTitle(m_schemeName);
+ }
schemeKnsUploadButton->setIcon( QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")) );