summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobjectdefs.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-17 08:17:27 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-19 15:50:56 (GMT)
commit919b723088b8617b202b92d80b8d0983e4fd9500 (patch)
tree022472bc157e4f4e888929fe29f5b11ee8fef371 /src/corelib/kernel/qobjectdefs.h
parent555fafe46e26b352e9d8ab5586910591761ab5ad (diff)
downloadQt-919b723088b8617b202b92d80b8d0983e4fd9500.zip
Qt-919b723088b8617b202b92d80b8d0983e4fd9500.tar.gz
Qt-919b723088b8617b202b92d80b8d0983e4fd9500.tar.bz2
Improve memory usage of the connectionlists inside QObject
... by not allocating space for slots in the vector. Before, the vector uses the signal index as index. The problem is that the slots and signal are mixed in the same index space. We solve the problem by having a different index space for the signal in the connectionlists vector. All we need to do is to add the information about the number of signals in the moc. Also, we are not connecting to cloned signal but only to the orginial ones. For example, destroyed(QObject * = 0) would generate two signal, we now only connect to the first one. This also improve a little bit the performence while activating signals since it removed one call to indexOfMethod. Reviewed-by: Brad
Diffstat (limited to 'src/corelib/kernel/qobjectdefs.h')
-rw-r--r--src/corelib/kernel/qobjectdefs.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index befd596..421617a 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -330,12 +330,10 @@ struct Q_CORE_EXPORT QMetaObject
static void connectSlotsByName(QObject *o);
// internal index-based signal activation
- static void activate(QObject *sender, int signal_index, void **argv);
- static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv);
+ static void activate(QObject *sender, int signal_index, void **argv); //obsolete
+ static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv); //obsolete
static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv);
- static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv);
-
- static bool isConnected(QObject *sender, int signal_index);
+ static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv); //obsolete
// internal guarded pointers
static void addGuard(QObject **ptr);