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
ca4d085e
Unverified
Commit
ca4d085e
authored
Sep 09, 2019
by
Don Gagne
Committed by
GitHub
Sep 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7783 from DonLakeFlyer/QTFatalWarnings
QT_FATAL_WARNINGS on for unit tests
parents
eb7f384c
501c4c2a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
7 deletions
+29
-7
.travis.yml
.travis.yml
+1
-0
AudioOutput.cc
src/Audio/AudioOutput.cc
+16
-4
AudioOutput.h
src/Audio/AudioOutput.h
+1
-1
PositionManager.cpp
src/PositionManager/PositionManager.cpp
+7
-1
QGCApplication.cc
src/QGCApplication.cc
+3
-0
QGCTileCacheWorker.cpp
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+1
-1
No files found.
.travis.yml
View file @
ca4d085e
...
...
@@ -187,6 +187,7 @@ script:
-
if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
mkdir -p ~/.config/QtProject/ &&
cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
export QT_FATAL_WARNINGS=1 &&
./debug/qgroundcontrol-start.sh --unittest;
fi
...
...
src/Audio/AudioOutput.cc
View file @
ca4d085e
...
...
@@ -17,9 +17,17 @@
#include "SettingsManager.h"
AudioOutput
::
AudioOutput
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
,
toolbox
)
,
_tts
(
new
QTextToSpeech
(
this
)
)
:
QGCTool
(
app
,
toolbox
)
,
_tts
(
nullptr
)
{
if
(
qgcApp
()
->
runningUnitTests
())
{
// Cloud based unit tests don't have speech capabilty. If you try to crank up
// speech engine it will pop a qWarning which prevents usage of QT_FATAL_WARNINGS
return
;
}
_tts
=
new
QTextToSpeech
(
this
);
//-- Force TTS engine to English as all incoming messages from the autopilot
// are in English and not localized.
#ifdef Q_OS_LINUX
...
...
@@ -28,8 +36,13 @@ AudioOutput::AudioOutput(QGCApplication* app, QGCToolbox* toolbox)
connect
(
_tts
,
&
QTextToSpeech
::
stateChanged
,
this
,
&
AudioOutput
::
_stateChanged
);
}
bool
AudioOutput
::
say
(
const
QString
&
inText
)
void
AudioOutput
::
say
(
const
QString
&
inText
)
{
if
(
!
_tts
)
{
qDebug
()
<<
"say"
<<
inText
;
return
;
}
bool
muted
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
audioMuted
()
->
rawValue
().
toBool
();
muted
|=
qgcApp
()
->
runningUnitTests
();
if
(
!
muted
&&
!
qgcApp
()
->
runningUnitTests
())
{
...
...
@@ -46,7 +59,6 @@ bool AudioOutput::say(const QString& inText)
_tts
->
say
(
text
);
}
}
return
true
;
}
void
AudioOutput
::
_stateChanged
(
QTextToSpeech
::
State
state
)
...
...
src/Audio/AudioOutput.h
View file @
ca4d085e
...
...
@@ -29,7 +29,7 @@ public:
static
QString
fixTextMessageForAudio
(
const
QString
&
string
);
public
slots
:
bool
say
(
const
QString
&
text
);
void
say
(
const
QString
&
text
);
private
slots
:
void
_stateChanged
(
QTextToSpeech
::
State
state
);
...
...
src/PositionManager/PositionManager.cpp
View file @
ca4d085e
...
...
@@ -34,7 +34,13 @@ void QGCPositionManager::setToolbox(QGCToolbox *toolbox)
QGCTool
::
setToolbox
(
toolbox
);
//-- First see if plugin provides a position source
_defaultSource
=
toolbox
->
corePlugin
()
->
createPositionSource
(
this
);
if
(
!
_defaultSource
)
{
if
(
qgcApp
()
->
runningUnitTests
())
{
// Units test on travis fail due to lack of position source
return
;
}
if
(
!
_defaultSource
)
{
//-- Otherwise, create a default one
_defaultSource
=
QGeoPositionInfoSource
::
createDefaultSource
(
this
);
}
...
...
src/QGCApplication.cc
View file @
ca4d085e
...
...
@@ -724,6 +724,9 @@ void QGCApplication::showMessage(const QString& message)
QVariant
varReturn
;
QVariant
varMessage
=
QVariant
::
fromValue
(
message
);
QMetaObject
::
invokeMethod
(
_rootQmlObject
(),
"showMessage"
,
Q_RETURN_ARG
(
QVariant
,
varReturn
),
Q_ARG
(
QVariant
,
varMessage
));
}
else
if
(
runningUnitTests
())
{
// Unit tests can run without UI
qDebug
()
<<
"QGCApplication::showMessage unittest"
<<
message
;
}
else
{
qWarning
()
<<
"Internal error"
;
}
...
...
src/QtLocationPlugin/QGCTileCacheWorker.cpp
View file @
ca4d085e
...
...
@@ -1136,7 +1136,7 @@ QGCCacheWorker::_lookupReady(QHostInfo info)
return
;
}
}
q
Warnin
g
()
<<
"No Internet Access"
;
q
Debu
g
()
<<
"No Internet Access"
;
emit
internetStatus
(
false
);
#endif
}
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