summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests/alive/qtestalive.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
commit3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2 (patch)
treeb35fb5f723752378dd4fede93a6c35c0aeb85ad2 /tests/auto/selftests/alive/qtestalive.cpp
parent1aeccd6bd14d7d9e098e333715f63e0225cd4a54 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.zip
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.gz
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'tests/auto/selftests/alive/qtestalive.cpp')
-rw-r--r--tests/auto/selftests/alive/qtestalive.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/selftests/alive/qtestalive.cpp b/tests/auto/selftests/alive/qtestalive.cpp
index ba42367..e743eae 100644
--- a/tests/auto/selftests/alive/qtestalive.cpp
+++ b/tests/auto/selftests/alive/qtestalive.cpp
@@ -78,7 +78,8 @@ private:
QTestAlivePinger::QTestAlivePinger(QObject *receiver, QObject *parent)
: QObject(parent), rec(receiver), currentSequenceId(0), lastSequenceId(0)
{
- Q_ASSERT(rec);
+ if (!rec)
+ qFatal("Null receiver object passed to QTestAlivePinger::QTestAlivePinger()");
timerId = startTimer(850);
}
@@ -147,8 +148,8 @@ bool QTestAlive::event(QEvent *e)
void QTestAlive::run()
{
- Q_ASSERT_X(QCoreApplication::instance(), "QTestAlive::run()",
- "Cannot start QTestAlive without a QCoreApplication instance.");
+ if (!QCoreApplication::instance())
+ qFatal("QTestAlive::run(): Cannot start QTestAlive without a QCoreApplication instance.");
QTestAlivePinger p(this);
pinger = &p;