refs #712, display error when network interface is not available

This commit is contained in:
Klaus Basan
2016-07-24 01:37:03 +02:00
parent dc3f803762
commit 9fe6d7417f
2 changed files with 12 additions and 1 deletions

View File

@@ -27,7 +27,11 @@ int main(int argc, char *argv[])
CSwiftGuiStdApplication a;
a.signalStartupAutomatically(); // application will signal startup on its own
a.splashScreen(":/own/icons/own/swift/swiftCirclePilotClient1024.png");
if (!a.start()) { return EXIT_FAILURE; }
if (!a.start())
{
a.gracefulShutdown();
return EXIT_FAILURE;
}
//! [SwiftApplicationDemo]
// show window

View File

@@ -27,6 +27,7 @@
#include "blackgui/managedstatusbar.h"
#include "blackgui/overlaymessagesframe.h"
#include "blackgui/stylesheetutility.h"
#include "blackmisc/network/networkutils.h"
#include "blackmisc/loghandler.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/logpattern.h"
@@ -49,6 +50,7 @@ using namespace BlackConfig;
using namespace BlackCore;
using namespace BlackCore::Context;
using namespace BlackMisc;
using namespace BlackMisc::Network;
using namespace BlackMisc::Input;
using namespace BlackGui;
using namespace BlackGui::Components;
@@ -148,6 +150,11 @@ void SwiftGuiStd::init()
sGui->startUpCompleted(true);
this->m_init = true;
if (!CNetworkUtils::hasConnectedInterface())
{
CLogMessage(this).error("No network interface, software will not work properly");
}
}
void SwiftGuiStd::initStyleSheet()