diff --git a/src/blackcore/pluginmanager.cpp b/src/blackcore/pluginmanager.cpp index 886586fb5..c29171a63 100644 --- a/src/blackcore/pluginmanager.cpp +++ b/src/blackcore/pluginmanager.cpp @@ -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; } diff --git a/src/blackcore/pluginmanager.h b/src/blackcore/pluginmanager.h index 035efa9da..d3b06efd8 100644 --- a/src/blackcore/pluginmanager.h +++ b/src/blackcore/pluginmanager.h @@ -93,4 +93,4 @@ namespace BlackCore }; } -#endif // BLACKCORE_PLUGIN_MANAGER_H +#endif // guard diff --git a/src/blackcore/pluginmanagersimulator.cpp b/src/blackcore/pluginmanagersimulator.cpp index 5139bace7..0c53227f7 100644 --- a/src/blackcore/pluginmanagersimulator.cpp +++ b/src/blackcore/pluginmanagersimulator.cpp @@ -86,7 +86,7 @@ namespace BlackCore const CSequence &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), {}); diff --git a/src/blackgui/pluginselector.cpp b/src/blackgui/pluginselector.cpp index 2ff180b55..b4f611f4e 100644 --- a/src/blackgui/pluginselector.cpp +++ b/src/blackgui/pluginselector.cpp @@ -8,6 +8,7 @@ */ #include "blackgui/pluginselector.h" +#include "blackmisc/verify.h" #include #include @@ -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); diff --git a/src/blackmisc/simulation/simulatorplugininfo.cpp b/src/blackmisc/simulation/simulatorplugininfo.cpp index 0b9e4188c..0c068993b 100644 --- a/src/blackmisc/simulation/simulatorplugininfo.cpp +++ b/src/blackmisc/simulation/simulatorplugininfo.cpp @@ -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; } diff --git a/src/plugins/simulator/fsxconfig/simulatorfsxconfig.h b/src/plugins/simulator/fsxconfig/simulatorfsxconfig.h index ae45ba650..422527b98 100644 --- a/src/plugins/simulator/fsxconfig/simulatorfsxconfig.h +++ b/src/plugins/simulator/fsxconfig/simulatorfsxconfig.h @@ -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")