CMakePM: Replace QRegExp by QRegularExpression

Task-number: QTCREATORBUG-24098
Change-Id: I295e2a9a92880b58b3f6103fe68824c379ab47a4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2020-07-13 11:26:16 +02:00
parent 56de884159
commit 8b26bde438
3 changed files with 26 additions and 18 deletions

View File

@@ -25,6 +25,8 @@
#include "cmakeautocompleter.h"
#include <QRegularExpression>
namespace CMakeProjectManager {
namespace Internal {
@@ -110,7 +112,7 @@ QString CMakeAutoCompleter::insertMatchingQuote(const QTextCursor &cursor,
int CMakeAutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor)
{
const QString line = cursor.block().text().trimmed();
if (line.contains(QRegExp(QStringLiteral("^(endfunction|endmacro|endif|endforeach|endwhile)\\w*\\("))))
if (line.contains(QRegularExpression(QStringLiteral("^(endfunction|endmacro|endif|endforeach|endwhile)\\w*\\("))))
tabSettings().indentLine(cursor.block(), tabSettings().indentationColumn(cursor.block().text()));
return 0;
}