summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-05 21:16:27 +0100
committerJonathan Bauer2011-03-05 21:16:27 +0100
commit43ace31cd20932e604af948eb246a2c61d852972 (patch)
treeb8d87bf6dbf6902eb2e3be305b243ce2d3a171f7 /src/fbgui.cpp
parentprintUsage updated, random ideas... (diff)
downloadfbgui-43ace31cd20932e604af948eb246a2c61d852972.tar.gz
fbgui-43ace31cd20932e604af948eb246a2c61d852972.tar.xz
fbgui-43ace31cd20932e604af948eb246a2c61d852972.zip
-qws options not needed anymore (it is set in the constructor of QApplication.)
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index c6f7e0d..1851ad4 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -23,10 +23,11 @@ void printUsage()
int main(int argc, char *argv[])
{
-
-
// This is the main object of a QT Application.
- QApplication a(argc, argv);
+ // The third argument sets the application as the GUI-Server,
+ // so the same as using "-qws" when calling the application.
+ QApplication a(argc, argv, QApplication::GuiServer);
+ a.setQuitOnLastWindowClosed(true);
// Note: The QT arguments (-qws, -display etc) seems to be gone at this point.
// So we should be able to ignore the QT arguments when calling fbgui,
@@ -63,13 +64,15 @@ int main(int argc, char *argv[])
// Get the application path and prints on screen.
qDebug() << "Application Path: " << a.applicationDirPath();
- QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+;
// 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(killApp()), &a, SLOT(quit()));
+ // Alternative
+
// Display the browser.
fbb->show();