summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-09-01 16:54:03 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-09-01 17:49:35 (GMT)
commit16bbf23d75f0754b0b1a458cb77de560b280755d (patch)
tree886579e9137e292b3e84aee0cc5e757095277b5b /src/corelib
parent57b3d45dff62e0f23508601caf2560edd3dee33b (diff)
downloadQt-16bbf23d75f0754b0b1a458cb77de560b280755d.zip
Qt-16bbf23d75f0754b0b1a458cb77de560b280755d.tar.gz
Qt-16bbf23d75f0754b0b1a458cb77de560b280755d.tar.bz2
Don't check for null if never happens, but test it if it may...
Making coverity happy. Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qobject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 4d9d3b2..c0c97b8 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -3364,10 +3364,10 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign
&& (currentThreadData != sender->d_func()->threadData
|| receiver->d_func()->threadData != sender->d_func()->threadData))
|| (c->connectionType == Qt::QueuedConnection)) {
- queued_activate(sender, signal_absolute_index, c, argv);
+ queued_activate(sender, signal_absolute_index, c, argv ? argv : empty_argv);
continue;
} else if (c->connectionType == Qt::BlockingQueuedConnection) {
- blocking_activate(sender, signal_absolute_index, c, argv);
+ blocking_activate(sender, signal_absolute_index, c, argv ? argv : empty_argv);
continue;
}
@@ -3442,7 +3442,7 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign
void QMetaObject::activate(QObject *sender, int signal_index, void **argv)
{
const QMetaObject *mo = sender->metaObject();
- while (mo && mo->methodOffset() > signal_index)
+ while (mo->methodOffset() > signal_index)
mo = mo->superClass();
activate(sender, mo, signal_index - mo->methodOffset(), argv);
}
@@ -3706,7 +3706,7 @@ void QObject::dumpObjectInfo()
const QMetaObject *mo = metaObject();
int signalOffset, methodOffset;
computeOffsets(mo, &signalOffset, &methodOffset);
- while (mo && signalOffset > signal_index) {
+ while (signalOffset > signal_index) {
mo = mo->superClass();
offsetToNextMetaObject = signalOffset;
computeOffsets(mo, &signalOffset, &methodOffset);