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
64aa2e5e
Commit
64aa2e5e
authored
Dec 13, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2378 from DonLakeFlyer/MissionManagerTest
Mission manager test back on
parents
4a2e67d8
4f849f20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
QGCApplication.cc
src/QGCApplication.cc
+24
-4
UnitTestList.cc
src/qgcunittest/UnitTestList.cc
+2
-5
No files found.
src/QGCApplication.cc
View file @
64aa2e5e
...
...
@@ -746,17 +746,37 @@ QObject* QGCApplication::_rootQmlObject(void)
#ifdef __mobile__
return
_qmlAppEngine
->
rootObjects
()[
0
];
#else
return
MainWindow
::
instance
()
->
rootQmlObject
();
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
if
(
mainWindow
)
{
return
mainWindow
->
rootQmlObject
();
}
else
if
(
runningUnitTests
()){
// Unit test can run without a main window
return
NULL
;
}
else
{
qWarning
()
<<
"Why is MainWindow missing?"
;
return
NULL
;
}
#endif
}
void
QGCApplication
::
showMessage
(
const
QString
&
message
)
{
QVariant
varReturn
;
QVariant
varMessage
=
QVariant
::
fromValue
(
message
);
QObject
*
rootQmlObject
=
_rootQmlObject
();
if
(
rootQmlObject
)
{
QVariant
varReturn
;
QVariant
varMessage
=
QVariant
::
fromValue
(
message
);
QMetaObject
::
invokeMethod
(
_rootQmlObject
(),
"showMessage"
,
Q_RETURN_ARG
(
QVariant
,
varReturn
),
Q_ARG
(
QVariant
,
varMessage
));
QMetaObject
::
invokeMethod
(
_rootQmlObject
(),
"showMessage"
,
Q_RETURN_ARG
(
QVariant
,
varReturn
),
Q_ARG
(
QVariant
,
varMessage
));
#ifndef __mobile__
}
else
if
(
runningUnitTests
()){
// Unit test can run without a main window which will lead to no root qml object. Use QGCMessageBox instead
QGCMessageBox
::
information
(
"Unit Test"
,
message
);
#endif
}
else
{
qWarning
()
<<
"Internal error"
;
}
}
void
QGCApplication
::
showFlyView
(
void
)
...
...
src/qgcunittest/UnitTestList.cc
View file @
64aa2e5e
...
...
@@ -33,6 +33,7 @@
#include "MessageBoxTest.h"
#include "MissionItemTest.h"
#include "MissionControllerTest.h"
#include "MissionManagerTest.h"
#include "RadioConfigTest.h"
#include "SetupViewTest.h"
#include "MavlinkLogTest.h"
...
...
@@ -48,6 +49,7 @@ UT_REGISTER_TEST(MavlinkLogTest)
UT_REGISTER_TEST
(
MessageBoxTest
)
UT_REGISTER_TEST
(
MissionItemTest
)
UT_REGISTER_TEST
(
MissionControllerTest
)
UT_REGISTER_TEST
(
MissionManagerTest
)
UT_REGISTER_TEST
(
RadioConfigTest
)
// List of unit test which are currently disabled.
...
...
@@ -59,11 +61,6 @@ UT_REGISTER_TEST(RadioConfigTest)
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MainWindowTest)
// FIXME: Temporarily disabled until this can be stabilized
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MissionManagerTest)
// This unit test has gotten too flaky to run reliably under TeamCity. Removing for now till there is
// time to debug.
//UT_REGISTER_TEST(TCPLinkUnitTest)
...
...
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