Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6b50da59
Commit
6b50da59
authored
Feb 29, 2020
by
Jacob Dahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated from reviewer feedback
parent
4be6d929
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
ComplexMissionItem.cc
src/MissionManager/ComplexMissionItem.cc
+11
-18
ComplexMissionItem.h
src/MissionManager/ComplexMissionItem.h
+0
-2
No files found.
src/MissionManager/ComplexMissionItem.cc
View file @
6b50da59
...
...
@@ -80,22 +80,6 @@ void ComplexMissionItem::_savePresetJson(const QString& name, QJsonObject& prese
// Use this to save a survey preset as a JSON file to be included in the build
// as a built-in survey preset that cannot be deleted.
#if 0
_saveSettingsValueAsJson(settings, name);
#endif
emit
presetNamesChanged
();
}
QJsonObject
ComplexMissionItem
::
_loadPresetJson
(
const
QString
&
name
)
{
QSettings
settings
;
settings
.
beginGroup
(
presetsSettingsGroup
());
settings
.
beginGroup
(
_presetSettingsKey
);
return
QJsonDocument
::
fromBinaryData
(
settings
.
value
(
name
).
toByteArray
()).
object
();
}
void
ComplexMissionItem
::
_saveSettingsValueAsJson
(
const
QSettings
&
settings
,
const
QString
&
name
)
{
QString savePath = _settingsManager->appSettings()->missionSavePath();
QDir saveDir(savePath);
...
...
@@ -108,8 +92,17 @@ void ComplexMissionItem::_saveSettingsValueAsJson(const QSettings& settings, con
}
qDebug() << "Saving survey preset to JSON";
QJsonObject
jsonObj
=
QJsonDocument
::
fromBinaryData
(
settings
.
value
(
name
).
toByteArray
()).
object
();
auto jsonDoc = QJsonDocument(jsonObj);
jsonFile.write(jsonDoc.toJson());
#endif
emit
presetNamesChanged
();
}
QJsonObject
ComplexMissionItem
::
_loadPresetJson
(
const
QString
&
name
)
{
QSettings
settings
;
settings
.
beginGroup
(
presetsSettingsGroup
());
settings
.
beginGroup
(
_presetSettingsKey
);
return
QJsonDocument
::
fromBinaryData
(
settings
.
value
(
name
).
toByteArray
()).
object
();
}
src/MissionManager/ComplexMissionItem.h
View file @
6b50da59
...
...
@@ -86,8 +86,6 @@ protected:
void
_savePresetJson
(
const
QString
&
name
,
QJsonObject
&
presetObject
);
QJsonObject
_loadPresetJson
(
const
QString
&
name
);
void
_saveSettingsValueAsJson
(
const
QSettings
&
settings
,
const
QString
&
name
);
bool
_isIncomplete
=
true
;
QMap
<
QString
,
FactMetaData
*>
_metaDataMap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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