Made typing parenthesis even faster

Only attempt to activate the completion when there is a function id on
the left of the parenthesis.

Reviewed-by: Roberto Raggi
This commit is contained in:
Thorbjørn Lindeijer
2009-05-27 11:12:06 +02:00
parent 39b0da2a1e
commit efc0b20859
4 changed files with 36 additions and 7 deletions

View File

@@ -40,18 +40,21 @@ QT_END_NAMESPACE
namespace CPlusPlus {
class SimpleToken;
class CPLUSPLUS_EXPORT TokenUnderCursor
{
public:
TokenUnderCursor();
~TokenUnderCursor();
SimpleToken operator()(const QTextCursor &cursor, QTextBlock *block = 0) const;
SimpleToken operator()(const QTextCursor &cursor, QTextBlock *block = 0);
const QList<SimpleToken> &tokens() const
{ return _tokens; }
private:
int previousBlockState(const QTextBlock &block) const;
QList<SimpleToken> _tokens;
};
} // end of namespace CPlusPlus