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:
Orgad Shaneh
2020-02-24 10:26:09 +02:00
committed by Orgad Shaneh
parent e17c96cf11
commit de5f4d1160

View File

@@ -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());