summaryrefslogtreecommitdiffstats
path: root/fbbrowser/fbbrowser.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-01-13 16:09:14 +0100
committerJonathan Bauer2011-01-13 16:09:14 +0100
commitbb59a001a45dc9275bdbf59aa38d9ea2ec5c80b5 (patch)
tree7b6f66903c274689a691f9914f22f14e422a6196 /fbbrowser/fbbrowser.cpp
parentcommented home dir requirement ... (diff)
downloadfbgui-bb59a001a45dc9275bdbf59aa38d9ea2ec5c80b5.tar.gz
fbgui-bb59a001a45dc9275bdbf59aa38d9ea2ec5c80b5.tar.xz
fbgui-bb59a001a45dc9275bdbf59aa38d9ea2ec5c80b5.zip
more commentaries....
Diffstat (limited to 'fbbrowser/fbbrowser.cpp')
-rw-r--r--fbbrowser/fbbrowser.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/fbbrowser/fbbrowser.cpp b/fbbrowser/fbbrowser.cpp
index 813b14e..b53134c 100644
--- a/fbbrowser/fbbrowser.cpp
+++ b/fbbrowser/fbbrowser.cpp
@@ -8,18 +8,21 @@ fbbrowser::fbbrowser(const QUrl & url)
{
-
view = new QWebView(this);
- // check Internet connection
+ // Check Internet connection
+ // Create QNetworkAccessManager which is needed to send/receive requests.
manager = new QNetworkAccessManager(this);
+ // Create a QNetworkRequest object and set its URL.
QNetworkRequest request;
request.setUrl(url);
+ // Let the manager send the request and receive the reply.
QNetworkReply *reply = manager->get(request);
//connect(reply, SIGNAL(error()), this, SLOT());
//connect(reply, SIGNAL(finished()), this, SLOT());
+ // Check if the reply is an error message (?)
qDebug() << reply->error();
//TODO: error differentiation
@@ -46,11 +49,12 @@ fbbrowser::fbbrowser(const QUrl & url)
setCentralWidget(view);
}
+// Destructor
fbbrowser::~fbbrowser()
{
-
}
+//
void fbbrowser::addJSObject()
{
view->page()->mainFrame()->addToJavaScriptWindowObject(QString("webkitTest"), this);
@@ -66,6 +70,7 @@ void fbbrowser::writeText(QString text)
out << text << "\n";
}
+// This function needed now ?
void fbbrowser::quitAll()
{
//emit lastWindowClosed();