summaryrefslogtreecommitdiffstats
path: root/tests/auto/qvariant
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qvariant')
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 729e29b..fc977bc 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -2623,7 +2623,7 @@ void tst_QVariant::qvariant_cast_QObject_data() {
QTest::addColumn<QVariant>("data");
QTest::addColumn<bool>("success");
- QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject) << true;
+ QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject(this)) << true;
QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false;
QTest::newRow("from int") << QVariant((int) 123) << false;
}
@@ -2748,6 +2748,7 @@ void tst_QVariant::dataStar() const
v2 = qVariantFromValue(p1);
QVERIFY(v1 == v2);
+ delete p1;
}
void tst_QVariant::canConvertQStringList() const