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
9ce1fecb
Commit
9ce1fecb
authored
Dec 03, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1068 from DonLakeFlyer/UnitTestSettings
Unit Tests run from there own QSettings space
parents
d6f05e81
fa500371
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
QGCApplication.cc
src/QGCApplication.cc
+10
-7
No files found.
src/QGCApplication.cc
View file @
9ce1fecb
...
...
@@ -92,9 +92,15 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
_app
=
this
;
// Set application information
this
->
setApplicationName
(
QGC_APPLICATION_NAME
);
this
->
setOrganizationName
(
QGC_ORG_NAME
);
this
->
setOrganizationDomain
(
QGC_ORG_DOMAIN
);
if
(
_runningUnitTests
)
{
// We don't want unit tests to use the same QSettings space as the normal app. So we tweak the app
// name. Also we want to run unit tests with clean settings every time.
setApplicationName
(
QString
(
"%1_unittest"
).
arg
(
QGC_APPLICATION_NAME
));
}
else
{
setApplicationName
(
QGC_APPLICATION_NAME
);
}
setOrganizationName
(
QGC_ORG_NAME
);
setOrganizationDomain
(
QGC_ORG_DOMAIN
);
// Version string is build from component parts. Format is:
// vMajor.Minor.BuildNumber BuildType
...
...
@@ -121,10 +127,8 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
// The setting will delete all settings on this boot
fClearSettingsOptions
|=
settings
.
contains
(
_deleteAllSettingsKey
);
// We don't want unit tests to use the same QSettings space as the normal app. So we tweak the app
// name. Also we want to run unit tests with clean settings every time.
if
(
_runningUnitTests
)
{
setApplicationName
(
applicationName
().
append
(
"UnitTest"
));
// Unit tests run with clean settings
fClearSettingsOptions
=
true
;
}
...
...
@@ -133,7 +137,6 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
settings
.
clear
();
settings
.
setValue
(
_settingsVersionKey
,
QGC_SETTINGS_VERSION
);
}
}
QGCApplication
::~
QGCApplication
()
...
...
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