|
|
@ -112,7 +112,7 @@ void AppController::preferencesAction() |
|
|
|
// Automatically add torrents from
|
|
|
|
// Automatically add torrents from
|
|
|
|
const QVariantHash dirs = pref->getScanDirs(); |
|
|
|
const QVariantHash dirs = pref->getScanDirs(); |
|
|
|
QVariantMap nativeDirs; |
|
|
|
QVariantMap nativeDirs; |
|
|
|
for (QVariantHash::const_iterator i = dirs.cbegin(), e = dirs.cend(); i != e; ++i) { |
|
|
|
for (auto i = dirs.cbegin(); i != dirs.cend(); ++i) { |
|
|
|
if (i.value().type() == QVariant::Int) |
|
|
|
if (i.value().type() == QVariant::Int) |
|
|
|
nativeDirs.insert(Utils::Fs::toNativePath(i.key()), i.value().toInt()); |
|
|
|
nativeDirs.insert(Utils::Fs::toNativePath(i.key()), i.value().toInt()); |
|
|
|
else |
|
|
|
else |
|
|
@ -299,7 +299,7 @@ void AppController::setPreferencesAction() |
|
|
|
QVariantHash oldScanDirs = pref->getScanDirs(); |
|
|
|
QVariantHash oldScanDirs = pref->getScanDirs(); |
|
|
|
QVariantHash scanDirs; |
|
|
|
QVariantHash scanDirs; |
|
|
|
ScanFoldersModel *model = ScanFoldersModel::instance(); |
|
|
|
ScanFoldersModel *model = ScanFoldersModel::instance(); |
|
|
|
for (QVariantMap::const_iterator i = nativeDirs.cbegin(), e = nativeDirs.cend(); i != e; ++i) { |
|
|
|
for (auto i = nativeDirs.cbegin(); i != nativeDirs.cend(); ++i) { |
|
|
|
QString folder = Utils::Fs::fromNativePath(i.key()); |
|
|
|
QString folder = Utils::Fs::fromNativePath(i.key()); |
|
|
|
int downloadType; |
|
|
|
int downloadType; |
|
|
|
QString downloadPath; |
|
|
|
QString downloadPath; |
|
|
|