From 9ee90a35dc3ebdbc76b18cbeb72995345ee37052 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 8 Dec 2013 14:16:25 +0100 Subject: - MO now applies a minimum to the nmm-compatibility field. - bugfix: "visit on nexus" directed the browser to the servers meant for nmm - bugfix: url for "check all for updates" and "enorse/unendorse" were not constructed correctly --- src/settings.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index 144049aa..8086672a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -214,7 +214,12 @@ QString Settings::getModDirectory() const QString Settings::getNMMVersion() const { - return m_Settings.value("Settings/nmm_version", "0.34.0").toString(); + static const QString MIN_NMM_VERSION = "0.46.0"; + QString result = m_Settings.value("Settings/nmm_version", MIN_NMM_VERSION).toString(); + if (VersionInfo(result) < VersionInfo(MIN_NMM_VERSION)) { + result = MIN_NMM_VERSION; + } + return result; } bool Settings::getNexusLogin(QString &username, QString &password) const @@ -583,9 +588,9 @@ void Settings::query(QWidget *parent) downloadDirEdit->setText(getDownloadDirectory()); modDirEdit->setText(getModDirectory()); cacheDirEdit->setText(getCacheDirectory()); - offlineBox->setChecked(m_Settings.value("Settings/offline_mode", false).toBool()); - proxyBox->setChecked(m_Settings.value("Settings/use_proxy", false).toBool()); - nmmVersionEdit->setText(m_Settings.value("Settings/nmm_version", "0.33.1").toString()); + offlineBox->setChecked(offlineMode()); + proxyBox->setChecked(useProxy()); + nmmVersionEdit->setText(getNMMVersion()); logLevelBox->setCurrentIndex(logLevel()); // display plugin settings -- cgit v1.3.1