mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
refactor: Remove unused functions
This commit is contained in:
@@ -90,11 +90,6 @@ namespace BlackCore::Data
|
||||
return getDbRootDirectoryUrl().withAppendedPath("/service/jsonauthenticate.php").withSwitchedScheme("https", m_dbHttpsPort);
|
||||
}
|
||||
|
||||
CUrl CGlobalSetup::getAlphaXSwiftBusFilesServiceUrl() const
|
||||
{
|
||||
return getDbRootDirectoryUrl().withAppendedPath("/service/jsonalphaxswiftbusfiles.php").withSwitchedScheme("https", m_dbHttpsPort);
|
||||
}
|
||||
|
||||
bool CGlobalSetup::dbDebugFlag() const
|
||||
{
|
||||
return m_dbDebugFlag && CBuildConfig::isLocalDeveloperDebugBuild();
|
||||
|
||||
@@ -97,9 +97,6 @@ namespace BlackCore::Data
|
||||
//! \remark based on getDbRootDirectoryUrl
|
||||
BlackMisc::Network::CUrl getDbLoginServiceUrl() const;
|
||||
|
||||
//! alpha xswiftbus files available
|
||||
BlackMisc::Network::CUrl getAlphaXSwiftBusFilesServiceUrl() const;
|
||||
|
||||
//! Shared URLs
|
||||
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
|
||||
|
||||
|
||||
@@ -377,35 +377,6 @@ namespace BlackCore::Db
|
||||
if (!this->hasSharedFileHeader(entity)) { return e; }
|
||||
return m_sharedFileResponses[entity].getLastModifiedTimestamp();
|
||||
}
|
||||
|
||||
int CDatabaseReader::requestHeadersOfSharedFiles(CEntityFlags::Entity entities)
|
||||
{
|
||||
CEntityFlags::Entity allEntities = entities & CEntityFlags::AllDbEntitiesNoInfoObjects;
|
||||
CEntityFlags::Entity currentEntity = CEntityFlags::iterateDbEntities(allEntities);
|
||||
const CUrl urlSharedDbdata = CDatabaseReader::getSharedDbdataDirectoryUrl();
|
||||
if (urlSharedDbdata.isEmpty())
|
||||
{
|
||||
CLogMessage(this).warning(u"No working shared URL, cannot request headers");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int c = 0;
|
||||
while (currentEntity != CEntityFlags::NoEntity)
|
||||
{
|
||||
const QString fileName = CDbInfo::entityToSharedName(currentEntity);
|
||||
Q_ASSERT_X(!fileName.isEmpty(), Q_FUNC_INFO, "No file name for entity");
|
||||
CUrl url = urlSharedDbdata;
|
||||
url.appendPath(fileName);
|
||||
|
||||
const QString entityString = CEntityFlags::entitiesToString(currentEntity);
|
||||
CLogMessage(this).info(u"Triggered read of header for shared file of '%1'") << entityString;
|
||||
const QNetworkReply *reply = sApp->headerFromNetwork(url, { this, &CDatabaseReader::receivedSharedFileHeader });
|
||||
if (reply) { c++; }
|
||||
currentEntity = CEntityFlags::iterateDbEntities(allEntities);
|
||||
}
|
||||
return c > 0;
|
||||
}
|
||||
|
||||
bool CDatabaseReader::isSharedHeaderNewerThanCacheTimestamp(CEntityFlags::Entity entity) const
|
||||
{
|
||||
Q_ASSERT_X(CEntityFlags::isSingleEntity(entity), Q_FUNC_INFO, "need single entity");
|
||||
@@ -716,12 +687,6 @@ namespace BlackCore::Db
|
||||
return q;
|
||||
}
|
||||
|
||||
const QString &CDatabaseReader::parameterLatestId()
|
||||
{
|
||||
static const QString p("latestId");
|
||||
return p;
|
||||
}
|
||||
|
||||
const CUrl &CDatabaseReader::getDbUrl()
|
||||
{
|
||||
static const CUrl dbUrl(sApp->getGlobalSetup().getDbRootDirectoryUrl());
|
||||
|
||||
@@ -254,10 +254,6 @@ namespace BlackCore::Db
|
||||
//! Those entities where the timestamp of a shared info object is newer than the cache timestamp
|
||||
BlackMisc::Network::CEntityFlags::Entity getEntitesWithNewerSharedInfoObject(BlackMisc::Network::CEntityFlags::Entity entities) const;
|
||||
|
||||
//! Request headers of shared file
|
||||
//! \return number of requested headers
|
||||
int requestHeadersOfSharedFiles(BlackMisc::Network::CEntityFlags::Entity entities);
|
||||
|
||||
//! Status message (error message)
|
||||
const QString &getStatusMessage() const;
|
||||
|
||||
@@ -356,9 +352,6 @@ namespace BlackCore::Db
|
||||
//! Name of latest timestamp
|
||||
static const QString ¶meterLatestTimestamp();
|
||||
|
||||
//! Name of parameter for latest id
|
||||
static const QString ¶meterLatestId();
|
||||
|
||||
//! A newer than value understood by swift DB
|
||||
//! \sa CDatabaseReader::parameterLatestTimestamp
|
||||
static QString dateTimeToDbLatestTs(const QDateTime &ts);
|
||||
|
||||
Reference in New Issue
Block a user