1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

LP-530 GCS config plugin: don't suppress compilation warnings

this requires fixing a minor warning in configvehicletypewidget.cpp
This commit is contained in:
Philippe Renon 2017-06-12 10:00:31 +02:00
parent f0f89fe2ad
commit bac194595d
2 changed files with 5 additions and 6 deletions

View File

@ -5,9 +5,9 @@ DEFINES += CONFIG_LIBRARY
QT += widgets svg opengl qml quick QT += widgets svg opengl qml quick
# silence eigen warnings # silence eigen warnings
QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations #QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
win32 { win32 {
QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-attributes #QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-attributes
} }
include(config_dependencies.pri) include(config_dependencies.pri)

View File

@ -299,12 +299,11 @@ QString ConfigVehicleTypeWidget::vehicleName()
QString name; QString name;
for (uint i = 0; i < field->getNumElements(); ++i) { for (uint i = 0; i < field->getNumElements(); ++i) {
QChar chr = field->getValue(i).toChar(); QVariant value = field->getValue(i);
if (chr != 0) { if (value == 0) {
name.append(chr);
} else {
break; break;
} }
name.append(value.toChar());
} }
return name; return name;
} }