diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-06-04 12:37:26 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-06-04 12:37:26 +0200 |
commit | 424b9724d6dc4f860cfb8da17d51a715684ad94c (patch) | |
tree | 921120642920dd72762ebeef6919181130ccf4f7 /src/libs/cplusplus/MatchingText.cpp | |
parent | 5f749306f11dbfd31a6f740ab9b1cb108476e202 (diff) | |
download | qt-creator-424b9724d6dc4f860cfb8da17d51a715684ad94c.tar.gz |
Revert "Introduced a token cache for the C++ editor."
This reverts commit c2393df02332618c8cf6159d9d6f6a40041ced89.
Diffstat (limited to 'src/libs/cplusplus/MatchingText.cpp')
-rw-r--r-- | src/libs/cplusplus/MatchingText.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libs/cplusplus/MatchingText.cpp b/src/libs/cplusplus/MatchingText.cpp index ed1b8c12b2..b0c5461f24 100644 --- a/src/libs/cplusplus/MatchingText.cpp +++ b/src/libs/cplusplus/MatchingText.cpp @@ -28,7 +28,6 @@ **************************************************************************/ #include "MatchingText.h" #include "BackwardsScanner.h" -#include "TokenCache.h" #include <Token.h> @@ -76,8 +75,7 @@ static bool isCompleteCharLiteral(const BackwardsScanner &tk, int index) return false; } -MatchingText::MatchingText(TokenCache *tokenCache) - : _tokenCache(tokenCache) +MatchingText::MatchingText() { } bool MatchingText::shouldInsertMatchingText(const QTextCursor &tc) @@ -153,7 +151,7 @@ QString MatchingText::insertMatchingBrace(const QTextCursor &cursor, const QStri if (text.isEmpty() || !shouldInsertMatchingText(la)) return QString(); - BackwardsScanner tk(_tokenCache, tc, MAX_NUM_LINES, textToProcess.left(*skippedChars)); + BackwardsScanner tk(tc, textToProcess.left(*skippedChars), MAX_NUM_LINES); const int startToken = tk.startToken(); int index = startToken; @@ -213,7 +211,7 @@ bool MatchingText::shouldInsertNewline(const QTextCursor &tc) const QString MatchingText::insertParagraphSeparator(const QTextCursor &tc) const { - BackwardsScanner tk(_tokenCache, tc, MAX_NUM_LINES); + BackwardsScanner tk(tc, QString(), MAX_NUM_LINES); int index = tk.startToken(); if (tk[index - 1].isNot(T_LBRACE)) |