summaryrefslogtreecommitdiffstats
path: root/src/interfaceframework/qifabstractfeature.cpp
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2023-07-19 16:57:51 +0200
committerDominik Holland <dominik.holland@qt.io>2023-07-19 17:14:49 +0200
commit2ab3d2237c9a362588d98693e0e50e8a66f2115d (patch)
treef3502bb36766f806845f826f9348da6868418baf /src/interfaceframework/qifabstractfeature.cpp
parent2b58dce19a4433613a76bc0c03200c56296ca815 (diff)
Move the private slot serviceObjectDestroyed into the private object
Pick-to: 6.6 Change-Id: If7ff21e823d614302d50e71090bc9a7cba031225 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/interfaceframework/qifabstractfeature.cpp')
-rw-r--r--src/interfaceframework/qifabstractfeature.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/interfaceframework/qifabstractfeature.cpp b/src/interfaceframework/qifabstractfeature.cpp
index 831fc6bf..9968ae24 100644
--- a/src/interfaceframework/qifabstractfeature.cpp
+++ b/src/interfaceframework/qifabstractfeature.cpp
@@ -87,6 +87,16 @@ void QIfAbstractFeaturePrivate::onInitializationDone()
emit q->isInitializedChanged(true);
}
+void QIfAbstractFeaturePrivate::serviceObjectDestroyed()
+{
+ Q_Q(QIfAbstractFeature);
+ m_serviceObject = nullptr;
+ m_isInitialized = false;
+ emit q->isInitializedChanged(m_isInitialized);
+ q->clearServiceObject();
+ emit q->serviceObjectChanged();
+}
+
/*!
\class QIfAbstractFeature
\inmodule QtInterfaceFramework
@@ -265,7 +275,7 @@ bool QIfAbstractFeature::setServiceObject(QIfServiceObject *so)
bool serviceObjectIsSet = d->m_serviceObject;
if (d->m_serviceObject) {
disconnectFromServiceObject(d->m_serviceObject);
- disconnect(d->m_serviceObject, &QObject::destroyed, this, &QIfAbstractFeature::serviceObjectDestroyed);
+ QObjectPrivate::disconnect(d->m_serviceObject, &QObject::destroyed, d, &QIfAbstractFeaturePrivate::serviceObjectDestroyed);
}
d->m_serviceObject = nullptr;
@@ -296,7 +306,7 @@ bool QIfAbstractFeature::setServiceObject(QIfServiceObject *so)
", as QIfAbstractFeature::connectToServiceObject wasn't called.";
return false;
}
- connect(so, &QObject::destroyed, this, &QIfAbstractFeature::serviceObjectDestroyed);
+ QObjectPrivate::connect(so, &QObject::destroyed, d, &QIfAbstractFeaturePrivate::serviceObjectDestroyed);
}
return true;
@@ -863,16 +873,6 @@ void QIfAbstractFeature::onErrorChanged(QIfAbstractFeature::Error error, const Q
setError(error, message);
}
-void QIfAbstractFeature::serviceObjectDestroyed()
-{
- Q_D(QIfAbstractFeature);
- d->m_serviceObject = nullptr;
- d->m_isInitialized = false;
- emit isInitializedChanged(false);
- clearServiceObject();
- emit serviceObjectChanged();
-}
-
QT_END_NAMESPACE