diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-27 12:48:39 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-27 12:50:59 (GMT) |
commit | 8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff (patch) | |
tree | 94d225b9bff326b68d1dfa9927a4981ea5f6c604 /tests/auto/qvariant/tst_qvariant.cpp | |
parent | d683fd25512dedacdac141222db36209ef65e42d (diff) | |
download | Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.zip Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.tar.gz Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.tar.bz2 |
QVariant::isNull does not return the right result with QVariant::setValue
Inspired by merge request 1911
Reveiwed-by: Thierry
Diffstat (limited to 'tests/auto/qvariant/tst_qvariant.cpp')
-rw-r--r-- | tests/auto/qvariant/tst_qvariant.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 9295897..de4d7b4 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -318,6 +318,14 @@ void tst_QVariant::constructor() QVariant var6(qlonglong(0)); QCOMPARE(var6.type(), QVariant::LongLong); QCOMPARE(var6.typeName(), "qlonglong"); + + QVariant var7 = 5; + QVERIFY(var7.isValid()); + QVERIFY(!var7.isNull()); + QVariant var8; + var8.setValue<int>(5); + QVERIFY(var8.isValid()); + QVERIFY(!var8.isNull()); } void tst_QVariant::copy_constructor() |