From 8847526c3de233e6764874e633d34963a70c59e9 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Sat, 5 Mar 2011 22:39:20 +0100 Subject: removed some old comments --- src/DownloadManager.cpp | 18 ++++-------------- src/JSObject.cpp | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/DownloadManager.cpp b/src/DownloadManager.cpp index b89a371..33c8952 100644 --- a/src/DownloadManager.cpp +++ b/src/DownloadManager.cpp @@ -35,21 +35,11 @@ void DownloadManager::startNextDownload() } // Dequeue next URL to download. QUrl url = dlQ.dequeue(); - QString filepath = url.path(); + QString tmp = url.path(); // Get filename from URL. - int i = filepath.lastIndexOf(QChar('/')); - filepath.remove(0, i + 1); - qDebug() << "From: " << url.toString() << endl - << "Parsed: " << filepath; - outfile.setFileName(filepath); - /* - qDebug() << "url.path() is:" << url.path(); - if (basename.isEmpty()) - this->filename = "download"; - else - this->filename = basename; - outfile.setFileName(this->filename); - */ + tmp.remove(0, tmp.lastIndexOf(QChar('/')) + 1); + outfile.setFileName(tmp); + // If error upon opening, skip this file. if (!outfile.open(QIODevice::WriteOnly)) { diff --git a/src/JSObject.cpp b/src/JSObject.cpp index 062f4cc..10cffad 100644 --- a/src/JSObject.cpp +++ b/src/JSObject.cpp @@ -23,7 +23,6 @@ void JSObject::attachToDOM() //------------------------------------------------------------------------------------------------------- void JSObject::startDownload(QString filename) { - if (filename.isEmpty()) { owner->evaluateJavaScript("alert(\"No filename!\")"); -- cgit v1.2.3-55-g7522