1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

fixed type check warning

This commit is contained in:
Christian Gudrian 2014-10-05 20:47:03 +02:00 committed by James Duley
parent 98387d2639
commit e5d19972e6

View File

@ -299,7 +299,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
cout << "Starting uploading description\n";
QByteArray array;
if (desc.type() == QMetaType::QString) {
if (desc.type() == QVariant::String) {
QString description = desc.toString();
if (description.length() % 4 != 0) {
int pad = description.length() / 4;
@ -310,7 +310,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
description.append(padding);
}
array = description.toLatin1();
} else if (desc.type() == QMetaType::QByteArray) {
} else if (desc.type() == QVariant::ByteArray) {
array = desc.toByteArray();
}