Commit 501c4c2a authored by Don Gagne's avatar Don Gagne

parent d2f1f276
......@@ -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);
}
......@@ -136,11 +142,5 @@ void QGCPositionManager::setPositionSource(QGCPositionManager::QGCPositionSource
void QGCPositionManager::_error(QGeoPositionInfoSource::Error positioningError)
{
QGeoPositionInfoSource* source = qobject_cast<QGeoPositionInfoSource*>(sender());
if (source && qgcApp()->runningUnitTests() && source->sourceName() == "serialnmea") {
// We don't want unit tests run in the cloud which has no WiFi to pop a qWarning
qDebug() << "QGCPositionManager error" << positioningError;
} else {
qWarning() << "QGCPositionManager error" << positioningError;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment