From 6fde95f2921208361f3e5de1f419930bdefdc7fd Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 8 Mar 2011 20:09:24 +0100 Subject: host lookup, better MAC/IP info functions, IP one doesn't quite work yet --- src/fbgui.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/fbgui.cpp') 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 #include #include +#include #include #include @@ -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); -- cgit v1.2.3-55-g7522