mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
DB watchdog also emits URL in signal (allows to display the failed URL)
This commit is contained in:
@@ -38,9 +38,9 @@ namespace BlackGui
|
||||
m_timer.setObjectName("CInfoBarWebReadersStatusBase::CheckSwiftDbTimer");
|
||||
bool c = connect(&m_timer, &QTimer::timeout, this, &CInfoBarWebReadersStatusBase::checkServerAndData);
|
||||
Q_ASSERT_X(c, Q_FUNC_INFO, "Failed connect");
|
||||
c = connect(sGui, &CGuiApplication::changedInternetAccessibility, this, &CInfoBarWebReadersStatusBase::accessibilityChanged);
|
||||
c = connect(sGui, &CGuiApplication::changedInternetAccessibility, this, &CInfoBarWebReadersStatusBase::networkAccessibilityChanged);
|
||||
Q_ASSERT_X(c, Q_FUNC_INFO, "Failed connect");
|
||||
c = connect(sGui, &CGuiApplication::changedSwiftDbAccessibility, this, &CInfoBarWebReadersStatusBase::accessibilityChanged);
|
||||
c = connect(sGui, &CGuiApplication::changedSwiftDbAccessibility, this, &CInfoBarWebReadersStatusBase::dbAccessibilityChanged);
|
||||
Q_ASSERT_X(c, Q_FUNC_INFO, "Failed connect");
|
||||
|
||||
if (sGui->hasWebDataServices())
|
||||
@@ -85,12 +85,19 @@ namespace BlackGui
|
||||
if (!leds.isEmpty()) { this->setLedReadStates(leds, readState); }
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusBase::accessibilityChanged(bool accessible)
|
||||
void CInfoBarWebReadersStatusBase::networkAccessibilityChanged(bool accessible)
|
||||
{
|
||||
Q_UNUSED(accessible);
|
||||
this->checkServerAndData();
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusBase::dbAccessibilityChanged(bool accessible, const CUrl &testedUrl)
|
||||
{
|
||||
Q_UNUSED(accessible);
|
||||
Q_UNUSED(testedUrl);
|
||||
this->checkServerAndData();
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusBase::checkServerAndData()
|
||||
{
|
||||
const bool swift = sGui && sGui->isSwiftDbAccessible();
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackgui/led.h"
|
||||
#include "blackmisc/network/url.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
|
||||
#include <QFrame>
|
||||
@@ -72,8 +73,11 @@ namespace BlackGui
|
||||
//! Data have been read
|
||||
void dataRead(BlackMisc::Network::CEntityFlags::Entity entities, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! DB or network accessibility changed
|
||||
void accessibilityChanged(bool accessible);
|
||||
//! Network accessibility changed
|
||||
void networkAccessibilityChanged(bool accessible);
|
||||
|
||||
//! DB accessibility changed
|
||||
void dbAccessibilityChanged(bool accessible, const BlackMisc::Network::CUrl &testedUrl);
|
||||
|
||||
//! Check server status
|
||||
void checkServerAndData();
|
||||
|
||||
Reference in New Issue
Block a user