QObjectPrivate: rename the internal disconnect() to removeConnection()
Matches its counterpart addConnection(). Change-Id: If2e0f4b2190341ebaa31fffd16e315916eaaca37 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
3b46f07ffa
commit
db56a966e6
@ -4052,7 +4052,7 @@ static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connect
|
|||||||
args[n] = types[n].create(argv[n]);
|
args[n] = types[n].create(argv[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->isSingleShot && !QObjectPrivate::disconnect(c)) {
|
if (c->isSingleShot && !QObjectPrivate::removeConnection(c)) {
|
||||||
delete ev;
|
delete ev;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4160,7 +4160,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
|
|||||||
receiver->metaObject()->className(), receiver);
|
receiver->metaObject()->className(), receiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->isSingleShot && !QObjectPrivate::disconnect(c))
|
if (c->isSingleShot && !QObjectPrivate::removeConnection(c))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QSemaphore semaphore;
|
QSemaphore semaphore;
|
||||||
@ -4179,7 +4179,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->isSingleShot && !QObjectPrivate::disconnect(c))
|
if (c->isSingleShot && !QObjectPrivate::removeConnection(c))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QObjectPrivate::Sender senderData(receiverInSameThread ? receiver : nullptr, sender, signal_index);
|
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);
|
QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(connection.d_ptr);
|
||||||
if (!c)
|
if (!c)
|
||||||
return false;
|
return false;
|
||||||
const bool disconnected = QObjectPrivate::disconnect(c);
|
const bool disconnected = QObjectPrivate::removeConnection(c);
|
||||||
const_cast<QMetaObject::Connection &>(connection).d_ptr = nullptr;
|
const_cast<QMetaObject::Connection &>(connection).d_ptr = nullptr;
|
||||||
c->deref(); // has been removed from the QMetaObject::Connection object
|
c->deref(); // has been removed from the QMetaObject::Connection object
|
||||||
return disconnected;
|
return disconnected;
|
||||||
@ -5532,7 +5532,7 @@ bool QObjectPrivate::disconnect(const QObject *sender, int signal_index, const Q
|
|||||||
\internal
|
\internal
|
||||||
\threadsafe
|
\threadsafe
|
||||||
*/
|
*/
|
||||||
inline bool QObjectPrivate::disconnect(QObjectPrivate::Connection *c)
|
inline bool QObjectPrivate::removeConnection(QObjectPrivate::Connection *c)
|
||||||
{
|
{
|
||||||
if (!c)
|
if (!c)
|
||||||
return false;
|
return false;
|
||||||
|
@ -173,7 +173,9 @@ public:
|
|||||||
QObjectList receiverList(const char *signal) const;
|
QObjectList receiverList(const char *signal) const;
|
||||||
QObjectList senderList() const;
|
QObjectList senderList() const;
|
||||||
|
|
||||||
|
inline void ensureConnectionData();
|
||||||
inline void addConnection(int signal, Connection *c);
|
inline void addConnection(int signal, Connection *c);
|
||||||
|
static inline bool removeConnection(Connection *c);
|
||||||
|
|
||||||
static QObjectPrivate *get(QObject *o) { return o->d_func(); }
|
static QObjectPrivate *get(QObject *o) { return o->d_func(); }
|
||||||
static const QObjectPrivate *get(const 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, void **slot);
|
||||||
static bool disconnect(const QObject *sender, int signal_index, const QObject *receiver,
|
static bool disconnect(const QObject *sender, int signal_index, const QObject *receiver,
|
||||||
void **slot);
|
void **slot);
|
||||||
static inline bool disconnect(Connection *c);
|
|
||||||
|
|
||||||
inline void ensureConnectionData();
|
|
||||||
|
|
||||||
virtual std::string flagsForDumping() const;
|
virtual std::string flagsForDumping() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user