aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-05-30 14:09:25 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-06-10 17:19:53 +0200
commit1e457e8cd38b8f9f07057827494e3687a2a9ad40 (patch)
treeca2978132dd5c2a345ea59f2328832d45d397768 /tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
parent6670a8b09a3d3ef92b73fbc0593f21e66020d94e (diff)
Tidy up in tst_qqmllocale::numberOptions()
Split a long line, only emit an error message if there is one. Also remove the QTimeZone include: a recent change eliminated the dependence on it. (The #include should in any case have been #if'd on feature timezone.) Pick-to: 6.4 Change-Id: Id8208b39927c0324597d2008061c48958a7cbbdb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllocale/tst_qqmllocale.cpp')
-rw-r--r--tests/auto/qml/qqmllocale/tst_qqmllocale.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
index d6777465f2..f23bfd458e 100644
--- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
+++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
@@ -35,7 +35,6 @@
#include <QtCore/QDateTime>
#include <QtCore/qscopeguard.h>
#include <QtCore/qscopedpointer.h>
-#include <QtCore/qtimezone.h>
#include <qcolor.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
@@ -1318,9 +1317,12 @@ void tst_qqmllocale::numberOptions()
}
}
)", QUrl("testdata"));
- QTest::ignoreMessage(QtMsgType::QtWarningMsg, "Error: Locale: Number.fromLocaleString(): Invalid format");
+ QTest::ignoreMessage(QtMsgType::QtWarningMsg,
+ "Error: Locale: Number.fromLocaleString(): Invalid format");
QScopedPointer<QObject> root {comp.create()};
- qDebug() << comp.errorString();
+ const auto error = comp.errorString();
+ if (!error.isEmpty())
+ qDebug() << error;
QVERIFY(root);
QCOMPARE(root->property("formatted").toString(), QLatin1String("10000,0000"));
QCOMPARE(root->property("caughtException").toBool(), true);