mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Another compilation fix for Windows
This commit is contained in:
parent
b169083fe2
commit
71c4f6e7e3
1 changed files with 1 additions and 13 deletions
|
@ -58,21 +58,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
QVariant value(const QString & key, const QVariant &defaultValue = QVariant()) {
|
QVariant value(const QString & key, const QVariant &defaultValue = QVariant()) const {
|
||||||
QString key_tmp(key);
|
QString key_tmp(key);
|
||||||
QVariant ret = QSettings::value(key_tmp);
|
QVariant ret = QSettings::value(key_tmp);
|
||||||
if(ret.isNull()) {
|
|
||||||
if(format() != QSettings::NativeFormat) {
|
|
||||||
// Keep compatibility with qBittorrent < 2.3.0
|
|
||||||
// Import the setting from the registry
|
|
||||||
QSettings old_settings(organizationName(), applicationName());
|
|
||||||
ret = old_settings.value(key_tmp);
|
|
||||||
if(!ret.isNull()) {
|
|
||||||
setValue(key_tmp, ret);
|
|
||||||
old_settings.remove(key_tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(ret.isNull())
|
if(ret.isNull())
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue