diff options
author | Jonathan Bauer | 2011-01-25 17:41:41 +0100 |
---|---|---|
committer | Jonathan Bauer | 2011-01-25 17:41:41 +0100 |
commit | fbcf15745ca822e69dc770b7d74bb86198ce13d1 (patch) | |
tree | 301d321d8181456554fb8f5882a211294a50f1fb | |
parent | yet another update (diff) | |
download | fbgui-fbcf15745ca822e69dc770b7d74bb86198ce13d1.tar.gz fbgui-fbcf15745ca822e69dc770b7d74bb86198ce13d1.tar.xz fbgui-fbcf15745ca822e69dc770b7d74bb86198ce13d1.zip |
fixed a few things...
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/fbbrowser.cpp | 8 | ||||
-rw-r--r-- | src/fbbrowser.h | 7 | ||||
-rwxr-xr-x | src/testApp.sh | 2 |
4 files changed, 9 insertions, 9 deletions
@@ -4,6 +4,7 @@ moc_*.* ui_*.* qrc_*.* *.swp +*.swo debug .project .cproject diff --git a/src/fbbrowser.cpp b/src/fbbrowser.cpp index 50fc86a..bd2eb8e 100644 --- a/src/fbbrowser.cpp +++ b/src/fbbrowser.cpp @@ -10,14 +10,14 @@ void fbbrowser::httpReadyRead() if(reply->error() == QNetworkReply::NoError) { qDebug() << "No error, loading given URL..."; - view->load(url); + view->load(this->baseUrl); } } fbbrowser::fbbrowser(const QUrl & url) { view = new QWebView(this); - + baseUrl = url; // Create QNetworkAccessManager which is needed to send/receive requests. manager = new QNetworkAccessManager(this); // Create a QNetworkRequest object and set its URL. @@ -27,8 +27,8 @@ fbbrowser::fbbrowser(const QUrl & url) // Check Internet connection // Let the manager send the request and receive the reply. // QNetworkReply *reply = manager->get(request); - *reply = manager->get(request); - connect(reply, SIGNAL(readyRead()), this, SLOT(httpReadyRead())); + reply = manager->get(request); + connect(reply, SIGNAL(finished()), this, SLOT(httpReadyRead())); //connect(reply, SIGNAL(finished()), this, SLOT()); // Check if the reply is an error message. diff --git a/src/fbbrowser.h b/src/fbbrowser.h index c869197..397f469 100644 --- a/src/fbbrowser.h +++ b/src/fbbrowser.h @@ -2,7 +2,6 @@ #define FBBROWSER_H #include <QtGui> -#include "ui_fbbrowser.h" #include <QtNetwork> class QWebView; @@ -22,11 +21,11 @@ public: Q_INVOKABLE void quitAll(); private: - QUrl url; + QUrl baseUrl; QNetworkRequest request; QNetworkReply *reply; - QWebView * view; - QNetworkAccessManager * manager; + QWebView *view; + QNetworkAccessManager *manager; //QApplication * app(int & argc, char ** argv); private slots: diff --git a/src/testApp.sh b/src/testApp.sh index 0995695..5b8768f 100755 --- a/src/testApp.sh +++ b/src/testApp.sh @@ -10,7 +10,7 @@ fi sleep 1 # Start the fbbrowser app. # This requires the fbgui git repository to be in the user's home directory. -export PATH=~/fbgui/fbbrowser/:$PATH +export PATH=~/fbgui/src:$PATH fbgui -qws $1 # Check if fbbrowser is not running, if so kill the qvfb. if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ] |