summaryrefslogtreecommitdiffstats
path: root/fbbrowser/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fbbrowser/main.cpp')
-rw-r--r--fbbrowser/main.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/fbbrowser/main.cpp b/fbbrowser/main.cpp
index fc333fb..869d71c 100644
--- a/fbbrowser/main.cpp
+++ b/fbbrowser/main.cpp
@@ -17,11 +17,18 @@ int main(int argc, char *argv[])
else //Default URL to load
url = QUrl("http://132.230.4.3/webkitTest.html");
// Create a new Framebuffer-Browser object for displaying the given URL.
- fbbrowser *fbb = new fbbrowser(url);
- // Listen to the signalQuitAll() Signal to kill the app from within the browser.
- QObject::connect(fbb, SIGNAL(signalQuitAll()), &a, SLOT(quit()));
- // Display the browser.
- fbb->show();
+ if (!url.isValid())
+ qDebug() << "Invalid URL.";
+ // qDebug() << "Badly formed URL!";
+ else
+ {
+ qDebug() << "Valid URL.";
+ fbbrowser *fbb = new fbbrowser(url);
+ // Listen to the signalQuitAll() Signal to kill the app from within the browser.
+ QObject::connect(fbb, SIGNAL(signalQuitAll()), &a, SLOT(quit()));
+ // Display the browser.
+ fbb->show();
+ }
// Exit the application.
return a.exec();
}