summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index cc10f20..6b70214 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -5,6 +5,7 @@
#include <QApplication>
#include <QSettings>
+#include <QUrl>
void printUsage()
{
@@ -21,19 +22,26 @@ void printUsage()
int main(int argc, char *argv[])
{
+
+
+ // This is the main object of a QT Application.
+ QApplication a(argc, argv);
+
/* SETTINGS TEST */
CommandLineOptions clOptions(argc, argv);
-
+ QUrl url;
+ if (clOptions.contains("url"))
+ {
+ qDebug() << "URL from clOptions is: " << clOptions.value("url");
+ url = clOptions.value("url");
+ }
+ else
+ url = QUrl("qrc:/html/errorPage.html");
// TODO: parse url arg from CommmandLineOptions object.
- // hackfix for now...
- QUrl url = QUrl(argv[4]);
- QUrl defaultUrl = QUrl("http://132.230.4.3/webkitTest.html");
- qDebug() << "URL given: " << url.toString();
/* SETTINGS TEST */
- // This is the main object of a QT Application.
- QApplication a(argc, argv);
+
// Get the application path and prints on screen.
qDebug() << "Application Path: " << a.applicationDirPath();
// Is this really needed, since we kill the app through the fbbrowser object?