From 8e3c83b7bae3878a6970299b76010408f3a4a3dd Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 20 Sep 2016 08:52:50 +0200 Subject: [PATCH] LP-245 config: don't report missing implementation for readonly components (QLable and QProgressBar) --- .../uavobjectwidgetutils/configtaskwidget.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ground/gcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/gcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index 3e80a4381..371b24e26 100644 --- a/ground/gcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/gcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -879,8 +880,12 @@ void ConfigTaskWidget::connectWidgetUpdatesToSlot(QWidget *widget, const char *f connect(cb, SIGNAL(clicked()), this, function, Qt::UniqueConnection); } else if (QToolButton * cb = qobject_cast(widget)) { connect(cb, SIGNAL(clicked()), this, function, Qt::UniqueConnection); + } else if (qobject_cast(widget)) { + // read only + } else if (qobject_cast(widget)) { + // read only } else { - qDebug() << __FUNCTION__ << "widget binding not implemented" << widget->metaObject()->className(); + qDebug() << __FUNCTION__ << "widget binding not implemented for" << widget->metaObject()->className(); } } @@ -909,8 +914,12 @@ void ConfigTaskWidget::disconnectWidgetUpdatesToSlot(QWidget *widget, const char disconnect(cb, SIGNAL(clicked()), this, function); } else if (QToolButton * cb = qobject_cast(widget)) { disconnect(cb, SIGNAL(clicked()), this, function); + } else if (qobject_cast(widget)) { + // read only + } else if (qobject_cast(widget)) { + // read only } else { - qDebug() << __FUNCTION__ << "widget binding not implemented" << widget->metaObject()->className(); + qDebug() << __FUNCTION__ << "widget binding not implemented for" << widget->metaObject()->className(); } } @@ -1019,7 +1028,7 @@ bool ConfigTaskWidget::setWidgetFromField(QWidget *widget, UAVObjectField *field if (result) { return true; } else { - qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented" << widget->metaObject()->className(); + qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented for" << widget->metaObject()->className(); return false; } }