C++: Fix auto-parenthesis before comment

First character in a multiline comment line will now be
recognized as a comment by the autocompleter.

Task-number: QTCREATORBUG-6459
Change-Id: I7103d90e808d40b5a48b7654340954323026a3f7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
David Schulz
2012-02-10 14:03:57 +01:00
committed by Leandro Melo
parent 7ad113b4aa
commit 6c5bec6e65
2 changed files with 54 additions and 43 deletions

View File

@@ -34,6 +34,7 @@
#define CPPAUTOCOMPLETER_H
#include <texteditor/autocompleter.h>
#include <Token.h>
namespace CppEditor {
namespace Internal {
@@ -53,6 +54,10 @@ public:
QChar la,
int *skippedChars) const;
virtual QString insertParagraphSeparator(const QTextCursor &cursor) const;
private:
bool isInCommentHelper(const QTextCursor &cursor, CPlusPlus::Token *retToken = 0) const;
const CPlusPlus::Token tokenAtPosition(const QList<CPlusPlus::Token> &tokens, const unsigned pos) const;
};
} // Internal