diff options
| author | Jonathan Bauer | 2011-03-05 22:39:20 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-05 22:39:20 +0100 |
| commit | 8847526c3de233e6764874e633d34963a70c59e9 (patch) | |
| tree | 9b0179e9d1840668ea3d3e6eb5dd7bfea71465a7 | |
| parent | downloadFile now needs a QUrl&, simplifies things (startDownload slot in jso ... (diff) | |
| download | fbgui-8847526c3de233e6764874e633d34963a70c59e9.tar.gz fbgui-8847526c3de233e6764874e633d34963a70c59e9.tar.xz fbgui-8847526c3de233e6764874e633d34963a70c59e9.zip | |
removed some old comments
| -rw-r--r-- | src/DownloadManager.cpp | 18 | ||||
| -rw-r--r-- | 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!\")"); |
