summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/MatchingText.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/cplusplus/MatchingText.cpp')
-rw-r--r--src/libs/cplusplus/MatchingText.cpp8
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))