mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
refs #442 Add CPluginManagerSimulator class
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2c55fe2306
commit
15cc23a43c
@@ -23,23 +23,9 @@ namespace BlackMisc
|
||||
{
|
||||
if (json.contains("IID")) // comes from the plugin
|
||||
{
|
||||
if (json["IID"].toString() != QStringLiteral("org.swift-project.blackcore.simulatorinterface"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!json["MetaData"].isObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QJsonObject data = json["MetaData"].toObject();
|
||||
if (data.value("identifier").isUndefined() || data.value("simulator").isUndefined())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CValueObject::convertFromJson(data);
|
||||
// json data is already validated by CPluginManagerSimulator
|
||||
Q_ASSERT(json["IID"].toString() == QStringLiteral("org.swift-project.blackcore.simulatorinterface"));
|
||||
CValueObject::convertFromJson(json["MetaData"].toObject());
|
||||
m_valid = true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user