forked from qt-creator/qt-creator
CppEditor: Simplify
bugprone-branch-clone readability-simplify-boolean-expr Change-Id: Id30a155e224370713d23b4b534fb82f5e630f36c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -45,10 +45,7 @@ bool CMakeAutoCompleter::isInComment(const QTextCursor &cursor) const
|
||||
// NOTE: This doesn't handle '#' inside quotes, nor multi-line comments
|
||||
QTextCursor moved = cursor;
|
||||
moved.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
|
||||
if (moved.selectedText().contains(QLatin1Char('#')))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return moved.selectedText().contains(QLatin1Char('#'));
|
||||
}
|
||||
|
||||
bool CMakeAutoCompleter::isInString(const QTextCursor &cursor) const
|
||||
|
||||
Reference in New Issue
Block a user