diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-10-18 15:50:05 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-20 09:27:21 +0000 |
commit | dd8351b654180205c63e06c5099a1329762a91d2 (patch) | |
tree | cd47bb79b2fa2d5c2ae79883e0b8ee7bd932a94d /tests/auto | |
parent | 21b1a492edbdf74de9de8709b37b9f2483b35bed (diff) | |
download | qtbase-dd8351b654180205c63e06c5099a1329762a91d2.tar.gz |
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) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<const void*>(l1.data()), static_cast<const void*>(Q_NULLPTR)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isNull()); + } + // from nullptr { const char *null = Q_NULLPTR; |