mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
refs #404 Use domain-based identifiers for plugins
* Changed all plugin identifier to org.swift-project.plugins.simulator.* * Fixed a small bug that caused settings be parsed wrong
This commit is contained in:
@@ -19,29 +19,33 @@ namespace BlackMisc
|
||||
|
||||
void CSimulatorPluginInfo::convertFromJson(const QJsonObject &json)
|
||||
{
|
||||
if (json["IID"].toString() != QStringLiteral("org.swift.pilotclient.BlackCore.SimulatorInterface"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (json.contains("IID")) { // comes from the plugin
|
||||
if (json["IID"].toString() != QStringLiteral("org.swift.pilotclient.BlackCore.SimulatorInterface"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!json["MetaData"].isObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!json["MetaData"].isObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QJsonObject data = json["MetaData"].toObject();
|
||||
if (data.value("identifier").isUndefined() || data.value("simulator").isUndefined())
|
||||
{
|
||||
return;
|
||||
}
|
||||
QJsonObject data = json["MetaData"].toObject();
|
||||
if (data.value("identifier").isUndefined() || data.value("simulator").isUndefined())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CValueObject::convertFromJson(data);
|
||||
m_valid = true;
|
||||
CValueObject::convertFromJson(data);
|
||||
m_valid = true;
|
||||
} else {
|
||||
CValueObject::convertFromJson(json);
|
||||
}
|
||||
}
|
||||
|
||||
bool CSimulatorPluginInfo::isUnspecified() const
|
||||
{
|
||||
return m_name.isEmpty();
|
||||
return m_identifier.isEmpty();
|
||||
}
|
||||
|
||||
QString CSimulatorPluginInfo::convertToQString(bool i18n) const
|
||||
|
||||
Reference in New Issue
Block a user