refactor: Remove non-watchdog related method from WatchDog

This commit is contained in:
Lars Toenning
2024-03-12 15:56:48 +01:00
parent 997f016deb
commit 972de0777c
3 changed files with 1 additions and 22 deletions

View File

@@ -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)

View File

@@ -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());

View File

@@ -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();