mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #712, display error when network interface is not available
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user