diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 92e8819..44efa47 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -53,7 +53,6 @@ int main(int argc, char *argv[]) clo.insert("url", optarg); break; case 'd': - qDebug() << "Read from CLO: DD = " << optarg; clo.insert("downloadDir", optarg); break; case 'D': @@ -69,10 +68,10 @@ int main(int argc, char *argv[]) if (clo.contains("help")) printHelp(); // Debug mode - if (clo.contains("debug")) - debug = true; - else - debug = false; + if (clo.contains("debug")){ + debug = true; + qDebug() << "Debug mode activated."; + } // Read the config file, for now hardcoded expected name. QSettings confFileSettings(app.applicationDirPath() + "/fbgui.conf", QSettings::IniFormat); confFileSettings.setIniCodec("UTF-8"); @@ -87,15 +86,13 @@ int main(int argc, char *argv[]) // Setting target downloads directory. if (clo.contains("downloadDir")){ downloadPath = binPath + clo.value("downloadDir"); - if (debug) qDebug() << "clo set downloadDir to: " << binPath + clo.value("downloadDir"); } else if (confFileSettings.contains("default/downloadDirectory")){ downloadPath = binPath + confFileSettings.value("default/downloadDirectory").toString(); - if (debug) qDebug() << "conf set downloadDir to: " << binPath + confFileSettings.value("default/downloadDirectory").toString(); } else downloadPath = binPath + "/downloads"; - if (debug) qDebug() << "Downloads will be saved to: " << downloadPath; + if (debug) qDebug() << "Downloads saved in: " << downloadPath; // Start fbgui. fbgui gui(&app); gui.setAttribute(Qt::WA_QuitOnClose, true); |