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
84f13578
Commit
84f13578
authored
Oct 31, 2014
by
Thomas Gubler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move init of fgfs arg list to top of function
parent
999931f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
QGCFlightGearLink.cc
src/comm/QGCFlightGearLink.cc
+16
-16
No files found.
src/comm/QGCFlightGearLink.cc
View file @
84f13578
...
...
@@ -628,6 +628,21 @@ bool QGCFlightGearLink::connectSimulation()
QString
fgSceneryPath
;
// FlightGear scenery path as specified by --fg-scenery
bool
fgSceneryDirOverride
=
false
;
// true: User has specified --fg-scenery from ui options
QDir
fgAppDir
;
// Location of main FlightGear application
// Reset the list of arguments which will be provided to FG to the arguments set by the user via the UI
// First split the space seperated command line arguments coming in from the ui into a QStringList since
// that is what QProcess::start needs.
QStringList
uiArgList
;
bool
mismatchedQuotes
=
parseUIArguments
(
startupArguments
,
uiArgList
);
if
(
!
mismatchedQuotes
)
{
MainWindow
::
instance
()
->
showCriticalMessage
(
tr
(
"FlightGear settings"
),
tr
(
"Mismatched quotes in specified command line options"
));
return
false
;
}
#ifdef DEBUG_FLIGHTGEAR_CONNECT
qDebug
()
<<
"
\n
Split arguments"
<<
uiArgList
<<
"
\n
"
;
#endif
// Now set the FG arguments to the arguments from the UI
_fgArgList
=
uiArgList
;
#if defined Q_OS_MACX
// Mac installs will default to the /Applications folder 99% of the time. Anything other than
...
...
@@ -744,22 +759,7 @@ bool QGCFlightGearLink::connectSimulation()
fgAppFullyQualified
=
fgAppDir
.
absoluteFilePath
(
fgAppName
);
}
#endif
// Split the space seperated command line arguments coming in from the ui into a QStringList since
// that is what QProcess::start needs.
QStringList
uiArgList
;
bool
mismatchedQuotes
=
parseUIArguments
(
startupArguments
,
uiArgList
);
if
(
!
mismatchedQuotes
)
{
MainWindow
::
instance
()
->
showCriticalMessage
(
tr
(
"FlightGear settings"
),
tr
(
"Mismatched quotes in specified command line options"
));
return
false
;
}
// Add the user specified arguments to our argument list
#ifdef DEBUG_FLIGHTGEAR_CONNECT
qDebug
()
<<
"
\n
Split arguments"
<<
uiArgList
<<
"
\n
"
;
#endif
_fgArgList
=
uiArgList
;
// If we have an --fg-root coming in from the ui options, that setting overrides any internal searching of
// proposed locations.
QString
argValue
;
...
...
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