diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-20 19:12:23 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-20 19:12:25 +0200 |
commit | 3361fcbc28be96262d22fd2b024c85fbcbc61462 (patch) | |
tree | 48976f337b3885971dc1976b9a27cec5e7dfa2ec /tests/auto/corelib/tools | |
parent | dc612acdc6577594c8f61345cea2de549d7aae34 (diff) | |
parent | 5e342f6f041208d142d97202f61179d7163eb773 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp | 3 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qstringref/tst_qstringref.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 1fa434395e..d5a628889c 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -2112,7 +2112,8 @@ void tst_QSharedPointer::qvariantCast() // Intentionally does not compile. // QWeakPointer<int> sop = qWeakPointerFromVariant<int>(v); - QWeakPointer<QFile> tracking = new QFile; + QFile file; + QWeakPointer<QFile> tracking = &file; tracking.data()->setObjectName("A test name"); v = QVariant::fromValue(tracking); diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp index a38707ef08..3ba901061c 100644 --- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp +++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp @@ -1870,9 +1870,9 @@ void tst_QStringRef::right() QStringRef ref = originalString.rightRef(originalString.size() - 1); QCOMPARE(ref.toString(), QLatin1String("OrginalString")); - QCOMPARE(ref.right(ref.size() - 6).toString(), QLatin1String("String")); + QCOMPARE(ref.right(6).toString(), QLatin1String("String")); QCOMPARE(ref.right(ref.size()).toString(), QLatin1String("OrginalString")); - QCOMPARE(ref.right(0).toString(), QLatin1String("OrginalString")); + QCOMPARE(ref.right(0).toString(), QLatin1String("")); QStringRef nullRef; QVERIFY(nullRef.isNull()); |