From dd8351b654180205c63e06c5099a1329762a91d2 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 18 Oct 2015 15:50:05 +0200 Subject: QLatin1String: add default ctor A pending change in uic depends on this. [ChangeLog][QtCore][QLatin1String] Added default constructor. Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp index 5b83fe1958..290c9fc12a 100644 --- a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp +++ b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp @@ -46,6 +46,16 @@ private Q_SLOTS: void tst_QLatin1String::nullString() { + // default ctor + { + QLatin1String l1; + QCOMPARE(static_cast(l1.data()), static_cast(Q_NULLPTR)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isNull()); + } + // from nullptr { const char *null = Q_NULLPTR; -- cgit v1.2.3