diff options
| author | Jonathan Bauer | 2011-02-22 13:06:58 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-02-22 13:06:58 +0100 |
| commit | 5e0bb329e1f04307b09f9facb4cc0ffc8ad71b89 (patch) | |
| tree | 3cf8a21b1edfd4432b9041894e9b887ec30c153e /src | |
| parent | DownloadManager fixed download initialization. (diff) | |
| download | fbgui-5e0bb329e1f04307b09f9facb4cc0ffc8ad71b89.tar.gz fbgui-5e0bb329e1f04307b09f9facb4cc0ffc8ad71b89.tar.xz fbgui-5e0bb329e1f04307b09f9facb4cc0ffc8ad71b89.zip | |
removed old test stuff...
Diffstat (limited to 'src')
| -rw-r--r-- | src/fbbrowser.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/fbbrowser.cpp b/src/fbbrowser.cpp index d4762d8..edfea36 100644 --- a/src/fbbrowser.cpp +++ b/src/fbbrowser.cpp @@ -5,41 +5,16 @@ #include <QtWebKit> #include "jsObject.h" -// This function is not used at the moment. -// TODO: Fix function or find another way... void fbbrowser::httpReqFinished() { - // This slot listens to readyRead() signal from our QNetworkReply. - qDebug() << "finished() signal emmited!" << endl; - if(reply->error() == QNetworkReply::NoError) - { - qDebug() << "No error, loading given URL..."; - view->load(this->baseUrl); - } } void fbbrowser::saveData() { - QFile outfile(filename); - if (!outfile.open(QIODevice::WriteOnly)) - { - qDebug() << "Couldnt open file! exiting..."; - exit(1); - } - outfile.write(qiod->readAll()); - outfile.close(); } -// This function requires the file name of the file to download. void fbbrowser::download(const QString &file) { - // This function is in developement... - QUrl u = baseUrl.resolved(file); - req.setUrl(u); - rep = manager->get(req); - QIODevice* qiod2 = rep; - qiod = rep; - QObject::connect(rep, SIGNAL(finished()), this, SLOT(saveData())); } fbbrowser::fbbrowser(const QUrl & url) @@ -76,13 +51,11 @@ fbbrowser::fbbrowser(const QUrl & url) view->load(QUrl("qrc:/html/errorPage.html")); } // **** TEST **** - // This part is just a test call of download()... DownloadManager* dm = new DownloadManager(); dm->print(); - //dm.setUrl(baseUrl); - //dm.downloadFile("test.php"); - filename = "test.php"; - download(filename); + dm->setUrl(baseUrl); + QString qs = "test.php"; + dm->downloadFile(qs); // **** TEST **** //remove the window decoration |
