Skip to content

Commit 007cc07

Browse files
author
jef
committedFeb 18, 2011
add QGISDEPRECATED macro and fix a bunch of warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15197 c8812cc2-4d05-0410-92ff-de0c093fc19c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+340
-274
lines changed
 

‎cmake/SIPMacros.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP)
8585
ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} )
8686
ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} )
8787

88+
# Suppress warnings
89+
IF(MSVC AND PEDANTIC)
90+
# 4996 deprecation warnings (bindings re-export deprecated methods)
91+
# 4701 potentially uninitialized variable used (sip generated code)
92+
# 4702 unreachable code (sip generated code)
93+
ADD_DEFINITIONS( /wd4996 /wd4701 /wd4702 )
94+
ELSE(MSVC)
95+
# disable all warnings
96+
ADD_DEFINITIONS( -w )
97+
ENDIF(MSVC)
98+
8899
ADD_CUSTOM_COMMAND(
89100
OUTPUT ${_sip_output_files}
90101
COMMAND ${CMAKE_COMMAND} -E echo ${message}

‎python/core/conversions.sip

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ template <TYPE>
3636
#include <QVector>
3737
#if (SIP_VERSION >= 0x040900)
3838
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
39+
#endif
40+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
3941
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
4042
#endif
4143
%End
@@ -116,6 +118,8 @@ template <TYPE>
116118
#include <QVector>
117119
#if (SIP_VERSION >= 0x040900)
118120
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
121+
#endif
122+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
119123
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
120124
#endif
121125
%End
@@ -274,6 +278,8 @@ template <TYPE>
274278
#include <QSet>
275279
#if (SIP_VERSION >= 0x040900)
276280
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
281+
#endif
282+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
277283
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
278284
#endif
279285
%End
@@ -329,6 +335,8 @@ template <TYPE>
329335
#include <QSet>
330336
#if (SIP_VERSION >= 0x040900)
331337
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
338+
#endif
339+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
332340
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
333341
#endif
334342
%End
@@ -404,6 +412,8 @@ template<TYPE>
404412
#include <QMap>
405413
#if (SIP_VERSION >= 0x040900)
406414
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
415+
#endif
416+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
407417
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
408418
#endif
409419
%End
@@ -525,6 +535,8 @@ template<TYPE>
525535
#include <QMap>
526536
#if (SIP_VERSION >= 0x040900)
527537
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
538+
#endif
539+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
528540
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
529541
#endif
530542
%End
@@ -630,6 +642,8 @@ template<TYPE1, TYPE2>
630642
#include <QMap>
631643
#if (SIP_VERSION >= 0x040900)
632644
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
645+
#endif
646+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
633647
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
634648
#endif
635649
%End
@@ -842,6 +856,8 @@ template<double, TYPE2>
842856
#include <QMultiMap>
843857
#if (SIP_VERSION >= 0x040900)
844858
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
859+
#endif
860+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
845861
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
846862
#endif
847863
%End
@@ -964,6 +980,8 @@ template<double, TYPE2>
964980
#include <QMap>
965981
#if (SIP_VERSION >= 0x040900)
966982
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
983+
#endif
984+
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
967985
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
968986
#endif
969987
%End

0 commit comments

Comments
 (0)
Please sign in to comment.