diff options
| author | Jonathan Bauer | 2011-03-08 20:09:24 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-08 20:09:24 +0100 |
| commit | 6fde95f2921208361f3e5de1f419930bdefdc7fd (patch) | |
| tree | e1d32448ea39c6fab2e911b53ac5814fa40b3d6b /src/fbgui.cpp | |
| parent | Merge branch 'master' of git.openslx.org:lsfks/master-teamprojekt/fbgui (diff) | |
| download | fbgui-6fde95f2921208361f3e5de1f419930bdefdc7fd.tar.gz fbgui-6fde95f2921208361f3e5de1f419930bdefdc7fd.tar.xz fbgui-6fde95f2921208361f3e5de1f419930bdefdc7fd.zip | |
host lookup, better MAC/IP info functions, IP one doesn't quite work yet
Diffstat (limited to 'src/fbgui.cpp')
| -rw-r--r-- | src/fbgui.cpp | 9 |
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); |
