[QGIS Commit] r13447 - in trunk/qgis: python python/core src/core
src/plugins/spatialquery
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat May 8 20:45:18 EDT 2010
Author: jef
Date: 2010-05-08 20:45:17 -0400 (Sat, 08 May 2010)
New Revision: 13447
Modified:
trunk/qgis/python/CMakeLists.txt
trunk/qgis/python/core/qgsnetworkaccessmanager.sip
trunk/qgis/src/core/qgsnetworkaccessmanager.cpp
trunk/qgis/src/core/qgsnetworkaccessmanager.h
trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp
Log:
resolve Qt 4.5 dependency
Modified: trunk/qgis/python/CMakeLists.txt
===================================================================
--- trunk/qgis/python/CMakeLists.txt 2010-05-08 23:50:32 UTC (rev 13446)
+++ trunk/qgis/python/CMakeLists.txt 2010-05-09 00:45:17 UTC (rev 13447)
@@ -35,6 +35,10 @@
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF(MSVC)
+MATH(EXPR QT_VERSION "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100")
+IF(QT_VERSION LESS 40500)
+ SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
+ENDIF(QT_VERSION LESS 40500)
# core module
FILE(GLOB sip_files_core core/*.sip)
Modified: trunk/qgis/python/core/qgsnetworkaccessmanager.sip
===================================================================
--- trunk/qgis/python/core/qgsnetworkaccessmanager.sip 2010-05-08 23:50:32 UTC (rev 13446)
+++ trunk/qgis/python/core/qgsnetworkaccessmanager.sip 2010-05-09 00:45:17 UTC (rev 13447)
@@ -16,29 +16,31 @@
*
*/
+%Feature PROXY_FACTORY
+
class QgsNetworkAccessManager : QNetworkAccessManager
{
%TypeHeaderCode
#include <qgsnetworkaccessmanager.h>
%End
- //! returns a point to the single instance
+ public:
+ //! returns a pointer to the single instance
// and creates that instance on the first call.
static QgsNetworkAccessManager *instance();
//! destructor
~QgsNetworkAccessManager();
+%If (PROXY_FACTORY)
//! insert a factory into the proxy factories list
void insertProxyFactory(QNetworkProxyFactory *factory /TransferTo/);
//! remove a factory from the proxy factories list
void removeProxyFactory(QNetworkProxyFactory *factory /TransferBack/);
- //! retrieve proxy factory list
- void setDiskCache( QString directory, qint64 size );
-
//! retrieve fall back proxy (for urls that no factory returned proxies for)
const QList<QNetworkProxyFactory *> proxyFactories() const;
+%End
//! retrieve exclude list (urls shouldn't use the fallback proxy)
const QStringList &excludeList() const;
Modified: trunk/qgis/src/core/qgsnetworkaccessmanager.cpp
===================================================================
--- trunk/qgis/src/core/qgsnetworkaccessmanager.cpp 2010-05-08 23:50:32 UTC (rev 13446)
+++ trunk/qgis/src/core/qgsnetworkaccessmanager.cpp 2010-05-09 00:45:17 UTC (rev 13447)
@@ -25,6 +25,7 @@
#include <QUrl>
+#if QT_VERSION >= 0x40500
class QgsNetworkProxyFactory : public QNetworkProxyFactory
{
public:
@@ -62,6 +63,7 @@
return QList<QNetworkProxy>() << nam->fallbackProxy();
}
};
+#endif
QgsNetworkAccessManager *QgsNetworkAccessManager::smNAM = 0;
@@ -78,13 +80,16 @@
QgsNetworkAccessManager::QgsNetworkAccessManager( QObject *parent )
: QNetworkAccessManager( parent )
{
+#if QT_VERSION >= 0x40500
setProxyFactory( new QgsNetworkProxyFactory() );
+#endif
}
QgsNetworkAccessManager::~QgsNetworkAccessManager()
{
}
+#if QT_VERSION >= 0x40500
void QgsNetworkAccessManager::insertProxyFactory( QNetworkProxyFactory *factory )
{
mProxyFactories.insert( 0, factory );
@@ -99,6 +104,7 @@
{
return mProxyFactories;
}
+#endif
const QStringList &QgsNetworkAccessManager::excludeList() const
{
Modified: trunk/qgis/src/core/qgsnetworkaccessmanager.h
===================================================================
--- trunk/qgis/src/core/qgsnetworkaccessmanager.h 2010-05-08 23:50:32 UTC (rev 13446)
+++ trunk/qgis/src/core/qgsnetworkaccessmanager.h 2010-05-09 00:45:17 UTC (rev 13447)
@@ -46,13 +46,14 @@
Q_OBJECT
public:
- //! returns a point to the single instance
+ //! returns a pointer to the single instance
// and creates that instance on the first call.
static QgsNetworkAccessManager *instance();
//! destructor
~QgsNetworkAccessManager();
+#if QT_VERSION >= 0x40500
//! insert a factory into the proxy factories list
void insertProxyFactory( QNetworkProxyFactory *factory );
@@ -61,6 +62,7 @@
//! retrieve proxy factory list
const QList<QNetworkProxyFactory *> proxyFactories() const;
+#endif
//! retrieve fall back proxy (for urls that no factory returned proxies for)
const QNetworkProxy &fallbackProxy() const;
@@ -73,7 +75,9 @@
private:
QgsNetworkAccessManager( QObject *parent = 0 );
+#if QT_VERSION >= 0x40500
QList<QNetworkProxyFactory*> mProxyFactories;
+#endif
QNetworkProxy mFallbackProxy;
QStringList mExcludedURLs;
Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp 2010-05-08 23:50:32 UTC (rev 13446)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp 2010-05-09 00:45:17 UTC (rev 13447)
@@ -239,6 +239,9 @@
case Intersects:
operation = &QgsGeometry::intersects;
break;
+ default:
+ qWarning( "undefined operation" );
+ return;
}
// Transform referencer Target = Reference
More information about the QGIS-commit
mailing list