Implemented include completion

Done-with: danimo
This commit is contained in:
Thorbjørn Lindeijer
2009-07-23 16:46:30 +02:00
parent 1ccf39f8ce
commit 47a2097341
4 changed files with 159 additions and 14 deletions

View File

@@ -51,7 +51,8 @@ SimpleToken TokenUnderCursor::operator()(const QTextCursor &cursor, QTextBlock *
QTextBlock block = cursor.block();
int column = cursor.columnNumber();
_tokens = tokenize(block.text(), previousBlockState(block));
_text = block.text();
_tokens = tokenize(_text, previousBlockState(block));
for (int index = _tokens.size() - 1; index != -1; --index) {
const SimpleToken &tk = _tokens.at(index);
if (tk.position() < column) {

View File

@@ -55,6 +55,7 @@ private:
int previousBlockState(const QTextBlock &block) const;
QList<SimpleToken> _tokens;
QString _text;
};
} // end of namespace CPlusPlus