From 983ed48ae3753e8a878f130be2d6730742d853e5 Mon Sep 17 00:00:00 2001
From: Christian Kamm <christian.d.kamm@nokia.com>
Date: Tue, 15 Jun 2010 14:34:18 +0200
Subject: [PATCH] QmlJS: Don't unnecessarily store the multiline comment state.

The 'state' value already holds the same information.

Reviewed-by: Erik Verbruggen
(backport of 70448b016d5a5071cd827c5fd64d8ea66a59e65a)
---
 src/plugins/qmljseditor/qmljshighlighter.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/qmljseditor/qmljshighlighter.cpp b/src/plugins/qmljseditor/qmljshighlighter.cpp
index bb637fc7017..6226fd8d3ae 100644
--- a/src/plugins/qmljseditor/qmljshighlighter.cpp
+++ b/src/plugins/qmljseditor/qmljshighlighter.cpp
@@ -313,9 +313,9 @@ int Highlighter::onBlockStart()
     int state = 0;
     int previousState = previousBlockState();
     if (previousState != -1) {
-        m_inMultilineComment = previousState & 0x1;
-        state = (previousState >> 1) & 0xff;
-        m_braceDepth = (previousState >> 9);
+        state = previousState & 0xff;
+        m_braceDepth = (previousState >> 8);
+        m_inMultilineComment = (state == Scanner::MultiLineComment);
     }
 
     return state;
@@ -325,7 +325,7 @@ void Highlighter::onBlockEnd(int state, int firstNonSpace)
 {
     typedef TextEditor::TextBlockUserData TextEditorBlockData;
 
-    setCurrentBlockState((m_braceDepth << 9) | (state << 1) | m_inMultilineComment);
+    setCurrentBlockState((m_braceDepth << 8) | state);
 
     // Set block data parentheses. Force creation of block data unless empty
     TextEditorBlockData *blockData = 0;
-- 
GitLab