mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Ref T515, some minor adjustments
* use validation status messages for prerequisites * SwiftGuiStd::onRequestedConsoleMessage * displayInOverlayWindow for HTML messages
This commit is contained in:
committed by
Mat Sutcliffe
parent
cea6611656
commit
85cf339e04
@@ -389,6 +389,15 @@ void SwiftGuiStd::onChangedMainInfoAreaFloating(bool floating)
|
||||
Q_UNUSED(floating);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onRequestedConsoleMessage(const QString &logMsg, bool clear)
|
||||
{
|
||||
if (logMsg.isEmpty()) { return; }
|
||||
CLogComponent *log = ui->comp_MainInfoArea->getLogComponent();
|
||||
Q_ASSERT_X(log, Q_FUNC_INFO, "Missing log component");
|
||||
if (clear) { log->clearConsole(); }
|
||||
log->appendPlainTextToConsole(logMsg);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::showMinimized()
|
||||
{
|
||||
this->showMinimizedModeChecked();
|
||||
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
bool m_init = false;
|
||||
|
||||
// contexts
|
||||
static constexpr int MaxCoreFailures = 5; //!< Failures counted before reconnecting
|
||||
static constexpr int MaxCoreFailures = 5; //!< Failures counted before reconnecting
|
||||
int m_coreFailures = 0; //!< failed access to core
|
||||
bool m_coreAvailable = false; //!< core already available?
|
||||
bool m_contextNetworkAvailable = false; //!< network context available?
|
||||
@@ -252,6 +252,9 @@ private:
|
||||
//! Whole main info area floating
|
||||
void onChangedMainInfoAreaFloating(bool floating);
|
||||
|
||||
//! UI Console message has been recevied
|
||||
void onRequestedConsoleMessage(const QString &logMsg, bool clear);
|
||||
|
||||
//! Show window minimized
|
||||
void showMinimized();
|
||||
|
||||
|
||||
@@ -129,15 +129,7 @@ void SwiftGuiStd::init()
|
||||
Q_ASSERT(s);
|
||||
s = connect(sGui->getIContextNetwork(), &IContextNetwork::kicked, this, &SwiftGuiStd::onKickedFromNetwork, Qt::QueuedConnection);
|
||||
Q_ASSERT(s);
|
||||
s = connect(sGui->getIContextSimulator(), &IContextSimulator::requestUiConsoleMessage, this, [ = ](const QString & logMsg, bool clear)
|
||||
{
|
||||
if (logMsg.isEmpty()) { return; }
|
||||
CLogComponent *log = ui->comp_MainInfoArea->getLogComponent();
|
||||
Q_ASSERT_X(log, Q_FUNC_INFO, "Missing log component");
|
||||
if (clear) { log->clearConsole(); }
|
||||
log->appendPlainTextToConsole(logMsg);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
s = connect(sGui->getIContextSimulator(), &IContextSimulator::requestUiConsoleMessage, this, &SwiftGuiStd::onRequestedConsoleMessage, Qt::QueuedConnection);
|
||||
Q_ASSERT(s);
|
||||
s = connect(&m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::handleTimerBasedUpdates);
|
||||
Q_ASSERT(s);
|
||||
|
||||
Reference in New Issue
Block a user