Commit 6e88bd78 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Add a configuration setting that determines if we prefer system connections

In certain cases, like when using IWD as NetworkManager backend, it is
better to create system connections by default. This adds a
configuration setting  to check if we should create those.
parent eac9aa7c
......@@ -102,3 +102,12 @@ bool ConfigurationProxy::showPasswordDialog() const
}
return mConfiguration->showPasswordDialog();
}
bool ConfigurationProxy::systemConnectionsByDefault() const
{
if (!mConfiguration) {
return false;
}
return mConfiguration->systemConnectionsByDefault();
}
......@@ -45,6 +45,8 @@ public:
bool showPasswordDialog() const;
bool systemConnectionsByDefault() const;
Q_SIGNALS:
void airplaneModeEnabledChanged();
void manageVirtualConnectionsChanged(bool manage);
......
......@@ -178,3 +178,10 @@ bool Configuration::showPasswordDialog() const
return true;
}
bool Configuration::systemConnectionsByDefault() const
{
KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("plasma-nm"));
KConfigGroup grp(config, QStringLiteral("General"));
return grp.readEntry(QStringLiteral("SystemConnectionsByDefault"), false);
}
......@@ -35,6 +35,8 @@ public:
bool showPasswordDialog() const;
bool systemConnectionsByDefault() const;
static Configuration &self();
Q_SIGNALS:
......
Supports Markdown
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