From e3e8b1a5c01ddc230772ee0553ca325704295312 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 29 Jun 2010 17:47:59 +0200 Subject: Removed the TokenCache. --- src/libs/cplusplus/MatchingText.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/libs/cplusplus/MatchingText.cpp') diff --git a/src/libs/cplusplus/MatchingText.cpp b/src/libs/cplusplus/MatchingText.cpp index 0ee23ac4e8..b14348e117 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 @@ -76,10 +75,6 @@ static bool isCompleteCharLiteral(const BackwardsScanner &tk, int index) return false; } -MatchingText::MatchingText(TokenCache *tokenCache) - : _tokenCache(tokenCache) -{ } - bool MatchingText::shouldInsertMatchingText(const QTextCursor &tc) { QTextDocument *doc = tc.document(); @@ -153,7 +148,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, MAX_NUM_LINES, textToProcess.left(*skippedChars)); const int startToken = tk.startToken(); int index = startToken; @@ -213,7 +208,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, MAX_NUM_LINES); int index = tk.startToken(); if (tk[index - 1].isNot(T_LBRACE)) -- cgit v1.2.1