From bac194595d5cb1b30322ef647d4db1db58b5e08a Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Mon, 12 Jun 2017 10:00:31 +0200 Subject: [PATCH] LP-530 GCS config plugin: don't suppress compilation warnings this requires fixing a minor warning in configvehicletypewidget.cpp --- ground/gcs/src/plugins/config/config.pro | 4 ++-- ground/gcs/src/plugins/config/configvehicletypewidget.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ground/gcs/src/plugins/config/config.pro b/ground/gcs/src/plugins/config/config.pro index 913a0c14d..194b68379 100644 --- a/ground/gcs/src/plugins/config/config.pro +++ b/ground/gcs/src/plugins/config/config.pro @@ -5,9 +5,9 @@ DEFINES += CONFIG_LIBRARY QT += widgets svg opengl qml quick # silence eigen warnings -QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations +#QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations win32 { - QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-attributes + #QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-attributes } include(config_dependencies.pri) diff --git a/ground/gcs/src/plugins/config/configvehicletypewidget.cpp b/ground/gcs/src/plugins/config/configvehicletypewidget.cpp index 713ce544f..95f3a8180 100644 --- a/ground/gcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/gcs/src/plugins/config/configvehicletypewidget.cpp @@ -299,12 +299,11 @@ QString ConfigVehicleTypeWidget::vehicleName() QString name; for (uint i = 0; i < field->getNumElements(); ++i) { - QChar chr = field->getValue(i).toChar(); - if (chr != 0) { - name.append(chr); - } else { + QVariant value = field->getValue(i); + if (value == 0) { break; } + name.append(value.toChar()); } return name; }