mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Added with() and withValidation() methods in CLogCategoryList.
This commit is contained in:
@@ -179,7 +179,7 @@ namespace BlackCore
|
||||
Q_ASSERT(m_voice);
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
CAudioDeviceInfoList devices = m_voiceOutputDevice->getOutputDevices();
|
||||
devices = devices.join(m_voiceInputDevice->getInputDevices());
|
||||
devices.push_back(m_voiceInputDevice->getInputDevices());
|
||||
return devices;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace BlackCore
|
||||
CStatusMessageList CDatabaseAuthenticationService::login(const QString &username, const QString &password)
|
||||
{
|
||||
CStatusMessageList msgs;
|
||||
static const CLogCategoryList cats(getLogCategories().join({ CLogCategory::validation() }));
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||
|
||||
if (!sApp || m_shutdown) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Shutdown in progress")); return msgs; }
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace BlackCore
|
||||
return;
|
||||
}
|
||||
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation()}));
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||
const QJsonObject jsonObj(Json::jsonObjectFromString(json));
|
||||
CAuthenticatedUser user = CAuthenticatedUser::fromDatabaseJson(jsonObj.contains("user") ? jsonObj["user"].toObject() : jsonObj);
|
||||
CStatusMessageList msgs;
|
||||
|
||||
@@ -708,10 +708,10 @@ namespace BlackCore
|
||||
|
||||
const CLogCategoryList &CDatabaseReader::getLogCategories()
|
||||
{
|
||||
static const BlackMisc::CLogCategoryList cats
|
||||
(
|
||||
CThreadedReader::getLogCategories().join({ CLogCategory::swiftDbWebservice(), CLogCategory::webservice() })
|
||||
);
|
||||
static const CLogCategoryList cats = CThreadedReader::getLogCategories().with(
|
||||
{
|
||||
CLogCategory::swiftDbWebservice(), CLogCategory::webservice()
|
||||
});
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace BlackCore
|
||||
{
|
||||
const CLogCategoryList &CNetworkWatchdog::getLogCategories()
|
||||
{
|
||||
static const BlackMisc::CLogCategoryList cats
|
||||
(
|
||||
CContinuousWorker::getLogCategories().join({ CLogCategory::swiftDbWebservice(), CLogCategory::webservice(), CLogCategory::network() })
|
||||
);
|
||||
static const BlackMisc::CLogCategoryList cats = CContinuousWorker::getLogCategories().with(
|
||||
{
|
||||
CLogCategory::swiftDbWebservice(), CLogCategory::webservice(), CLogCategory::network()
|
||||
});
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user