forked from qt-creator/qt-creator
Don't insert automatic parenthesis in comments and strings
This commit is contained in:
@@ -1268,6 +1268,13 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CPPEditor::contextAllowsAutoParenthesis(const QTextCursor &cursor) const
|
||||
{
|
||||
CPlusPlus::TokenUnderCursor tokenUnderCursor;
|
||||
const SimpleToken tk = tokenUnderCursor(cursor);
|
||||
return !(tk.isComment() || tk.isLiteral());
|
||||
}
|
||||
|
||||
void CPPEditor::indentInsertedText(const QTextCursor &tc)
|
||||
{
|
||||
indent(tc.document(), tc, QChar::Null);
|
||||
|
||||
Reference in New Issue
Block a user