diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-09-16 23:44:09 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-09-17 00:01:12 -0500 |
| commit | b1a3bdd6e8dba5df77f25b3813bcb73043b14bbc (patch) | |
| tree | eabb97e791c3605516907f6f798811e2c0b5ea94 /src/settings.cpp | |
| parent | 22a004be2ebca388866201c58bdd8e61f7fb2d2e (diff) | |
Automatically set CDN as a preferred server
This also removes the (free) and (premium) labels from the servers as they aren't useful anymore. Premium users get premium speeds on all servers. Added (automatic) tag to the CDN server to indicate it will automatically pick servers based on geography.
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 6ef43ace..2dbca0eb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -604,7 +604,7 @@ void Settings::query(PluginContainer *pluginContainer, QWidget *parent) tabs.push_back(std::unique_ptr<SettingsTab>(new PluginsTab(this, dialog))); tabs.push_back(std::unique_ptr<SettingsTab>(new WorkaroundsTab(this, dialog))); - + QString key = QString("geometry/%1").arg(dialog.objectName()); if (m_Settings.contains(key)) { dialog.restoreGeometry(m_Settings.value(key).toByteArray()); @@ -838,9 +838,10 @@ Settings::NexusTab::NexusTab(Settings *parent, SettingsDialog &dialog) m_Settings.beginGroup("Servers"); for (const QString &key : m_Settings.childKeys()) { QVariantMap val = m_Settings.value(key).toMap(); - QString type = val["premium"].toBool() ? "(premium)" : "(free)"; - - QString descriptor = key + " " + type; + QString descriptor = key; + if (!descriptor.compare("CDN", Qt::CaseInsensitive)) { + descriptor += QStringLiteral(" (automatic)"); + } if (val.contains("downloadSpeed") && val.contains("downloadCount") && (val["downloadCount"].toInt() > 0)) { int bps = static_cast<int>(val["downloadSpeed"].toDouble() / val["downloadCount"].toInt()); descriptor += QString(" (%1 kbps)").arg(bps / 1024); |
