Skip to content

Commit

Permalink
Revert "[QtLocation] Use Qt event loop to emit signals from GLib call…
Browse files Browse the repository at this point in the history
…backs. Contributes to JB#34945"

This reverts commit 55009ec.
  • Loading branch information
rainemak committed Jan 15, 2018
1 parent 8e8ef4d commit 222e16f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Expand Up @@ -201,8 +201,7 @@ void QGeoPositionInfoSourceGeoclueMaster::regularUpdateFailed()
m_lastVelocityIsFresh = false;
if (m_running && !m_regularUpdateTimedOut) {
m_regularUpdateTimedOut = true;
// use a QueuedConnection to emit the signal to ensure that we enter the Qt event loop.
QMetaObject::invokeMethod(this, "updateTimeout", Qt::QueuedConnection);
emit updateTimeout();
}
}

Expand Down Expand Up @@ -246,8 +245,7 @@ void QGeoPositionInfoSourceGeoclueMaster::updatePosition(GeocluePositionFields f

m_regularUpdateTimedOut = false;

// use a QueuedConnection to emit the signal to ensure that we enter the Qt event loop.
QMetaObject::invokeMethod(this, "positionUpdated", Qt::QueuedConnection, Q_ARG(QGeoPositionInfo, m_lastPosition));
emit positionUpdated(m_lastPosition);

#ifdef Q_LOCATION_GEOCLUE_DEBUG
qDebug() << "Lat, lon, alt, speed:"
Expand Down
Expand Up @@ -81,13 +81,7 @@ void satellite_changed(GeoclueSatellite *satellite, int timestamp, int satellite
satInfos.append(satInfo);
}

// use a QueuedConnection to ensure that we enter the Qt event loop.
QMetaObject::invokeMethod(source, "satelliteChanged", Qt::QueuedConnection,
Q_ARG(int, timestamp),
Q_ARG(int, satellite_used),
Q_ARG(int, satellite_visible),
Q_ARG(QList<int>, usedPrns),
Q_ARG(QList<QGeoSatelliteInfo>, satInfos));
source->satelliteChanged(timestamp, satellite_used, satellite_visible, usedPrns, satInfos);
}

void satellite_callback(GeoclueSatellite *satellite, int timestamp, int satellite_used,
Expand Down Expand Up @@ -122,13 +116,7 @@ void satellite_callback(GeoclueSatellite *satellite, int timestamp, int satellit
satInfos.append(satInfo);
}

// use a QueuedConnection to ensure that we enter the Qt event loop.
QMetaObject::invokeMethod(source, "requestUpdateFinished", Qt::QueuedConnection,
Q_ARG(int, timestamp),
Q_ARG(int, satellite_used),
Q_ARG(int, satellite_visible),
Q_ARG(QList<int>, usedPrns),
Q_ARG(QList<QGeoSatelliteInfo>, satInfos));
source->requestUpdateFinished(timestamp, satellite_used, satellite_visible, usedPrns, satInfos);
}

}
Expand Down

0 comments on commit 222e16f

Please sign in to comment.