forked from qt-creator/qt-creator
Introduced a token cache for the C++ editor.
This should speed things up a bit, because before, the line was tokenized at least 3 times.
This commit is contained in:
@@ -40,13 +40,15 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
class TokenCache;
|
||||
|
||||
class CPLUSPLUS_EXPORT TokenUnderCursor
|
||||
{
|
||||
public:
|
||||
TokenUnderCursor();
|
||||
~TokenUnderCursor();
|
||||
|
||||
SimpleToken operator()(const QTextCursor &cursor, QTextBlock *block = 0);
|
||||
SimpleToken operator()(TokenCache *cache, const QTextCursor &cursor, QTextBlock *block = 0);
|
||||
|
||||
const QList<SimpleToken> &tokens() const
|
||||
{ return _tokens; }
|
||||
|
||||
Reference in New Issue
Block a user