summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-06-29 18:04:10 +0200
committerTannin <devnull@localhost>2013-06-29 18:04:10 +0200
commitfe37b48dffd8edcd6e30f4e304d3e27a731ac8ae (patch)
treee996c5d329d9abf77bcd12af4d05238fd6ebca1f /src/settings.cpp
parentf8c683f700a3fff30540ff343df2bfba15080e86 (diff)
- caching of downloadwidgets to fix performance problem, currently broken and disabled
- added new state for downloads "uninstalled" for mods that were at one point installed and then removed - user-configured server preference is now used - updated tutorial to account for removal of integrated browser - reverted to qt 4 - using performance optimised findfirstfile on win vista and up - bugfix: it was possible to disable all columns of the mod list - bugfix: hook.dll doesn't load on win xp
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 991f1f59..2bfdc0a6 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -153,6 +153,23 @@ QString Settings::getDownloadDirectory() const
return QDir::toNativeSeparators(m_Settings.value("Settings/download_directory", ToQString(GameInfo::instance().getDownloadDir())).toString());
}
+std::map<QString, int> Settings::getPreferredServers()
+{
+ std::map<QString, int> result;
+ m_Settings.beginGroup("Servers");
+
+ foreach (const QString &serverKey, m_Settings.childKeys()) {
+ QVariantMap data = m_Settings.value(serverKey).toMap();
+ int preference = data["preferred"].toInt();
+ if (preference > 0) {
+ result[serverKey] = preference;
+ }
+ }
+ m_Settings.endGroup();
+
+ return result;
+}
+
QString Settings::getCacheDirectory() const
{
return QDir::toNativeSeparators(m_Settings.value("Settings/cache_directory", ToQString(GameInfo::instance().getCacheDir())).toString());