[Marble-commits] KDE/kdeedu/marble/src/plugins/runner
Dennis Nienhüser
earthwings at gentoo.org
Wed Nov 17 22:34:39 CET 2010
SVN commit 1198221 by nienhueser:
Handle network replies in the runner thread. That's more in the spirit of runners and should work around what seems to be a Qt bug on Maemo (QNetworkConfigurationPrivatePointer is not registered with qregistermetatype).
M +2 -2 hostip/HostipRunner.cpp
M +3 -3 nominatim/OsmNominatimRunner.cpp
M +2 -2 openrouteservice/OpenRouteServiceRunner.cpp
M +2 -2 yours/YoursRunner.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/runner/hostip/HostipRunner.cpp #1198220:1198221
@@ -65,10 +65,10 @@
QNetworkAccessManager *manager = new QNetworkAccessManager( this );
connect(manager, SIGNAL( finished( QNetworkReply* ) ),
- this, SLOT( slotRequestFinished( QNetworkReply* ) ) );
+ this, SLOT( slotRequestFinished( QNetworkReply* ) ), Qt::DirectConnection );
QNetworkReply *reply = manager->get( QNetworkRequest(QUrl( query) ) );
connect(reply, SIGNAL( error( QNetworkReply::NetworkError) ),
- this, SLOT( slotNoResults() ) );
+ this, SLOT( slotNoResults() ), Qt::DirectConnection );
}
else
slotNoResults();
--- trunk/KDE/kdeedu/marble/src/plugins/runner/nominatim/OsmNominatimRunner.cpp #1198220:1198221
@@ -58,7 +58,7 @@
m_manager = new QNetworkAccessManager;
connect(m_manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleSearchResult(QNetworkReply*)));
+ this, SLOT(handleSearchResult(QNetworkReply*)), Qt::DirectConnection);
QNetworkRequest request;
request.setUrl(QUrl(url));
@@ -66,7 +66,7 @@
QNetworkReply *reply = m_manager->get(QNetworkRequest(request));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
- this, SLOT(returnNoResults()));
+ this, SLOT(returnNoResults()), Qt::DirectConnection);
}
void OsmNominatimRunner::reverseGeocoding( const GeoDataCoordinates &coordinates )
@@ -81,7 +81,7 @@
m_manager = new QNetworkAccessManager;
connect(m_manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleReverseGeocodingResult(QNetworkReply*)));
+ this, SLOT(handleReverseGeocodingResult(QNetworkReply*)), Qt::DirectConnection);
QNetworkRequest request;
request.setUrl(QUrl(url));
--- trunk/KDE/kdeedu/marble/src/plugins/runner/openrouteservice/OpenRouteServiceRunner.cpp #1198220:1198221
@@ -56,7 +56,7 @@
if ( !m_networkAccessManager ) {
m_networkAccessManager = new QNetworkAccessManager;
connect( m_networkAccessManager, SIGNAL( finished( QNetworkReply * ) ),
- this, SLOT( retrieveData( QNetworkReply * ) ) );
+ this, SLOT( retrieveData( QNetworkReply * ) ), Qt::DirectConnection );
}
GeoDataCoordinates source = route->source();
@@ -94,7 +94,7 @@
QNetworkReply *reply = m_networkAccessManager->post( QNetworkRequest( url ), request.toLatin1() );
connect( reply, SIGNAL( error( QNetworkReply::NetworkError ) ),
- this, SLOT( handleError( QNetworkReply::NetworkError ) ) );
+ this, SLOT( handleError( QNetworkReply::NetworkError ) ), Qt::DirectConnection );
}
void OpenRouteServiceRunner::retrieveData( QNetworkReply *reply )
--- trunk/KDE/kdeedu/marble/src/plugins/runner/yours/YoursRunner.cpp #1198220:1198221
@@ -60,7 +60,7 @@
{
m_networkAccessManager = new QNetworkAccessManager;
connect( m_networkAccessManager, SIGNAL( finished( QNetworkReply* ) ),
- this, SLOT( retrieveData( QNetworkReply* ) ) );
+ this, SLOT( retrieveData( QNetworkReply* ) ), Qt::DirectConnection );
}
GeoDataCoordinates source = route->source();
@@ -82,7 +82,7 @@
QNetworkReply *reply = m_networkAccessManager->get( QNetworkRequest( QUrl( request ) ) );
connect( reply, SIGNAL( error( QNetworkReply::NetworkError ) ),
- this, SLOT( handleError( QNetworkReply::NetworkError ) ) );
+ this, SLOT( handleError( QNetworkReply::NetworkError ) ), Qt::DirectConnection );
}
void YoursRunner::retrieveData( QNetworkReply *reply )
More information about the Marble-commits
mailing list