From 8ed850338461fa0264864c3177f94effd9cc8427 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 13 Jan 2011 15:32:59 +0100 Subject: test commit --- fbbrowser/main.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'fbbrowser/main.cpp') diff --git a/fbbrowser/main.cpp b/fbbrowser/main.cpp index e0210f5..7f51a6f 100644 --- a/fbbrowser/main.cpp +++ b/fbbrowser/main.cpp @@ -6,6 +6,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); + // Is this really needed, since we kill the app through the fbbrowser object? QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); QUrl url; -- cgit v1.2.3-55-g7522 From 3a94024664a2ac3198b2cc3a99ea769db228c0ab Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 13 Jan 2011 15:36:53 +0100 Subject: einige kommentare hingefügt... --- fbbrowser/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'fbbrowser/main.cpp') diff --git a/fbbrowser/main.cpp b/fbbrowser/main.cpp index 7f51a6f..aa6da2e 100644 --- a/fbbrowser/main.cpp +++ b/fbbrowser/main.cpp @@ -9,14 +9,18 @@ int main(int argc, char *argv[]) // Is this really needed, since we kill the app through the fbbrowser object? QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); + // This part reads the URL to load from the arguments given through the commandline. QUrl url; if (argc > 1) url = QUrl(argv[1]); - else //Default + 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(); + // Exit the application. return a.exec(); } -- cgit v1.2.3-55-g7522 From 0e0f78882d2a6d5da20b82557ff8a63738d6c14a Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 13 Jan 2011 16:02:26 +0100 Subject: Script for testing the app ine one go... --- fbbrowser/main.cpp | 1 + fbbrowser/testApp.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 fbbrowser/testApp.sh (limited to 'fbbrowser/main.cpp') diff --git a/fbbrowser/main.cpp b/fbbrowser/main.cpp index aa6da2e..fc333fb 100644 --- a/fbbrowser/main.cpp +++ b/fbbrowser/main.cpp @@ -5,6 +5,7 @@ int main(int argc, char *argv[]) { + // This is the main object of a QT Application. QApplication a(argc, argv); // Is this really needed, since we kill the app through the fbbrowser object? QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); diff --git a/fbbrowser/testApp.sh b/fbbrowser/testApp.sh new file mode 100755 index 0000000..4041cf3 --- /dev/null +++ b/fbbrowser/testApp.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Start QT's virtual framebuffer +/usr/local/Trolltech/Qt-4.7.1/bin/qvfb -width 800 -height 600 & +# Wait for it to load (needed?) +sleep 1 +# Start the fbbrowser app. +/home/joe/fbgui/fbbrowser/fbbrowser -qws +# Check if fbbrowser is not running, if so kill the qvfb. +if ps aux | grep -v grep | grep fbbrowser > /dev/null +then + echo "fbbrowser is still running ..." +else + echo "fbbrowser stopped running, killing qvfb ..." + killall qvfb +fi -- cgit v1.2.3-55-g7522