mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #846, support message as HTML
This commit is contained in:
committed by
Mathew Sutcliffe
parent
eed9910e75
commit
8341da2310
@@ -420,6 +420,8 @@ namespace BlackMisc
|
||||
return CVariant::from(this->getHumanReadablePattern());
|
||||
case IndexCategoryHumanReadableOrTechnicalAsString:
|
||||
return CVariant::from(this->getHumanOrTechnicalCategoriesAsString());
|
||||
case IndexMessageAsHtml:
|
||||
return CVariant::from(this->toHtml());
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
@@ -455,6 +457,7 @@ namespace BlackMisc
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexMessageAsHtml:
|
||||
case IndexMessage:
|
||||
return this->getMessage().compare(compareValue.getMessage());
|
||||
case IndexSeverity:
|
||||
@@ -494,7 +497,7 @@ namespace BlackMisc
|
||||
break;
|
||||
}
|
||||
html.append(this->getMessage());
|
||||
if (this->getSeverity() == SeverityInfo) return html;
|
||||
if (this->getSeverity() == SeverityInfo) { return html; }
|
||||
html.append("</font>");
|
||||
return html;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,8 @@ namespace BlackMisc
|
||||
IndexCategoryHumanReadableOrTechnicalAsString,
|
||||
IndexSeverity,
|
||||
IndexSeverityAsString,
|
||||
IndexMessage
|
||||
IndexMessage,
|
||||
IndexMessageAsHtml
|
||||
};
|
||||
|
||||
//! Construct a message with some specific category.
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace BlackMisc
|
||||
|
||||
for (const CPropertyIndex &index : usedIndexes)
|
||||
{
|
||||
rowHtml += "<td>" + statusMessage.propertyByIndex(index).toQString(true) + "</td>";
|
||||
rowHtml += "<td>" + statusMessage.propertyByIndex(index).toQString(true).toHtmlEscaped() + "</td>";
|
||||
}
|
||||
|
||||
rowHtml = "<tr class=\"%1\">" + rowHtml + "</tr>";
|
||||
|
||||
Reference in New Issue
Block a user