[QGIS Commit] r13453 - in trunk/qgis: python/core src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun May 9 17:35:32 EDT 2010
Author: jef
Date: 2010-05-09 17:35:31 -0400 (Sun, 09 May 2010)
New Revision: 13453
Modified:
trunk/qgis/python/core/qgsnetworkaccessmanager.sip
trunk/qgis/src/core/qgsnetworkaccessmanager.cpp
trunk/qgis/src/core/qgsnetworkaccessmanager.h
Log:
emit signals before and after QgsNetworkAccessManager creates requests
Modified: trunk/qgis/python/core/qgsnetworkaccessmanager.sip
===================================================================
--- trunk/qgis/python/core/qgsnetworkaccessmanager.sip 2010-05-09 19:20:39 UTC (rev 13452)
+++ trunk/qgis/python/core/qgsnetworkaccessmanager.sip 2010-05-09 21:35:31 UTC (rev 13453)
@@ -50,6 +50,13 @@
//! set fallback proxy and URL that shouldn't use it.
void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes );
+
+ signals:
+ void requestAboutToBeCreated( Operation, const QNetworkRequest &, QIODevice * );
+ void requestCreated( QNetworkReply * );
+
+ protected:
+ virtual QNetworkReply *createRequest( Operation op, const QNetworkRequest & req, QIODevice * outgoingData = 0 );
private:
QgsNetworkAccessManager( QObject * );
Modified: trunk/qgis/src/core/qgsnetworkaccessmanager.cpp
===================================================================
--- trunk/qgis/src/core/qgsnetworkaccessmanager.cpp 2010-05-09 19:20:39 UTC (rev 13452)
+++ trunk/qgis/src/core/qgsnetworkaccessmanager.cpp 2010-05-09 21:35:31 UTC (rev 13453)
@@ -121,3 +121,11 @@
mFallbackProxy = proxy;
mExcludedURLs = excludes;
}
+
+QNetworkReply *QgsNetworkAccessManager::createRequest( QgsNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData )
+{
+ emit requestAboutToBeCreated( op, req, outgoingData );
+ QNetworkReply *reply = QNetworkAccessManager::createRequest( op, req, outgoingData );
+ emit requestCreated( reply );
+ return reply;
+}
Modified: trunk/qgis/src/core/qgsnetworkaccessmanager.h
===================================================================
--- trunk/qgis/src/core/qgsnetworkaccessmanager.h 2010-05-09 19:20:39 UTC (rev 13452)
+++ trunk/qgis/src/core/qgsnetworkaccessmanager.h 2010-05-09 21:35:31 UTC (rev 13453)
@@ -73,6 +73,13 @@
//! set fallback proxy and URL that shouldn't use it.
void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes );
+ signals:
+ void requestAboutToBeCreated( Operation, const QNetworkRequest &, QIODevice * );
+ void requestCreated( QNetworkReply * );
+
+ protected:
+ virtual QNetworkReply *createRequest( Operation op, const QNetworkRequest & req, QIODevice * outgoingData = 0 );
+
private:
QgsNetworkAccessManager( QObject *parent = 0 );
#if QT_VERSION >= 0x40500
More information about the QGIS-commit
mailing list