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
b4bfe82c
Commit
b4bfe82c
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
1b87e382
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/JsonHelper.cc
View file @
b4bfe82c
...
...
@@ -170,7 +170,11 @@ bool JsonHelper::_parseEnumWorker(const QJsonObject& jsonObject, QMap<QString, Q
}
else
{
// "enumStrings": "Auto,Manual,Shutter Priority,Aperture Priority",
QString
value
=
jsonObject
.
value
(
_enumStringsJsonKey
).
toString
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
enumStrings
=
defineMap
.
value
(
value
,
value
).
split
(
","
,
QString
::
SkipEmptyParts
);
#else
enumStrings
=
defineMap
.
value
(
value
,
value
).
split
(
","
,
Qt
::
SkipEmptyParts
);
#endif
}
if
(
jsonObject
.
value
(
_enumValuesJsonKey
).
isArray
())
{
...
...
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