mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Remove obsolete plugin storage
Plugin storage was used before the value cache existed. With the value cache this is no longer used and can be removed. refs #660
This commit is contained in:
@@ -27,38 +27,6 @@ namespace BlackCore
|
||||
{
|
||||
}
|
||||
|
||||
CVariant CPluginManagerSimulator::getPluginData(const QObject *obj, const QString &key) const
|
||||
{
|
||||
const QObject *p = obj;
|
||||
while (p && !p->inherits("BlackCore::ISimulatorFactory"))
|
||||
{
|
||||
p = p->parent();
|
||||
}
|
||||
|
||||
if (!p) return CVariant();
|
||||
|
||||
QString id = getIdByPlugin(p);
|
||||
Q_ASSERT(!id.isEmpty());
|
||||
const PluginExtended &pe = m_plugins[id];
|
||||
return pe.storage.value(key);
|
||||
}
|
||||
|
||||
void CPluginManagerSimulator::setPluginData(const QObject *obj, const QString &key, const CVariant &value)
|
||||
{
|
||||
const QObject *p = obj;
|
||||
while (p && !p->inherits("BlackCore::ISimulatorFactory"))
|
||||
{
|
||||
p = p->parent();
|
||||
}
|
||||
|
||||
if (!p) return;
|
||||
|
||||
QString id = getIdByPlugin(p);
|
||||
Q_ASSERT(!id.isEmpty());
|
||||
PluginExtended &pe = m_plugins[id];
|
||||
pe.storage.insert(key, value);
|
||||
}
|
||||
|
||||
ISimulatorFactory *CPluginManagerSimulator::getFactory(const QString &pluginId)
|
||||
{
|
||||
return getPluginById<ISimulatorFactory>(pluginId);
|
||||
|
||||
Reference in New Issue
Block a user