summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/settings.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 0a4ab912..04491c3e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4580,7 +4580,7 @@ void MainWindow::nxmDownloadURLs(QString, int, int, QVariant, QVariant resultDat
info.name = serverInfo["Name"].toString();
info.premium = serverInfo["IsPremium"].toBool();
info.lastSeen = QDate::currentDate();
- info.preferred = 0;
+ info.preferred = !info.name.compare("CDN", Qt::CaseInsensitive);
// other keys: ConnectedUsers, Country, URI
servers.append(info);
}
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);