summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/MatchingText.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-06-29 17:47:59 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-07-02 11:18:51 +0200
commite3e8b1a5c01ddc230772ee0553ca325704295312 (patch)
tree9b0ce1ec310800cb6a4816b7a31269e63093aa5f /src/libs/cplusplus/MatchingText.cpp
parentbb8aed629f9e48f4a47a6acaae0cd5a80c7e2291 (diff)
downloadqt-creator-e3e8b1a5c01ddc230772ee0553ca325704295312.tar.gz
Removed the TokenCache.
Diffstat (limited to 'src/libs/cplusplus/MatchingText.cpp')
-rw-r--r--src/libs/cplusplus/MatchingText.cpp9
1 files changed, 2 insertions, 7 deletions
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 <Token.h>
@@ -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))