Port test to QRegularExpression

Change-Id: I4026fa2fa5da34974cdc37353e7ea5a8e8806033
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
Lars Knoll 2020-03-30 13:33:31 +02:00
parent 2fda4cda22
commit 7f267360f2

View File

@ -33,6 +33,7 @@
#include <qmetaobject.h>
#include <qjsondocument.h>
#include <qversionnumber.h>
#include <qregularexpression.h>
#include "using-namespaces.h"
#include "assign-namespace.h"
@ -2254,8 +2255,7 @@ void tst_Moc::warnings()
#ifdef Q_CC_MSVC
// for some reasons, moc compiled with MSVC uses a different output format
QRegExp lineNumberRe(":(-?\\d+):");
lineNumberRe.setMinimal(true);
QRegularExpression lineNumberRe(":(-?\\d+):", QRegularExpression::InvertedGreedinessOption);
expectedStdErr.replace(lineNumberRe, "(\\1):");
#endif