aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-05-30 14:09:25 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-10 20:41:07 +0000
commit617ed3f78fb77d8904cc45a6db4ec7e221060007 (patch)
treea9e08a5753ffaa463f9c674b2ff709987cb897a5 /tests
parent4672e05f1352a8e5744ae121767d6857c3e11de8 (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.) Change-Id: Id8208b39927c0324597d2008061c48958a7cbbdb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 1e457e8cd38b8f9f07057827494e3687a2a9ad40) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-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);