QSlotObjectBase: fix return value of ref()

QAtomicInt::ref() returns bool, not int, so do the same in our ref().

As a drive-by, drop the superfluous inline keyword.

Pick-to: 6.6 6.5
Change-Id: I60712df3640b67dfd857355d364e0fc5a3a40650
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
bb10
Marc Mutz 2023-08-02 19:26:22 +02:00
parent 3e2b3c094e
commit 902063628f
1 changed files with 1 additions and 1 deletions

View File

@ -424,7 +424,7 @@ namespace QtPrivate {
static void cleanup(QSlotObjectBase *p) noexcept { Deleter{}(p); }
};
inline int ref() noexcept { return m_ref.ref(); }
bool ref() noexcept { return m_ref.ref(); }
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
inline void destroyIfLastRef() noexcept
{ if (!m_ref.deref()) m_impl(Destroy, this, nullptr, nullptr, nullptr); }