test: migrate QDom test to QRegularExpression

This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I74ca824d5a2ee6c295c41cd577eab466326395f0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
Samuel Gaist 2019-06-10 10:00:20 +02:00
parent 9fc5902d23
commit 9294d02395

View File

@ -33,7 +33,7 @@
#include <QDebug>
#include <QFile>
#include <QList>
#include <QRegExp>
#include <QRegularExpression>
#include <QTextStream>
#include <QtTest/QtTest>
#include <QtXml>
@ -437,10 +437,10 @@ void tst_QDom::save_data()
QTest::addColumn<int>("indent");
QTest::addColumn<QString>("res");
QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegExp(" "), "" );
QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegularExpression(" "), "" );
QTest::newRow( "02" ) << doc01 << 1 << doc01;
QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegExp(" "), " " );
QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegExp(" "), " " );
QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegularExpression(" "), " " );
QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegularExpression(" "), " " );
}
void tst_QDom::save()