mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +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());
|
return CVariant::from(this->getHumanReadablePattern());
|
||||||
case IndexCategoryHumanReadableOrTechnicalAsString:
|
case IndexCategoryHumanReadableOrTechnicalAsString:
|
||||||
return CVariant::from(this->getHumanOrTechnicalCategoriesAsString());
|
return CVariant::from(this->getHumanOrTechnicalCategoriesAsString());
|
||||||
|
case IndexMessageAsHtml:
|
||||||
|
return CVariant::from(this->toHtml());
|
||||||
default:
|
default:
|
||||||
return CValueObject::propertyByIndex(index);
|
return CValueObject::propertyByIndex(index);
|
||||||
}
|
}
|
||||||
@@ -455,6 +457,7 @@ namespace BlackMisc
|
|||||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
|
case IndexMessageAsHtml:
|
||||||
case IndexMessage:
|
case IndexMessage:
|
||||||
return this->getMessage().compare(compareValue.getMessage());
|
return this->getMessage().compare(compareValue.getMessage());
|
||||||
case IndexSeverity:
|
case IndexSeverity:
|
||||||
@@ -494,7 +497,7 @@ namespace BlackMisc
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
html.append(this->getMessage());
|
html.append(this->getMessage());
|
||||||
if (this->getSeverity() == SeverityInfo) return html;
|
if (this->getSeverity() == SeverityInfo) { return html; }
|
||||||
html.append("</font>");
|
html.append("</font>");
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ namespace BlackMisc
|
|||||||
IndexCategoryHumanReadableOrTechnicalAsString,
|
IndexCategoryHumanReadableOrTechnicalAsString,
|
||||||
IndexSeverity,
|
IndexSeverity,
|
||||||
IndexSeverityAsString,
|
IndexSeverityAsString,
|
||||||
IndexMessage
|
IndexMessage,
|
||||||
|
IndexMessageAsHtml
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Construct a message with some specific category.
|
//! Construct a message with some specific category.
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
for (const CPropertyIndex &index : usedIndexes)
|
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>";
|
rowHtml = "<tr class=\"%1\">" + rowHtml + "</tr>";
|
||||||
|
|||||||
Reference in New Issue
Block a user