Ref T107, some minor fixes while investigating T107

This commit is contained in:
Klaus Basan
2017-07-12 16:38:01 +02:00
committed by Mathew Sutcliffe
parent 880cedec5d
commit 0e3a06c24e
6 changed files with 11 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ namespace BlackCore
const QJsonObject json = loader.metaData();
if (!isValid(json))
{
CLogMessage(this).warning("Plugin %1 invalid, not loading it") << path;
CLogMessage(this).warning("Plugin '%1' invalid, not loading it") << path;
return false;
}

View File

@@ -93,4 +93,4 @@ namespace BlackCore
};
}
#endif // BLACKCORE_PLUGIN_MANAGER_H
#endif // guard

View File

@@ -86,7 +86,7 @@ namespace BlackCore
const CSequence<QJsonObject> &plugins = getPlugins();
for (const QJsonObject &json : plugins)
{
QString iid = json["IID"].toString();
const QString iid = json["IID"].toString();
if (iid == QStringLiteral("org.swift-project.blackcore.simulatorinterface"))
{
auto it = m_plugins.insert(pluginIdentifier(json), {});

View File

@@ -8,6 +8,7 @@
*/
#include "blackgui/pluginselector.h"
#include "blackmisc/verify.h"
#include <QCheckBox>
#include <QHBoxLayout>
@@ -36,6 +37,10 @@ namespace BlackGui
void CPluginSelector::addPlugin(const QString &identifier, const QString &name, bool hasConfig, bool enabled)
{
// skip if identifier is missing, which should normally not happen
BLACK_VERIFY_X(!identifier.isEmpty(), Q_FUNC_INFO, "Missing identifier");
if (identifier.isEmpty()) { return; }
QWidget *pw = new QWidget;
QHBoxLayout *layout = new QHBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);

View File

@@ -29,7 +29,8 @@ namespace BlackMisc
if (! json.contains("MetaData")) { throw CJsonException("Missing 'MetaData'"); }
// json data is already validated by CPluginManagerSimulator
CJsonScope scope("MetaData");
//! \todo for RW See T107, remove, change code?
// CJsonScope scope("MetaData");
CValueObject::convertFromJson(json["MetaData"].toObject());
m_valid = true;
}

View File

@@ -22,7 +22,7 @@ namespace BlackSimPlugin
/*!
* Window for setting up the FSX plugin.
*/
class CSimulatorFsxConfig : public QObject, public BlackGui::IPluginConfig
class CSimulatorFsxConfig : public QObject, public BlackGui::IPluginConfig
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.swift-project.blackgui.pluginconfiginterface" FILE "simulatorfsxconfig.json")