forked from qt-creator/qt-creator
VCS: Fix broken annotation changes detection
isValid() is true for empty regexp... Change-Id: I0af92574181736d5dde2ca48d3a8ab75ff6f14dc Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
e17c96cf11
commit
de5f4d1160
@@ -1568,7 +1568,7 @@ QSet<QString> VcsBaseEditorWidget::annotationChanges() const
|
||||
QStringRef txt(&text);
|
||||
if (txt.isEmpty())
|
||||
return changes;
|
||||
if (d->m_annotationSeparatorPattern.isValid()) {
|
||||
if (!d->m_annotationSeparatorPattern.pattern().isEmpty()) {
|
||||
const QRegularExpressionMatch match = d->m_annotationSeparatorPattern.match(txt);
|
||||
if (match.hasMatch())
|
||||
txt.truncate(match.capturedStart());
|
||||
|
||||
Reference in New Issue
Block a user