mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45: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;
|
CSwiftGuiStdApplication a;
|
||||||
a.signalStartupAutomatically(); // application will signal startup on its own
|
a.signalStartupAutomatically(); // application will signal startup on its own
|
||||||
a.splashScreen(":/own/icons/own/swift/swiftCirclePilotClient1024.png");
|
a.splashScreen(":/own/icons/own/swift/swiftCirclePilotClient1024.png");
|
||||||
if (!a.start()) { return EXIT_FAILURE; }
|
if (!a.start())
|
||||||
|
{
|
||||||
|
a.gracefulShutdown();
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
//! [SwiftApplicationDemo]
|
//! [SwiftApplicationDemo]
|
||||||
|
|
||||||
// show window
|
// show window
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "blackgui/managedstatusbar.h"
|
#include "blackgui/managedstatusbar.h"
|
||||||
#include "blackgui/overlaymessagesframe.h"
|
#include "blackgui/overlaymessagesframe.h"
|
||||||
#include "blackgui/stylesheetutility.h"
|
#include "blackgui/stylesheetutility.h"
|
||||||
|
#include "blackmisc/network/networkutils.h"
|
||||||
#include "blackmisc/loghandler.h"
|
#include "blackmisc/loghandler.h"
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
#include "blackmisc/logpattern.h"
|
#include "blackmisc/logpattern.h"
|
||||||
@@ -49,6 +50,7 @@ using namespace BlackConfig;
|
|||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
using namespace BlackCore::Context;
|
using namespace BlackCore::Context;
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackMisc::Network;
|
||||||
using namespace BlackMisc::Input;
|
using namespace BlackMisc::Input;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
using namespace BlackGui::Components;
|
using namespace BlackGui::Components;
|
||||||
@@ -148,6 +150,11 @@ void SwiftGuiStd::init()
|
|||||||
|
|
||||||
sGui->startUpCompleted(true);
|
sGui->startUpCompleted(true);
|
||||||
this->m_init = true;
|
this->m_init = true;
|
||||||
|
|
||||||
|
if (!CNetworkUtils::hasConnectedInterface())
|
||||||
|
{
|
||||||
|
CLogMessage(this).error("No network interface, software will not work properly");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::initStyleSheet()
|
void SwiftGuiStd::initStyleSheet()
|
||||||
|
|||||||
Reference in New Issue
Block a user