Commit 3ff7f198 authored by Laurent Montel's avatar Laurent Montel 😁

Const'ify

parent e150f49c
......@@ -38,8 +38,7 @@ void TemplatesSyntaxHighlighter::init()
QPalette palette;
keywordFormat.setForeground( palette.link() );
QStringList keywords;
keywords << Util::keywords();
const QStringList keywords = QStringList() << Util::keywords();
Q_FOREACH ( const QString & s, keywords ) {
const QRegExp regex( s, Qt::CaseInsensitive );
......@@ -48,8 +47,7 @@ void TemplatesSyntaxHighlighter::init()
QTextCharFormat keywordWithArgsFormat;
keywordWithArgsFormat.setForeground( palette.link() );
QStringList keywordsWithArgs;
keywordsWithArgs << Util::keywordsWithArgs();
const QStringList keywordsWithArgs = QStringList() << Util::keywordsWithArgs();
Q_FOREACH ( const QString & s, keywordsWithArgs ) {
const QRegExp regex( s, Qt::CaseInsensitive );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment