diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2010-11-01 09:30:20 +0100 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2010-11-01 09:48:37 +0100 |
commit | 62f050e4455f956f54e25b590fb5d5f4165d5f84 (patch) | |
tree | fe10677f20b2112e91901829a583a81f70a1cb98 /src/plugins/cmakeprojectmanager | |
parent | 36ebe35e25ad44ff34f94a9a80245e5b3085691a (diff) | |
download | qt-creator-62f050e4455f956f54e25b590fb5d5f4165d5f84.tar.gz |
CMake: Consider visual whitespaces format in the highlighter.
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeeditor.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakehighlighter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakehighlighter.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index c9d1720389..1038e047c9 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -109,7 +109,8 @@ void CMakeEditor::setFontSettings(const TextEditor::FontSettings &fs) categories << QLatin1String(TextEditor::Constants::C_LABEL) // variables << QLatin1String(TextEditor::Constants::C_LINK) // functions << QLatin1String(TextEditor::Constants::C_COMMENT) - << QLatin1String(TextEditor::Constants::C_STRING); + << QLatin1String(TextEditor::Constants::C_STRING) + << QLatin1String(TextEditor::Constants::C_VISUAL_WHITESPACE); } const QVector<QTextCharFormat> formats = fs.toTextCharFormats(categories); diff --git a/src/plugins/cmakeprojectmanager/cmakehighlighter.cpp b/src/plugins/cmakeprojectmanager/cmakehighlighter.cpp index 39172a36a4..66481caab1 100644 --- a/src/plugins/cmakeprojectmanager/cmakehighlighter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakehighlighter.cpp @@ -129,5 +129,7 @@ void CMakeHighlighter::highlightBlock(const QString &text) } else { setCurrentBlockState(0); } + + applyFormatToSpaces(text, m_formats[CMakeVisualWhiteSpaceFormat]); } diff --git a/src/plugins/cmakeprojectmanager/cmakehighlighter.h b/src/plugins/cmakeprojectmanager/cmakehighlighter.h index 5c76a21807..5afaa36ee2 100644 --- a/src/plugins/cmakeprojectmanager/cmakehighlighter.h +++ b/src/plugins/cmakeprojectmanager/cmakehighlighter.h @@ -50,6 +50,7 @@ public: CMakeFunctionFormat, CMakeCommentFormat, CMakeStringFormat, + CMakeVisualWhiteSpaceFormat, NumCMakeFormats }; |