From 2e1efdc25aa5d2ee967ede6c0532386f56ebd15a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 8 Mar 2015 19:29:25 +0100 Subject: [PATCH] Hotfix: Do not assert on missing param --- src/FactSystem/FactBinder.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/FactSystem/FactBinder.cc b/src/FactSystem/FactBinder.cc index 4c29eb007..16976fca7 100644 --- a/src/FactSystem/FactBinder.cc +++ b/src/FactSystem/FactBinder.cc @@ -27,6 +27,7 @@ #include "FactBinder.h" #include "UASManager.h" #include "AutoPilotPluginManager.h" +#include FactBinder::FactBinder(void) : _autopilotPlugin(NULL), @@ -60,13 +61,13 @@ void FactBinder::setName(const QString& name) if (_autopilotPlugin->factExists(name)) { _fact = _autopilotPlugin->getFact(name); connect(_fact, &Fact::valueChanged, this, &FactBinder::valueChanged); + + emit valueChanged(); + emit nameChanged(); } else { - Q_ASSERT(false); + qDebug() << "FAILED BINDING PARAM" << name << ": PARAM DOES NOT EXIST ON SYSTEM!"; } } - - emit valueChanged(); - emit nameChanged(); } QVariant FactBinder::value(void) const @@ -83,7 +84,7 @@ void FactBinder::setValue(const QVariant& value) if (_fact) { _fact->setValue(value); } else { - Q_ASSERT(false); + qDebug() << "FAILED SETTING PARAM VALUE" << value.toString() << ": PARAM DOES NOT EXIST ON SYSTEM!"; } } -- 2.22.0