summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index ac078e0..6c2eead 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -5,6 +5,7 @@
#include <iostream>
#include <QUrl>
#include <QDir>
+#include <QHostInfo>
#include <QtWebKit>
#include <QApplication>
@@ -17,6 +18,14 @@ bool debug = false;
fbgui::fbgui(QApplication *parent)
{
if (debug) qDebug() << "Application dir path: " << QApplication::applicationDirPath();
+
+ /* Lookup hostname */
+ QHostInfo hostInfo = QHostInfo::fromName(baseURL.host());
+ if (hostInfo.error() != QHostInfo::NoError){
+ if (debug) qDebug() << "Lookup of " << baseURL.host() << "failed." << "Exiting...";
+ exit(EXIT_FAILURE);
+ }
+
/* Browser init. */
QWebView* webView = new QWebView(this);
webView->load(baseURL);