forked from blue/squawk
Downloads folder now is movable
This commit is contained in:
parent
d8b5ccb2da
commit
73b1b58a96
16 changed files with 141 additions and 12 deletions
|
@ -42,11 +42,21 @@ void Settings::apply()
|
|||
for (const std::pair<const QString, QVariant>& pair: modifiedSettings) {
|
||||
if (pair.first == "style") {
|
||||
Shared::Global::setStyle(pair.second.toString());
|
||||
settings.setValue(pair.first, pair.second);
|
||||
} else if (pair.first == "theme") {
|
||||
Shared::Global::setTheme(pair.second.toString());
|
||||
settings.setValue(pair.first, pair.second);
|
||||
} else if (pair.first == "downloadsPath") {
|
||||
QString path = pair.second.toString();
|
||||
if (!Shared::isSubdirectoryOfSettings(path)) {
|
||||
path = Shared::getAbsoluteWritablePath(path);
|
||||
if (path.size() > 0) {
|
||||
settings.setValue(pair.first, path);
|
||||
emit changeDownloadsPath(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
settings.setValue(pair.first, pair.second);
|
||||
}
|
||||
|
||||
modifiedSettings.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue