From a01ed9de193fc1d635200f8fae91c77d54921c62 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 8 Mar 2011 11:12:46 +0100 Subject: . --- src/DownloadManager.cpp | 1 + src/javascriptInterface.cpp | 14 +++----------- src/main.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/DownloadManager.cpp b/src/DownloadManager.cpp index adda63e..00fbd7c 100644 --- a/src/DownloadManager.cpp +++ b/src/DownloadManager.cpp @@ -47,6 +47,7 @@ void DownloadManager::startNextDownload() QString tmp = url.path(); tmp.remove(0, tmp.lastIndexOf(QChar('/')) + 1); outfile.setFileName(downloadDirectory.path() + "/" + tmp); + if (debug) qDebug() << "DM: Absolute path: " << downloadDirectory.path() + "/" + tmp; if (outfile.exists()){ if (debug) qDebug() << "File already exists. Skipping: " << url.toString(); startNextDownload(); diff --git a/src/javascriptInterface.cpp b/src/javascriptInterface.cpp index 98efdb7..e93d325 100644 --- a/src/javascriptInterface.cpp +++ b/src/javascriptInterface.cpp @@ -21,17 +21,9 @@ javascriptInterface::~javascriptInterface() {} QString javascriptInterface::getSysInfo(QString info) { sysInfo si; - if (debug) qDebug() << "Requested info: " << info; - if (debug) qDebug() << "sysInfo output: " << si.getInfo(info); - if (info == QString("time")){ - return si.getInfo(info); - } - if (info == QString("mac")){ - return si.getInfo(info); - //return "MAC_ADDRESS"; - } - else - return "no value"; + if (debug) qDebug() << "Requested info: " << info << endl + << "sysInfo output: " << si.getInfo(info); + return si.getInfo(info); } //------------------------------------------------------------------------------------------------------- void javascriptInterface::attachToDOM() diff --git a/src/main.cpp b/src/main.cpp index ad60715..81e10dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,11 +84,12 @@ int main(int argc, char *argv[]) baseURL = DEFAULT_URL; if (clo.contains("downloadDir")) - downloadDirectory = QDir(clo.value("downloadDir")); + downloadDirectory = QDir(clo.value("downloadDir")); else if (confFileSettings.contains("default/downloadDirectory")) - downloadDirectory = QDir(confFileSettings.value("default/downloadDirectory").toString()); + downloadDirectory = QDir(confFileSettings.value("default/downloadDirectory").toString()); else - downloadDirectory = QDir("."); + downloadDirectory = QDir("."); + if (debug) qDebug() << "Downloads will be saved to: " << downloadDirectory.dirName(); // Start fbgui. fbgui gui(&app); gui.show(); -- cgit v1.2.3-55-g7522