summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-09 03:16:39 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-09 08:36:38 (GMT)
commit0c157af3e5aa7c56c53b9eabe1510cc639610969 (patch)
tree77f039f3297e6a3a3319d31f6d376f76982f2863 /tests/auto
parent844906474dd6905d36003143a03a2fbccf0ad0dd (diff)
downloadQt-0c157af3e5aa7c56c53b9eabe1510cc639610969.zip
Qt-0c157af3e5aa7c56c53b9eabe1510cc639610969.tar.gz
Qt-0c157af3e5aa7c56c53b9eabe1510cc639610969.tar.bz2
Remove Q_ASSERT's from QObject autotest
Rather than aborting in debug builds and failing silently in release builds, report a fatal error in all builds if the helper class methods are called more than once. Change-Id: Id1fda8dc7caf008bbc8f6ae6384abee1aa8f50eb Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qobject/tst_qobject.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index 29b07af..0e5a087 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -1330,14 +1330,16 @@ public:
void customEvent(QEvent *)
{
- Q_ASSERT(customEventThread == 0);
+ if (customEventThread)
+ qFatal("%s: customEventThread should be null", Q_FUNC_INFO);
customEventThread = QThread::currentThread();
emit theSignal();
}
void timerEvent(QTimerEvent *)
{
- Q_ASSERT(timerEventThread == 0);
+ if (timerEventThread)
+ qFatal("%s: timerEventThread should be null", Q_FUNC_INFO);
timerEventThread = QThread::currentThread();
emit theSignal();
}
@@ -1345,7 +1347,8 @@ public:
public slots:
void theSlot()
{
- Q_ASSERT(slotThread == 0);
+ if (slotThread)
+ qFatal("%s: slotThread should be null", Q_FUNC_INFO);
slotThread = QThread::currentThread();
emit theSignal();
}