forked from qt-creator/qt-creator
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:
committed by
Leandro Melo
parent
7ad113b4aa
commit
6c5bec6e65
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user