@@ -1203,7 +1203,6 @@ void tst_QWebEngineView::doNotBreakLayout()
1203
1203
1204
1204
void tst_QWebEngineView::changeLocale ()
1205
1205
{
1206
- #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
1207
1206
QStringList errorLines;
1208
1207
QUrl url (" http://non.existent/" );
1209
1208
@@ -1214,7 +1213,11 @@ void tst_QWebEngineView::changeLocale()
1214
1213
QTRY_COMPARE_WITH_TIMEOUT (loadFinishedSpyDE.count (), 1 , 20000 );
1215
1214
1216
1215
QTRY_VERIFY (!toPlainTextSync (viewDE.page ()).isEmpty ());
1216
+ #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
1217
1217
errorLines = toPlainTextSync (viewDE.page ()).split (QRegularExpression (" [\r\n ]" ), Qt::SkipEmptyParts);
1218
+ #else
1219
+ errorLines = toPlainTextSync (viewDE.page ()).split (QRegularExpression (" [\r\n ]" ), QString::SkipEmptyParts);
1220
+ #endif
1218
1221
QCOMPARE (errorLines.first ().toUtf8 (), QByteArrayLiteral (" Die Website ist nicht erreichbar" ));
1219
1222
1220
1223
QLocale::setDefault (QLocale (" en" ));
@@ -1224,7 +1227,11 @@ void tst_QWebEngineView::changeLocale()
1224
1227
QTRY_COMPARE_WITH_TIMEOUT (loadFinishedSpyEN.count (), 1 , 20000 );
1225
1228
1226
1229
QTRY_VERIFY (!toPlainTextSync (viewEN.page ()).isEmpty ());
1230
+ #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
1227
1231
errorLines = toPlainTextSync (viewEN.page ()).split (QRegularExpression (" [\r\n ]" ), Qt::SkipEmptyParts);
1232
+ #else
1233
+ errorLines = toPlainTextSync (viewEN.page ()).split (QRegularExpression (" [\r\n ]" ), QString::SkipEmptyParts);
1234
+ #endif
1228
1235
QCOMPARE (errorLines.first ().toUtf8 (), QByteArrayLiteral (" This site can\xE2\x80\x99 t be reached" ));
1229
1236
1230
1237
// Reset error page
@@ -1237,9 +1244,12 @@ void tst_QWebEngineView::changeLocale()
1237
1244
QTRY_COMPARE_WITH_TIMEOUT (loadFinishedSpyDE.count (), 1 , 20000 );
1238
1245
1239
1246
QTRY_VERIFY (!toPlainTextSync (viewDE.page ()).isEmpty ());
1247
+ #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
1240
1248
errorLines = toPlainTextSync (viewDE.page ()).split (QRegularExpression (" [\r\n ]" ), Qt::SkipEmptyParts);
1241
- QCOMPARE (errorLines.first ().toUtf8 (), QByteArrayLiteral (" Die Website ist nicht erreichbar" ));
1249
+ #else
1250
+ errorLines = toPlainTextSync (viewDE.page ()).split (QRegularExpression (" [\r\n ]" ), QString::SkipEmptyParts);
1242
1251
#endif
1252
+ QCOMPARE (errorLines.first ().toUtf8 (), QByteArrayLiteral (" Die Website ist nicht erreichbar" ));
1243
1253
}
1244
1254
1245
1255
void tst_QWebEngineView::inputMethodsTextFormat_data ()
@@ -1691,7 +1701,6 @@ void tst_QWebEngineView::touchTapAndHoldCancelled()
1691
1701
1692
1702
void tst_QWebEngineView::postData ()
1693
1703
{
1694
- #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
1695
1704
QMap<QString, QString> postData;
1696
1705
// use reserved characters to make the test harder to pass
1697
1706
postData[QStringLiteral (" Spä=m" )] = QStringLiteral (" ëgg:s" );
@@ -1713,7 +1722,11 @@ void tst_QWebEngineView::postData()
1713
1722
QStringList lines = QString::fromLocal8Bit (rawData).split (" \r\n " );
1714
1723
1715
1724
// examine request
1725
+ #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
1716
1726
QStringList request = lines[0 ].split (" " , Qt::SkipEmptyParts);
1727
+ #else
1728
+ QStringList request = lines[0 ].split (" " , QString::SkipEmptyParts);
1729
+ #endif
1717
1730
bool requestOk = request.length () > 2
1718
1731
&& request[2 ].toUpper ().startsWith (" HTTP/" )
1719
1732
&& request[0 ].toUpper () == " POST"
@@ -1819,7 +1832,6 @@ void tst_QWebEngineView::postData()
1819
1832
1820
1833
timeoutGuard.stop ();
1821
1834
server.close ();
1822
- #endif
1823
1835
}
1824
1836
1825
1837
void tst_QWebEngineView::inputFieldOverridesShortcuts ()
0 commit comments