forked from qt-creator/qt-creator
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:
@@ -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);
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user