refs #466 Resolved TODO items in logging.

This commit is contained in:
Mathew Sutcliffe
2015-09-14 21:35:58 +01:00
parent 64a25a7860
commit a102fc73b6
4 changed files with 62 additions and 15 deletions

View File

@@ -248,7 +248,21 @@ namespace BlackMisc
QString CLogPattern::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
return {}; //TODO
QString strategy;
QString categories = QStringList(m_strings.toList()).join("|");
switch (m_strategy)
{
case Everything: strategy = "none"; break;
case ExactMatch: strategy = "exact match:" + categories; break;
case AnyOf: strategy = "any of:" + categories; break;
case AllOf: strategy = "all of:" + categories; break;
case StartsWith: strategy = "starts with:" + categories; break;
case EndsWith: strategy = "ends with:" + categories; break;
case Contains: strategy = "contains:" + categories; break;
case Nothing: strategy = "none"; break;
default: strategy = "<invalid>"; break;
}
return "{" + CStatusMessage::severitiesToString(m_severities) + "," + strategy + "}";
}
void CLogPattern::marshallToDbus(QDBusArgument &argument) const