From 5e1a62ce90e3638e4f9c8b11f68867884066e6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 16 May 2016 12:32:50 +0200 Subject: [PATCH] fix debug output if plugin parsing mechanism --- libguh/plugin/deviceplugin.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libguh/plugin/deviceplugin.cpp b/libguh/plugin/deviceplugin.cpp index 8b3fd48a..e2158ee9 100644 --- a/libguh/plugin/deviceplugin.cpp +++ b/libguh/plugin/deviceplugin.cpp @@ -373,6 +373,7 @@ QList DevicePlugin::supportedDevices() const deviceClass.setEventTypes(eventTypes); // Note: keep this after the actionType / stateType / eventType parsing + if (jo.contains("criticalStateTypeId")) { StateTypeId criticalStateTypeId = StateTypeId(jo.value("criticalStateTypeId").toString()); if (!deviceClass.hasStateType(criticalStateTypeId)) { @@ -849,7 +850,7 @@ QPair DevicePlugin::loadAndVerifyUnit(const QString &unitStri // inform the plugin developer about the error in the plugin json file if (enumValue == -1) { - qCWarning(dcDeviceManager()) << QString("\"%1\" plugin").arg(pluginName()).toLatin1().data() << QString("Invalid unit type \"%1\" in json file.").arg(unitString).toLatin1().data(); + qCWarning(dcDeviceManager()) << QString("\"%1\" plugin:").arg(pluginName()).toLatin1().data() << QString("Invalid unit type \"%1\" in json file.").arg(unitString).toLatin1().data(); return QPair(false, Types::UnitNone); } @@ -875,7 +876,7 @@ QPair DevicePlugin::loadAndVerifyInputType(const QString // inform the plugin developer about the error in the plugin json file if (enumValue == -1) { - qCWarning(dcDeviceManager()) << QString("\"%1\" plugin").arg(pluginName()).toLatin1().data() << QString("Invalid inputType \"%1\" in json file.").arg(inputType).toLatin1().data(); + qCWarning(dcDeviceManager()) << QString("\"%1\" plugin:").arg(pluginName()).toLatin1().data() << QString("Invalid inputType \"%1\" in json file.").arg(inputType).toLatin1().data(); return QPair(false, Types::InputTypeNone); } @@ -901,7 +902,7 @@ QPair DevicePlugin::loadAndVerifyBasicTag(const QSt // inform the plugin developer about the error in the plugin json file if (enumValue == -1) { - qCWarning(dcDeviceManager()) << QString("\"%1\" plugin").arg(pluginName()).toLatin1().data() << QString("Invalid basicTag \"%1\" in json file.").arg(basicTag).toLatin1().data(); + qCWarning(dcDeviceManager()) << QString("\"%1\" plugin:").arg(pluginName()).toLatin1().data() << QString("Invalid basicTag \"%1\" in json file.").arg(basicTag).toLatin1().data(); return QPair(false, DeviceClass::BasicTagDevice); } @@ -927,7 +928,7 @@ QPair DevicePlugin::loadAndVerifyDeviceIcon(const // inform the plugin developer about the error in the plugin json file if (enumValue == -1) { - qCWarning(dcDeviceManager()) << QString("\"%1\" plugin").arg(pluginName()).toLatin1().data() << QString("Invalid deviceIcon \"%1\" in json file.").arg(deviceIcon).toLatin1().data(); + qCWarning(dcDeviceManager()) << QString("\"%1\" plugin:").arg(pluginName()).toLatin1().data() << QString("Invalid deviceIcon \"%1\" in json file.").arg(deviceIcon).toLatin1().data(); return QPair(false, DeviceClass::DeviceIconNone); }