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
0548caca
Unverified
Commit
0548caca
authored
Oct 03, 2019
by
Don Gagne
Committed by
GitHub
Oct 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7859 from DonLakeFlyer/ReportMissing
Remove duplicates from missing parameter reporting
parents
cfa151aa
b0712e91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
QGCApplication.cc
src/QGCApplication.cc
+10
-4
QGCApplication.h
src/QGCApplication.h
+4
-4
No files found.
src/QGCApplication.cc
View file @
0548caca
...
...
@@ -687,7 +687,11 @@ bool QGCApplication::_checkTelemetrySavePath(bool useMessageBox)
void
QGCApplication
::
reportMissingParameter
(
int
componentId
,
const
QString
&
name
)
{
_missingParams
+=
QString
(
"%1:%2"
).
arg
(
componentId
).
arg
(
name
);
QPair
<
int
,
QString
>
missingParam
(
componentId
,
name
);
if
(
!
_missingParams
.
contains
(
missingParam
))
{
_missingParams
.
append
(
missingParam
);
}
_missingParamsDelayedDisplayTimer
.
start
();
}
...
...
@@ -696,12 +700,14 @@ void QGCApplication::_missingParamsDisplay(void)
{
if
(
_missingParams
.
count
())
{
QString
params
;
foreach
(
const
QString
&
name
,
_missingParams
)
{
for
(
QPair
<
int
,
QString
>&
missingParam
:
_missingParams
)
{
QString
param
=
QStringLiteral
(
"%1:%2"
).
arg
(
missingParam
.
first
).
arg
(
missingParam
.
second
);
if
(
params
.
isEmpty
())
{
params
+=
name
;
params
+=
param
;
}
else
{
params
+=
QString
(
", %1"
).
arg
(
name
);
params
+=
QString
Literal
(
", %1"
).
arg
(
param
);
}
}
_missingParams
.
clear
();
...
...
src/QGCApplication.h
View file @
0548caca
...
...
@@ -174,10 +174,10 @@ private:
void
_exitWithError
(
QString
errorMessage
);
bool
_runningUnitTests
;
///< true: running unit tests, false: normal app
static
const
int
_missingParamsDelayedDisplayTimerTimeout
=
1000
;
///< Timeout to wait for next missing fact to come in before display
QTimer
_missingParamsDelayedDisplayTimer
;
///< Timer use to delay missing fact display
Q
StringList
_missingParams
;
///< List of missing facts to be displayed
bool
_runningUnitTests
;
///< true: running unit tests, false: normal app
static
const
int
_missingParamsDelayedDisplayTimerTimeout
=
1000
;
///< Timeout to wait for next missing fact to come in before display
QTimer
_missingParamsDelayedDisplayTimer
;
///< Timer use to delay missing fact display
Q
List
<
QPair
<
int
,
QString
>>
_missingParams
;
///< List of missing parameter component id:name
QQmlApplicationEngine
*
_qmlAppEngine
=
nullptr
;
bool
_logOutput
=
false
;
///< true: Log Qt debug output to file
...
...
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