mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
Issue #77 getLogCategories returns a simple QStringList instead of our own class
This commit is contained in:
@@ -28,9 +28,9 @@ namespace BlackCore
|
||||
{
|
||||
namespace Db
|
||||
{
|
||||
const CLogCategoryList &CBackgroundDataUpdater::getLogCategories()
|
||||
const QStringList &CBackgroundDataUpdater::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats({ CLogCategory::worker(), CLogCategory::modelSetCache(), CLogCategory::modelCache() });
|
||||
static const QStringList cats({ CLogCategories::worker(), CLogCategories::modelSetCache(), CLogCategories::modelCache() });
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
//! Constructor
|
||||
CBackgroundDataUpdater(QObject *owner);
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace BlackCore
|
||||
{
|
||||
namespace Db
|
||||
{
|
||||
const CLogCategoryList &CDatabaseAuthenticationService::getLogCategories()
|
||||
const QStringList &CDatabaseAuthenticationService::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats { CLogCategory::swiftDbWebservice() };
|
||||
static const QStringList cats { CLogCategories::swiftDbWebservice() };
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
//! Constructor
|
||||
CDatabaseAuthenticationService(QObject *parent = nullptr);
|
||||
|
||||
@@ -710,12 +710,12 @@ namespace BlackCore
|
||||
return ts.toUTC().toString(Qt::ISODate);
|
||||
}
|
||||
|
||||
const CLogCategoryList &CDatabaseReader::getLogCategories()
|
||||
const QStringList &CDatabaseReader::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats = CThreadedReader::getLogCategories().with(
|
||||
static const QStringList cats = CThreadedReader::getLogCategories() + QStringList
|
||||
{
|
||||
CLogCategory::swiftDbWebservice(), CLogCategory::webservice()
|
||||
});
|
||||
CLogCategories::swiftDbWebservice(), CLogCategories::webservice()
|
||||
};
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace BlackCore
|
||||
virtual bool readFromJsonFilesInBackground(const QString &dir, BlackMisc::Network::CEntityFlags::Entity whatToRead, bool overrideNewer) = 0;
|
||||
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
//! Transform JSON data to response struct data
|
||||
//! \private used also for samples, that`s why it is declared public
|
||||
|
||||
@@ -23,9 +23,9 @@ namespace BlackCore
|
||||
{
|
||||
namespace Db
|
||||
{
|
||||
const CLogCategoryList &CDatabaseUtils::getLogCategories()
|
||||
const QStringList &CDatabaseUtils::getLogCategories()
|
||||
{
|
||||
static const BlackMisc::CLogCategoryList cats { CLogCategory::modelCache(), CLogCategory::modelSetCache() };
|
||||
static const QStringList cats { CLogCategories::modelCache(), CLogCategories::modelSetCache() };
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackCore
|
||||
CDatabaseUtils() = delete;
|
||||
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
//! Consolidate models with simulator model data (aka "models on disk")
|
||||
//! \remark kept here with the other consolidate functions, but actually DB independent
|
||||
|
||||
@@ -150,11 +150,11 @@ namespace BlackCore
|
||||
return n;
|
||||
}
|
||||
|
||||
const CLogCategoryList &CDatabaseWriter::getLogCategories()
|
||||
const QStringList &CDatabaseWriter::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats
|
||||
static const QStringList cats
|
||||
{
|
||||
CLogCategory::swiftDbWebservice(), CLogCategory::webservice()
|
||||
CLogCategories::swiftDbWebservice(), CLogCategories::webservice()
|
||||
};
|
||||
return cats;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ namespace BlackCore
|
||||
|
||||
void CDatabaseWriter::postedAutoPublishResponse(QNetworkReply *nwReplyPtr)
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::swiftDbWebservice()}));
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategories::swiftDbWebservice()}));
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
|
||||
if (m_shutdown || !sApp)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace BlackCore
|
||||
const BlackMisc::Network::CUrlLogList &getWriteLog() const { return m_writeLog; }
|
||||
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
signals:
|
||||
//! Published models, the response to \sa asyncPublishModels
|
||||
|
||||
@@ -22,12 +22,12 @@ namespace BlackCore
|
||||
{
|
||||
namespace Db
|
||||
{
|
||||
const CLogCategoryList &CNetworkWatchdog::getLogCategories()
|
||||
const QStringList &CNetworkWatchdog::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats = CContinuousWorker::getLogCategories().with(
|
||||
static const QStringList cats = CContinuousWorker::getLogCategories() + QStringList
|
||||
{
|
||||
CLogCategory::swiftDbWebservice(), CLogCategory::webservice(), CLogCategory::network()
|
||||
});
|
||||
CLogCategories::swiftDbWebservice(), CLogCategories::webservice(), CLogCategories::network()
|
||||
};
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
//! Log categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
static const QStringList &getLogCategories();
|
||||
|
||||
//! Ctor
|
||||
explicit CNetworkWatchdog(bool networkAccessible, QObject *owner);
|
||||
|
||||
Reference in New Issue
Block a user