summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-08 13:17:12 +0100
committerJonathan Bauer2011-03-08 13:17:12 +0100
commit137022b7f0e2f38f3f517fd34954b3518114c920 (patch)
treeeb7717e8b42f0c2ac618be6eb51fdb7320227639 /src/main.cpp
parentfirst fixes (diff)
downloadfbgui-137022b7f0e2f38f3f517fd34954b3518114c920.tar.gz
fbgui-137022b7f0e2f38f3f517fd34954b3518114c920.tar.xz
fbgui-137022b7f0e2f38f3f517fd34954b3518114c920.zip
first downloadDir fix
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6f3d283..bd7abb7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,17 +84,18 @@ int main(int argc, char *argv[])
else
baseURL = DEFAULT_URL;
+ // Setting downloads target directory.
if (clo.contains("downloadDir")){
- downloadDirectory = QDir(clo.value("downloadDir"));
- if (debug) qDebug() << "downloadDir set to: " << clo.value("downloadDir");
+ downloadPath = binPath + clo.value("downloadDir");
+ if (debug) qDebug() << "clo set downloadDir to: " << binPath + clo.value("downloadDir");
}
else if (confFileSettings.contains("default/downloadDirectory")){
- downloadDirectory = QDir(confFileSettings.value("default/downloadDirectory").toString());
- if (debug) qDebug() << "downloadDir set to: " << confFileSettings.value("default/downloadDirectory").toString();
+ downloadPath = binPath + confFileSettings.value("default/downloadDirectory").toString();
+ if (debug) qDebug() << "conf set downloadDir to: " << binPath + confFileSettings.value("default/downloadDirectory").toString();
}
else
- downloadDirectory = QDir(".");
- if (debug) qDebug() << "Downloads will be saved to: " << downloadDirectory.dirName();
+ downloadPath = binPath + "/downloads";
+ if (debug) qDebug() << "Downloads will be saved to: " << downloadPath;
// Start fbgui.
fbgui gui(&app);
gui.show();