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 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/DownloadManager.cpp') 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)) { -- cgit v1.2.3-55-g7522