CErrorLogDialog: Make use of QStringLiteral where applicable
This commit is contained in:
parent
4aaf59be1a
commit
8ef246734a
|
@ -16,28 +16,29 @@ CErrorLogDialog::~CErrorLogDialog() = default;
|
||||||
bool CErrorLogDialog::GatherErrors()
|
bool CErrorLogDialog::GatherErrors()
|
||||||
{
|
{
|
||||||
const TStringList& rkErrors = NLog::GetErrorLog();
|
const TStringList& rkErrors = NLog::GetErrorLog();
|
||||||
if (rkErrors.empty()) return false;
|
if (rkErrors.empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
QString DialogString;
|
QString DialogString;
|
||||||
|
|
||||||
for (auto it = rkErrors.begin(); it != rkErrors.end(); it++)
|
for (const auto& rkError : rkErrors)
|
||||||
{
|
{
|
||||||
QString Error = TO_QSTRING(*it);
|
QString Error = TO_QSTRING(rkError);
|
||||||
QString LineColor;
|
QString LineColor;
|
||||||
|
|
||||||
if (Error.startsWith("ERROR: "))
|
if (Error.startsWith(QStringLiteral("ERROR: ")))
|
||||||
LineColor = "#ff0000";
|
LineColor = QStringLiteral("#ff0000");
|
||||||
else if (Error.startsWith("Warning: "))
|
else if (Error.startsWith(QStringLiteral("Warning: ")))
|
||||||
LineColor = "#ff8000";
|
LineColor = QStringLiteral("#ff8000");
|
||||||
|
|
||||||
QString FullLine = Error;
|
QString FullLine = Error;
|
||||||
|
|
||||||
if (!LineColor.isEmpty())
|
if (!LineColor.isEmpty())
|
||||||
{
|
{
|
||||||
FullLine.prepend(QString("<font color=\"%1\">").arg(LineColor));
|
FullLine.prepend(QStringLiteral("<font color=\"%1\">").arg(LineColor));
|
||||||
FullLine.append("</font>");
|
FullLine.append(QStringLiteral("</font>"));
|
||||||
}
|
}
|
||||||
FullLine.append("<br />");
|
FullLine.append(QStringLiteral("<br />"));
|
||||||
|
|
||||||
DialogString += FullLine;
|
DialogString += FullLine;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue