forked from qt-creator/qt-creator
ExtensionSystem: Remove PluginManager::getObjectByClassName
Not used anymore inside Qt Creator. If 3rd party code really relies on this function, it can use the function locally, or, likely switch to the still supported getObjectByName or getObject. Change-Id: I041877b3e0630e6b257055dec5e10baf68c83546 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1655,19 +1655,4 @@ QObject *PluginManager::getObjectByName(const QString &name)
|
||||
});
|
||||
}
|
||||
|
||||
/*!
|
||||
Retrieves one object inheriting a class with \a className from the object
|
||||
pool.
|
||||
\sa addObject()
|
||||
*/
|
||||
|
||||
QObject *PluginManager::getObjectByClassName(const QString &className)
|
||||
{
|
||||
const QByteArray ba = className.toUtf8();
|
||||
QReadLocker lock(&d->m_lock);
|
||||
return Utils::findOrDefault(allObjects(), [&ba](const QObject *obj) {
|
||||
return obj->inherits(ba.constData());
|
||||
});
|
||||
}
|
||||
|
||||
} // ExtensionSystem
|
||||
|
||||
Reference in New Issue
Block a user