diff options
author | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 10:41:09 +0300 |
---|---|---|
committer | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 10:41:09 +0300 |
commit | 9cacde74f7de702689725882633073e60c0a2baa (patch) | |
tree | 330d22dadbd28b14a7d8896823d1c33597e9993e /tests/auto/qvariant | |
parent | 006c8e22075112eff6230d8168d716e44a9e29d5 (diff) | |
parent | 2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff) | |
download | qt4-tools-9cacde74f7de702689725882633073e60c0a2baa.tar.gz |
Merge remote-tracking branch 'qt/4.8'
Conflicts:
doc/src/examples/wheel.qdoc
src/gui/util/qflickgesture.cpp
src/gui/util/qflickgesture_p.h
src/gui/util/qscroller.cpp
src/gui/util/qscroller.h
src/gui/util/qscroller_p.h
src/gui/util/qscrollerproperties.cpp
src/gui/util/qscrollerproperties.h
tests/auto/qscroller/tst_qscroller.cpp
Diffstat (limited to 'tests/auto/qvariant')
-rw-r--r-- | tests/auto/qvariant/tst_qvariant.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 7c3aafcfcd..d7e9800cb2 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -2650,7 +2650,6 @@ void tst_QVariant::invalidAsByteArray() void tst_QVariant::invalidQColor() const { QVariant va("An invalid QColor::name() value."); - QTest::ignoreMessage(QtWarningMsg, "QColor::setNamedColor: Unknown color name 'An invalid QColor::name() value.'"); QVERIFY(va.canConvert(QVariant::Color)); QVERIFY(!va.convert(QVariant::Color)); @@ -3240,18 +3239,24 @@ struct MyData { void *ptr; MyData() : ptr(this) {} - ~MyData() { Q_ASSERT(ptr == this); } - MyData(const MyData& o) : ptr(this) { Q_ASSERT(o.ptr == &o); } + ~MyData() + { + if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO); + } + MyData(const MyData& o) : ptr(this) + { + if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO); + } MyData &operator=(const MyData &o) { - Q_ASSERT(ptr == this); - Q_ASSERT(o.ptr == &o); + if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO); + if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO); return *this; } bool operator==(const MyData &o) const { - Q_ASSERT(ptr == this); - Q_ASSERT(o.ptr == &o); + if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO); + if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO); return true; } }; |