summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-01-18 17:32:26 +0100
committerJonathan Bauer2011-01-18 17:32:26 +0100
commit850c1216537731adb92d8d24e5a8a0c67af4df9c (patch)
tree689faa5e304350d3d4ecb1fd76d5cc18e5613145
parentanother update... (diff)
downloadfbgui-850c1216537731adb92d8d24e5a8a0c67af4df9c.tar.gz
fbgui-850c1216537731adb92d8d24e5a8a0c67af4df9c.tar.xz
fbgui-850c1216537731adb92d8d24e5a8a0c67af4df9c.zip
Added a check for validity of URL, incomplete though ! It doesn't seem to check if the hostname is valid or not ...
-rwxr-xr-xfbbrowser/fbbrowserbin518639 -> 521879 bytes
-rw-r--r--fbbrowser/main.cpp17
-rwxr-xr-xfbbrowser/testApp.sh2
3 files changed, 13 insertions, 6 deletions
diff --git a/fbbrowser/fbbrowser b/fbbrowser/fbbrowser
index 7217e13..03a4448 100755
--- a/fbbrowser/fbbrowser
+++ b/fbbrowser/fbbrowser
Binary files differ
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();
}
diff --git a/fbbrowser/testApp.sh b/fbbrowser/testApp.sh
index 978fc42..5e1c316 100755
--- a/fbbrowser/testApp.sh
+++ b/fbbrowser/testApp.sh
@@ -5,7 +5,7 @@
sleep 1
# Start the fbbrowser app.
# This requires the fbgui git repository to be in the user's home directory.
-~/fbgui/fbbrowser/fbbrowser -qws
+~/fbgui/fbbrowser/fbbrowser -qws http://1234.500.1
# Check if fbbrowser is not running, if so kill the qvfb.
if [ $(ps aux | grep -v grep | grep -c fbbrowser) -eq 1 ]
then