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
23e9acf2
Commit
23e9acf2
authored
Nov 26, 2014
by
Don Gagne
Browse files
Cleanup application object
parent
647ee6cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/QGCApplication.cc
View file @
23e9acf2
...
...
@@ -130,6 +130,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[]) :
}
QGCApplication
::~
QGCApplication
()
{
destroySingletonsForUnitTest
();
delete
_mainWindow
;
}
void
QGCApplication
::
_initCommon
(
void
)
{
_createSingletons
();
...
...
@@ -276,15 +282,6 @@ bool QGCApplication::_initForUnitTests(void)
return
true
;
}
/**
* @brief Destructor for the groundstation. It destroys all loaded instances.
*
**/
QGCApplication
::~
QGCApplication
()
{
}
void
QGCApplication
::
deleteAllSettingsNextBoot
(
void
)
{
QSettings
settings
;
...
...
src/main.cc
View file @
23e9acf2
...
...
@@ -131,6 +131,8 @@ int main(int argc, char *argv[])
app
->
_initCommon
();
int
exitCode
;
#ifdef QT_DEBUG
if
(
runUnitTests
)
{
if
(
!
app
->
_initForUnitTests
())
{
...
...
@@ -147,13 +149,17 @@ int main(int argc, char *argv[])
{
qDebug
()
<<
failures
<<
" TESTS FAILED!"
;
}
return
-
failures
;
exitCode
=
-
failures
;
}
else
#endif
{
if
(
!
app
->
_initForNormalAppBoot
())
{
return
-
1
;
}
return
app
->
exec
();
exitCode
=
app
->
exec
();
}
delete
app
;
return
exitCode
;
}
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