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:
parent
98387d2639
commit
e5d19972e6
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user