mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
refactor: Remove non-watchdog related method from WatchDog
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include "blackcore/db/databasereader.h"
|
||||
#include "blackcore/db/infodatareader.h"
|
||||
#include "blackcore/db/databaseutils.h"
|
||||
#include "blackcore/db/networkwatchdog.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackmisc/db/datastoreutility.h"
|
||||
@@ -794,7 +793,7 @@ namespace BlackCore::Db
|
||||
|
||||
bool CDatabaseReader::JsonDatastoreResponse::isLoadedFromDb() const
|
||||
{
|
||||
return CNetworkWatchdog::isDbUrl(this->getUrl());
|
||||
return this->getUrl().getHost() == getDbUrl().getHost();
|
||||
}
|
||||
|
||||
void CDatabaseReader::JsonDatastoreResponse::setJsonArray(const QJsonArray &value)
|
||||
|
||||
@@ -96,12 +96,6 @@ namespace BlackCore::Db
|
||||
m_workingSharedUrl = workingUrl;
|
||||
}
|
||||
|
||||
bool CNetworkWatchdog::isDbUrl(const CUrl &url)
|
||||
{
|
||||
const QString host(url.getHost());
|
||||
return host == dbHost();
|
||||
}
|
||||
|
||||
void CNetworkWatchdog::doWork()
|
||||
{
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
@@ -353,12 +347,6 @@ namespace BlackCore::Db
|
||||
return testUrl;
|
||||
}
|
||||
|
||||
QString CNetworkWatchdog::dbHost()
|
||||
{
|
||||
const QString host = dbTestUrl().getHost();
|
||||
return host;
|
||||
}
|
||||
|
||||
CUrl CNetworkWatchdog::workingSharedUrlFromSetup()
|
||||
{
|
||||
const CUrlList urls(sApp->getGlobalSetup().getSwiftSharedUrls());
|
||||
|
||||
@@ -126,10 +126,6 @@ namespace BlackCore::Db
|
||||
//! \threadsafe
|
||||
bool isNetworkAccessibilityCheckEnabled() const { return !this->isNetworkAccessibilityCheckDisabled(); }
|
||||
|
||||
//! URL referring to the DB
|
||||
//! \remark depends on BlackCore::Application::getGlobalSetup()
|
||||
static bool isDbUrl(const BlackMisc::Network::CUrl &url);
|
||||
|
||||
//! The URL being tested
|
||||
//! \remark depends on BlackCore::Application::getGlobalSetup()
|
||||
//! \private primarily accessible for unit tests
|
||||
@@ -164,10 +160,6 @@ namespace BlackCore::Db
|
||||
//! Received reply of client service ping
|
||||
void replyPingClientService(QNetworkReply *nwReply);
|
||||
|
||||
//! The DB server
|
||||
//! \remark depends on BlackCore::Application::getGlobalSetup()
|
||||
static QString dbHost();
|
||||
|
||||
//! Obtain working DB data file location URL
|
||||
//! \remark depends on BlackCore::Application::getGlobalSetup()
|
||||
static BlackMisc::Network::CUrl workingSharedUrlFromSetup();
|
||||
|
||||
Reference in New Issue
Block a user