76QObject *QExtensionFactory::extension(QObject *object,
const QString &iid)
const
80 const auto key = std::make_pair(iid, object);
82 auto it = m_extensions.find(key);
83 if (it == m_extensions.end()) {
84 if (QObject *ext = createExtension(object, iid,
const_cast<QExtensionFactory*>(
this))) {
85 connect(ext, &QObject::destroyed,
this, &QExtensionFactory::objectDestroyed);
86 it = m_extensions.insert(key, ext);
90 if (!m_extended.contains(object)) {
91 connect(object, &QObject::destroyed,
this, &QExtensionFactory::objectDestroyed);
92 m_extended.insert(object,
true);
95 if (it == m_extensions.end())