summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp10
-rw-r--r--src/corelib/kernel/qobject_p.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 0cc5244b652..475e8eb447f 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4052,7 +4052,7 @@ static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connect
args[n] = types[n].create(argv[n]);
}
- if (c->isSingleShot && !QObjectPrivate::disconnect(c)) {
+ if (c->isSingleShot && !QObjectPrivate::removeConnection(c)) {
delete ev;
return;
}
@@ -4160,7 +4160,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
receiver->metaObject()->className(), receiver);
}
- if (c->isSingleShot && !QObjectPrivate::disconnect(c))
+ if (c->isSingleShot && !QObjectPrivate::removeConnection(c))
continue;
QSemaphore semaphore;
@@ -4179,7 +4179,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
#endif
}
- if (c->isSingleShot && !QObjectPrivate::disconnect(c))
+ if (c->isSingleShot && !QObjectPrivate::removeConnection(c))
continue;
QObjectPrivate::Sender senderData(receiverInSameThread ? receiver : nullptr, sender, signal_index);
@@ -5359,7 +5359,7 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(connection.d_ptr);
if (!c)
return false;
- const bool disconnected = QObjectPrivate::disconnect(c);
+ const bool disconnected = QObjectPrivate::removeConnection(c);
const_cast<QMetaObject::Connection &>(connection).d_ptr = nullptr;
c->deref(); // has been removed from the QMetaObject::Connection object
return disconnected;
@@ -5532,7 +5532,7 @@ bool QObjectPrivate::disconnect(const QObject *sender, int signal_index, const Q
\internal
\threadsafe
*/
-inline bool QObjectPrivate::disconnect(QObjectPrivate::Connection *c)
+inline bool QObjectPrivate::removeConnection(QObjectPrivate::Connection *c)
{
if (!c)
return false;
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 5de0e53d4bc..0dcaf205b8a 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -173,7 +173,9 @@ public:
QObjectList receiverList(const char *signal) const;
QObjectList senderList() const;
+ inline void ensureConnectionData();
inline void addConnection(int signal, Connection *c);
+ static inline bool removeConnection(Connection *c);
static QObjectPrivate *get(QObject *o) { return o->d_func(); }
static const QObjectPrivate *get(const QObject *o) { return o->d_func(); }
@@ -211,9 +213,6 @@ public:
static bool disconnect(const QObject *sender, int signal_index, void **slot);
static bool disconnect(const QObject *sender, int signal_index, const QObject *receiver,
void **slot);
- static inline bool disconnect(Connection *c);
-
- inline void ensureConnectionData();
virtual std::string flagsForDumping() const;