Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f35613ca
Commit
f35613ca
authored
Jun 05, 2020
by
Patrick José Pereira
Browse files
JsonHelper: Do not use deprecated QString enum with Qt 5.15.0
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
b8b29fee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/JsonHelper.cc
View file @
f35613ca
...
...
@@ -190,7 +190,11 @@ bool JsonHelper::_parseEnumWorker(const QJsonObject& jsonObject, QMap<QString, Q
}
else
{
// "enumValues": "0,1,2,3,4,5",
QString
value
=
jsonObject
.
value
(
_enumValuesJsonKey
).
toString
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
enumValues
=
defineMap
.
value
(
value
,
value
).
split
(
","
,
QString
::
SkipEmptyParts
);
#else
enumValues
=
defineMap
.
value
(
value
,
value
).
split
(
","
,
Qt
::
SkipEmptyParts
);
#endif
}
if
(
enumStrings
.
count
()
!=
enumValues
.
count
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment