diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-13 07:24:47 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-13 08:27:51 (GMT) |
commit | 13cbcc0ddca0fdd5be9ede09052d31785c1e4d55 (patch) | |
tree | b647be5699145ccae1545096aba5c495d96f8eb5 /tests/auto/qobject | |
parent | 081078137a6fbc85d6be1437f6afc1d60e4f75f9 (diff) | |
parent | de088b5a7f7b57e568399334667b14bfc9e7b893 (diff) | |
download | Qt-13cbcc0ddca0fdd5be9ede09052d31785c1e4d55.zip Qt-13cbcc0ddca0fdd5be9ede09052d31785c1e4d55.tar.gz Qt-13cbcc0ddca0fdd5be9ede09052d31785c1e4d55.tar.bz2 |
Merge commit 'qt/master'
Conflicts:
examples/opengl/samplebuffers/glwidget.cpp
src/corelib/io/qfsfileengine_unix.cpp
src/corelib/kernel/qobject.cpp
src/corelib/tools/qsharedpointer.cpp
src/gui/gui.pro
tests/auto/qhttp/tst_qhttp.cpp
tests/auto/qkeyevent/tst_qkeyevent.cpp
Diffstat (limited to 'tests/auto/qobject')
-rw-r--r-- | tests/auto/qobject/signalbug.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qobject/signalbug.h | 2 | ||||
-rw-r--r-- | tests/auto/qobject/tst_qobject.cpp | 20 |
3 files changed, 21 insertions, 3 deletions
diff --git a/tests/auto/qobject/signalbug.cpp b/tests/auto/qobject/signalbug.cpp index 4fd7814..3a30afb 100644 --- a/tests/auto/qobject/signalbug.cpp +++ b/tests/auto/qobject/signalbug.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qobject/signalbug.h b/tests/auto/qobject/signalbug.h index 9e471c6..4827ae8 100644 --- a/tests/auto/qobject/signalbug.h +++ b/tests/auto/qobject/signalbug.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index b602de1..a08f620 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -119,6 +119,7 @@ private slots: void qobjectConstCast(); void uniqConnection(); void interfaceIid(); + void deleteQObjectWhenDeletingEvent(); protected: }; @@ -2910,5 +2911,22 @@ void tst_QObject::interfaceIid() QByteArray()); } +void tst_QObject::deleteQObjectWhenDeletingEvent() +{ + //this is related to task 259514 + //before the fix this used to dead lock when the QObject from the event was destroyed + + struct MyEvent : public QEvent + { + MyEvent() : QEvent(QEvent::User) { } + QObject obj; + }; + + QObject o; + QApplication::postEvent(&o, new MyEvent); + QCoreApplication::removePostedEvents(&o); // here you would get a deadlock +} + + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" |