Utils: Pass QColor by &

Change-Id: Idef5659934c9de47fd879c73a0fe5dfcb890237c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2024-05-07 12:47:23 +02:00
parent dced7ce913
commit 07d25f01c7
2 changed files with 2 additions and 2 deletions

View File

@@ -672,7 +672,7 @@ void MarkdownHighlighter::highlightBlock(const QString &text)
} }
} }
QString ansiColoredText(const QString &text, const QColor color) QString ansiColoredText(const QString &text, const QColor &color)
{ {
static const QString formatString("\033[38;2;%1;%2;%3m%4\033[0m"); static const QString formatString("\033[38;2;%1;%2;%3m%4\033[0m");
return formatString.arg(color.red()).arg(color.green()).arg(color.blue()).arg(text); return formatString.arg(color.red()).arg(color.green()).arg(color.blue()).arg(text);

View File

@@ -138,6 +138,6 @@ private:
QBrush m_codeBgBrush; QBrush m_codeBgBrush;
}; };
QTCREATOR_UTILS_EXPORT QString ansiColoredText(const QString &text, const QColor color); QTCREATOR_UTILS_EXPORT QString ansiColoredText(const QString &text, const QColor &color);
} // namespace Utils } // namespace Utils