[QGIS Commit] r15197 - in trunk/qgis: cmake python/core
python/pyspatialite/src src/analysis src/app src/app/legend
src/core src/core/composer src/gui src/mapserver
src/plugins/diagram_overlay src/plugins/georeferencer
src/plugins/offline_editing src/plugins/ogr_converter
src/plugins/spatialquery src/plugins/sqlanywhere
src/providers/sqlanywhere
src/providers/sqlanywhere/sqlanyconnection tests/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Feb 18 10:05:35 EST 2011
Author: jef
Date: 2011-02-18 07:05:35 -0800 (Fri, 18 Feb 2011)
New Revision: 15197
Modified:
trunk/qgis/cmake/SIPMacros.cmake
trunk/qgis/python/core/conversions.sip
trunk/qgis/python/pyspatialite/src/statement.c
trunk/qgis/src/analysis/CMakeLists.txt
trunk/qgis/src/app/CMakeLists.txt
trunk/qgis/src/app/legend/qgslegend.cpp
trunk/qgis/src/app/qgssnappingdialog.cpp
trunk/qgis/src/core/composer/qgscomposerattributetable.cpp
trunk/qgis/src/core/composer/qgslegendmodel.cpp
trunk/qgis/src/core/qgis.h
trunk/qgis/src/core/qgsapplication.h
trunk/qgis/src/core/qgslabel.h
trunk/qgis/src/core/qgsmaplayer.h
trunk/qgis/src/core/qgsmaprenderer.h
trunk/qgis/src/core/qgsoverlayobject.h
trunk/qgis/src/core/qgssearchtreenode.h
trunk/qgis/src/core/qgsvectordataprovider.cpp
trunk/qgis/src/core/qgsvectordataprovider.h
trunk/qgis/src/core/qgsvectorfilewriter.h
trunk/qgis/src/core/qgsvectorlayer.cpp
trunk/qgis/src/core/qgsvectorlayer.h
trunk/qgis/src/gui/CMakeLists.txt
trunk/qgis/src/gui/qgisinterface.h
trunk/qgis/src/gui/qgsmapcanvasmap.h
trunk/qgis/src/mapserver/qgis_map_serv.cpp
trunk/qgis/src/mapserver/qgscomparisonfilter.cpp
trunk/qgis/src/mapserver/qgsprojectparser.cpp
trunk/qgis/src/mapserver/qgssldparser.cpp
trunk/qgis/src/mapserver/qgswmsserver.cpp
trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp
trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
trunk/qgis/src/plugins/offline_editing/offline_editing.cpp
trunk/qgis/src/plugins/ogr_converter/ogrconverterguibase.ui
trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
trunk/qgis/src/plugins/sqlanywhere/sanewconnectionbase.ui
trunk/qgis/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp
trunk/qgis/src/providers/sqlanywhere/sqlanyconnection/CMakeLists.txt
trunk/qgis/tests/src/core/regression992.cpp
trunk/qgis/tests/src/core/testqgsmaprenderer.cpp
trunk/qgis/tests/src/core/testqgsrasterlayer.cpp
trunk/qgis/tests/src/core/testqgsrenderers.cpp
trunk/qgis/tests/src/core/testqgsvectorlayer.cpp
Log:
add QGISDEPRECATED macro and fix a bunch of warnings
Modified: trunk/qgis/cmake/SIPMacros.cmake
===================================================================
--- trunk/qgis/cmake/SIPMacros.cmake 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/cmake/SIPMacros.cmake 2011-02-18 15:05:35 UTC (rev 15197)
@@ -85,6 +85,17 @@
ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} )
ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} )
+ # Suppress warnings
+ IF(MSVC AND PEDANTIC)
+ # 4996 deprecation warnings (bindings re-export deprecated methods)
+ # 4701 potentially uninitialized variable used (sip generated code)
+ # 4702 unreachable code (sip generated code)
+ ADD_DEFINITIONS( /wd4996 /wd4701 /wd4702 )
+ ELSE(MSVC)
+ # disable all warnings
+ ADD_DEFINITIONS( -w )
+ ENDIF(MSVC)
+
ADD_CUSTOM_COMMAND(
OUTPUT ${_sip_output_files}
COMMAND ${CMAKE_COMMAND} -E echo ${message}
Modified: trunk/qgis/python/core/conversions.sip
===================================================================
--- trunk/qgis/python/core/conversions.sip 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/python/core/conversions.sip 2011-02-18 15:05:35 UTC (rev 15197)
@@ -36,6 +36,8 @@
#include <QVector>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -116,6 +118,8 @@
#include <QVector>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -274,6 +278,8 @@
#include <QSet>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -329,6 +335,8 @@
#include <QSet>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -404,6 +412,8 @@
#include <QMap>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -525,6 +535,8 @@
#include <QMap>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -630,6 +642,8 @@
#include <QMap>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -842,6 +856,8 @@
#include <QMultiMap>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
@@ -964,6 +980,8 @@
#include <QMap>
#if (SIP_VERSION >= 0x040900)
#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
+#endif
+#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c00)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End
Modified: trunk/qgis/python/pyspatialite/src/statement.c
===================================================================
--- trunk/qgis/python/pyspatialite/src/statement.c 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/python/pyspatialite/src/statement.c 2011-02-18 15:05:35 UTC (rev 15197)
@@ -490,8 +490,6 @@
pos++;
}
-
- return 0;
}
PyTypeObject pysqlite_StatementType = {
Modified: trunk/qgis/src/analysis/CMakeLists.txt
===================================================================
--- trunk/qgis/src/analysis/CMakeLists.txt 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/analysis/CMakeLists.txt 2011-02-18 15:05:35 UTC (rev 15197)
@@ -42,6 +42,15 @@
ADD_BISON_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalcparser.yy)
+IF (MSVC AND PEDANTIC)
+# disable warnings
+# 4065 switch with default and no case
+# 4702 unreachable code
+SET_SOURCE_FILES_PROPERTIES(
+ ${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp
+ PROPERTIES COMPILE_FLAGS "-wd4065 -wd4702")
+ENDIF (MSVC AND PEDANTIC)
+
SET(QGIS_ANALYSIS_MOC_HDRS
)
Modified: trunk/qgis/src/app/CMakeLists.txt
===================================================================
--- trunk/qgis/src/app/CMakeLists.txt 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/app/CMakeLists.txt 2011-02-18 15:05:35 UTC (rev 15197)
@@ -321,6 +321,9 @@
IF (WIN32)
IF (MSVC)
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/qgis_win32.rc)
+
+ # disable deprecation warnings
+ SET_SOURCE_FILES_PROPERTIES(qgisappinterface.cpp PROPERTIES COMPILE_FLAGS /wd4996)
ELSE(MSVC)
# Icon for windows MINGW
Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/app/legend/qgslegend.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -626,7 +626,7 @@
setItemExpanded( llayer, true );
- refreshLayerSymbology( layer->getLayerID() );
+ refreshLayerSymbology( layer->id() );
updateMapCanvasLayerSet();
@@ -738,7 +738,7 @@
QgsLegendGroup *cg = dynamic_cast<QgsLegendGroup *>( child );
if ( cl )
- QgsMapLayerRegistry::instance()->removeMapLayer( cl->layer()->getLayerID() );
+ QgsMapLayerRegistry::instance()->removeMapLayer( cl->layer()->id() );
else if ( cg )
removeGroup( cg );
@@ -755,7 +755,7 @@
if ( !ml )
return;
- QgsLegendLayer *layer = findLegendLayer( ml->getLayerID() );
+ QgsLegendLayer *layer = findLegendLayer( ml->id() );
if ( !layer )
return;
@@ -915,7 +915,7 @@
QDomElement legendlayerfilenode = document.createElement( "legendlayerfile" );
// layer id
- legendlayerfilenode.setAttribute( "layerid", layer->getLayerID() );
+ legendlayerfilenode.setAttribute( "layerid", layer->id() );
layerfilegroupnode.appendChild( legendlayerfilenode );
// visible flag
@@ -1022,7 +1022,7 @@
}
// load symbology
- refreshLayerSymbology( currentLayer->layer()->getLayerID() );
+ refreshLayerSymbology( currentLayer->layer()->id() );
if ( isOpen )
{
@@ -1101,7 +1101,7 @@
theLegendLayer = dynamic_cast<QgsLegendLayer *>( theItem );
if ( theLegendLayer ) //item is a legend layer
{
- if ( theLegendLayer->layer()->getLayerID() == layerKey )
+ if ( theLegendLayer->layer()->id() == layerKey )
{
return theLegendLayer;
}
@@ -1221,7 +1221,7 @@
if ( lLayer->layer() )
{
QList<QString> layerList;
- layerList.push_back( lLayer->layer()->getLayerID() );
+ layerList.push_back( lLayer->layer()->id() );
groupLayerList.push_back( qMakePair( QString(), layerList ) );
}
}
@@ -1240,7 +1240,7 @@
{
if ( lLayer->layer() )
{
- layerList.push_back( lLayer->layer()->getLayerID() );
+ layerList.push_back( lLayer->layer()->id() );
}
}
@@ -1449,7 +1449,7 @@
if ( ll )
{
QgsMapLayer *lyr = ll->layer();
- layers.push_front( lyr->getLayerID() );
+ layers.push_front( lyr->id() );
}
}
@@ -1729,8 +1729,8 @@
}
layer->setMinimumMaximumUsingLastExtent();
- layer->setCacheImage(NULL);
- refreshLayerSymbology( layer->getLayerID() );
+ layer->setCacheImage( NULL );
+ refreshLayerSymbology( layer->id() );
mMapCanvas->refresh();
}
}
@@ -1847,7 +1847,7 @@
QgsLegendLayer *ll = dynamic_cast<QgsLegendLayer *>( item );
if ( ll && ll->layer() )
{
- QgsMapLayerRegistry::instance()->removeMapLayer( ll->layer()->getLayerID() );
+ QgsMapLayerRegistry::instance()->removeMapLayer( ll->layer()->id() );
continue;
}
}
Modified: trunk/qgis/src/app/qgssnappingdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgssnappingdialog.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/app/qgssnappingdialog.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -191,7 +191,7 @@
mLayerTreeWidget->setItemWidget( item, 5, cbxAvoidIntersection );
}
- int idx = layerIdList.indexOf( currentVectorLayer->getLayerID() );
+ int idx = layerIdList.indexOf( currentVectorLayer->id() );
if ( idx < 0 )
{
// no settings for this layer yet
@@ -218,7 +218,7 @@
cbxUnits->setCurrentIndex( toleranceUnitList[idx].toInt() );
if ( cbxAvoidIntersection )
{
- cbxAvoidIntersection->setChecked( avoidIntersectionsList.contains( currentVectorLayer->getLayerID() ) );
+ cbxAvoidIntersection->setChecked( avoidIntersectionsList.contains( currentVectorLayer->id() ) );
}
}
Modified: trunk/qgis/src/core/composer/qgscomposerattributetable.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposerattributetable.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/composer/qgscomposerattributetable.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -231,7 +231,7 @@
}
if ( mVectorLayer )
{
- composerTableElem.setAttribute( "vectorLayer", mVectorLayer->getLayerID() );
+ composerTableElem.setAttribute( "vectorLayer", mVectorLayer->id() );
}
//display attributes
Modified: trunk/qgis/src/core/composer/qgslegendmodel.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgslegendmodel.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/composer/qgslegendmodel.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -242,7 +242,7 @@
{
currentSymbolItem->setIcon( QIcon( rasterLayer->legendAsPixmap( true ) ) );
}
- currentSymbolItem->setLayerID( rasterLayer->getLayerID() );
+ currentSymbolItem->setLayerID( rasterLayer->id() );
int currentRowCount = layerItem->rowCount();
layerItem->setChild( currentRowCount, 0, currentSymbolItem );
@@ -338,7 +338,7 @@
}
QgsComposerLayerItem* layerItem = new QgsComposerLayerItem( theMapLayer->name() );
- layerItem->setLayerID( theMapLayer->getLayerID() );
+ layerItem->setLayerID( theMapLayer->id() );
layerItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
invisibleRootItem()->setChild( invisibleRootItem()->rowCount(), layerItem );
Modified: trunk/qgis/src/core/qgis.h
===================================================================
--- trunk/qgis/src/core/qgis.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgis.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -189,4 +189,18 @@
#endif
#endif
+#ifndef QGISDEPRECATED
+#ifndef Q_MOC_RUN
+#ifdef _MSC_VER
+# define QGISDEPRECATED __declspec(deprecated)
+#elif __GNUC__
+# define QGISDEPRECATED __attribute__((__deprecated__))
+#else
+# define QGISDEPRECATED
#endif
+#else
+#define QGISDEPRECATED
+#endif
+#endif
+
+#endif
Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsapplication.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -18,6 +18,8 @@
#include <QApplication>
+#include <qgis.h>
+
/** \ingroup core
* Extends QApplication to provide access to QGIS specific resources such
* as theme paths, database paths etc.
@@ -111,7 +113,7 @@
//! Returns the paths to svg applications svg directory.
//! @deprecated since 1.4
- static const QString svgPath();
+ QGISDEPRECATED static const QString svgPath();
//! Returns the path to the application prefix directory.
static const QString prefixPath();
Modified: trunk/qgis/src/core/qgslabel.h
===================================================================
--- trunk/qgis/src/core/qgslabel.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgslabel.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -103,11 +103,11 @@
* \param rasterScaleFactor raster scale
* \deprecated
*/
- void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
- QgsCoordinateTransform* coordinateTransform,
- const QgsMapToPixel *transform,
- QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
- double sizeScale = 1., double rasterScaleFactor = 1.0 )
+ QGISDEPRECATED void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
+ QgsCoordinateTransform* coordinateTransform,
+ const QgsMapToPixel *transform,
+ QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
+ double sizeScale = 1., double rasterScaleFactor = 1.0 )
{
QgsRenderContext r;
r.setExtent( viewExtent );
@@ -148,7 +148,7 @@
/** Pointer to default attributes.
* @deprecated in version 2 as it is badly named. Rather use attributes.
* @see labelAttributes method rather */
- QgsLabelAttributes *layerAttributes( void );
+ QGISDEPRECATED QgsLabelAttributes *layerAttributes( void );
/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
Modified: trunk/qgis/src/core/qgsmaplayer.h
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsmaplayer.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -25,6 +25,7 @@
#include <QVariant>
#include <QImage>
+#include "qgis.h"
#include "qgsrectangle.h"
class QgsRenderContext;
@@ -75,7 +76,7 @@
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @deprecated use id()
**/
- QString getLayerID() const { return id(); }
+ QGISDEPRECATED QString getLayerID() const { return id(); }
/** Set the display name of the layer
* @param name New name for the layer
Modified: trunk/qgis/src/core/qgsmaprenderer.h
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsmaprenderer.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -135,7 +135,7 @@
//! Return the measuring object
//! @deprecated
- QgsDistanceArea* distanceArea() { return mDistArea; }
+ QGISDEPRECATED QgsDistanceArea *distanceArea() { return mDistArea; }
QGis::UnitType mapUnits() const;
void setMapUnits( QGis::UnitType u );
Modified: trunk/qgis/src/core/qgsoverlayobject.h
===================================================================
--- trunk/qgis/src/core/qgsoverlayobject.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsoverlayobject.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -43,11 +43,11 @@
/**Returns the feature geometry in geos format. The calling function does _not_ take
ownership of the generated object. The geometry is in map coordinates
@deprecated Please use geometry() and QgsGeometry::asGeos instead*/
- GEOSGeometry* getGeosGeometry();
+ QGISDEPRECATED GEOSGeometry* getGeosGeometry();
/**Feature geometry is released when object is destructed so this function is empty.
* @deprecated nop
*/
- void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
+ QGISDEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
//getters
int width() const {return mWidth;}
Modified: trunk/qgis/src/core/qgssearchtreenode.h
===================================================================
--- trunk/qgis/src/core/qgssearchtreenode.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgssearchtreenode.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -26,6 +26,7 @@
#include <QVariant>
#include <QList>
+#include <qgis.h>
#include <qgsfield.h>
#include <qgsfeature.h>
@@ -155,7 +156,7 @@
bool checkAgainst( const QgsFieldMap& fields, QgsFeature &f );
//! @deprecated
- bool checkAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
+ QGISDEPRECATED bool checkAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
//! checks if there were errors during evaluation
bool hasError() { return ( !mError.isEmpty() ); }
@@ -171,11 +172,11 @@
QgsFeature &f );
//! @deprecated
- bool getValue( QgsSearchTreeValue& value,
- QgsSearchTreeNode* node,
- const QgsFieldMap &fields,
- const QgsAttributeMap &attributes,
- QgsGeometry* geom = 0 );
+ QGISDEPRECATED bool getValue( QgsSearchTreeValue& value,
+ QgsSearchTreeNode* node,
+ const QgsFieldMap &fields,
+ const QgsAttributeMap &attributes,
+ QgsGeometry* geom = 0 );
//! return a list of referenced columns in the tree
//! @note added in 1.5
@@ -211,7 +212,7 @@
QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, QgsFeature &f );
//! @deprecated
- QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
+ QGISDEPRECATED QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
//! strips mText when node is of string type
void stripText();
Modified: trunk/qgis/src/core/qgsvectordataprovider.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectordataprovider.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsvectordataprovider.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -87,15 +87,19 @@
bool QgsVectorDataProvider::addAttributes( const QMap<QString, QString> &attributes )
{
- const QMap<QString, QVariant::Type> &map = supportedNativeTypes();
+ const QList< NativeType > &types = nativeTypes();
QList< QgsField > list;
for ( QMap<QString, QString>::const_iterator it = attributes.constBegin(); it != attributes.constEnd(); it++ )
{
- if ( !map.contains( it.value() ) )
+ int i;
+ for ( i = 0; i < types.size() && types[i].mTypeName != it.value(); i++ )
+ ;
+
+ if ( i == types.size() )
return false;
- list << QgsField( it.key(), map[ it.value()], it.value() );
+ list << QgsField( it.key(), types[i].mType, it.value() );
}
return addAttributes( list );
Modified: trunk/qgis/src/core/qgsvectordataprovider.h
===================================================================
--- trunk/qgis/src/core/qgsvectordataprovider.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsvectordataprovider.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -237,7 +237,7 @@
* @return true in case of success and false in case of failure
* @deprecated
*/
- virtual bool addAttributes( const QMap<QString, QString> &attributes );
+ QGISDEPRECATED virtual bool addAttributes( const QMap<QString, QString> &attributes );
/**
* Deletes existing attributes
@@ -345,9 +345,9 @@
/**
* Returns the names of the supported types
- * @deprecated
+ * @deprecated use nativeTypes()
*/
- const QMap<QString, QVariant::Type> &supportedNativeTypes() const;
+ QGISDEPRECATED const QMap<QString, QVariant::Type> &supportedNativeTypes() const;
/** Returns true if the provider is strict about the type of inserted features
(e.g. no multipolygon in a polygon layer)
Modified: trunk/qgis/src/core/qgsvectorfilewriter.h
===================================================================
--- trunk/qgis/src/core/qgsvectorfilewriter.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsvectorfilewriter.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -58,15 +58,15 @@
/** Write contents of vector layer to a shapefile
@deprecated Use writeAsVectorFormat instead*/
- static WriterError writeAsShapefile( QgsVectorLayer* layer,
- const QString& shapefileName,
- const QString& fileEncoding,
- const QgsCoordinateReferenceSystem *destCRS,
- bool onlySelected = false,
- QString *errorMessage = 0,
- const QStringList &datasourceOptions = QStringList(), // added in 1.6
- const QStringList &layerOptions = QStringList() // added in 1.6
- );
+ QGISDEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
+ const QString& shapefileName,
+ const QString& fileEncoding,
+ const QgsCoordinateReferenceSystem *destCRS,
+ bool onlySelected = false,
+ QString *errorMessage = 0,
+ const QStringList &datasourceOptions = QStringList(), // added in 1.6
+ const QStringList &layerOptions = QStringList() // added in 1.6
+ );
/** Write contents of vector layer to an (OGR supported) vector formt
@note: this method was added in version 1.5*/
Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -3263,12 +3263,13 @@
bool QgsVectorLayer::addAttribute( QString name, QString type )
{
- const QMap<QString, QVariant::Type> &map = mDataProvider->supportedNativeTypes();
+ const QList< QgsVectorDataProvider::NativeType > &types = mDataProvider->nativeTypes();
- if ( !map.contains( type ) )
- return false;
+ int i;
+ for ( i = 0; i < types.size() && types[i].mTypeName != type; i++ )
+ ;
- return addAttribute( QgsField( name, map[ type ], type ) );
+ return i < types.size() && addAttribute( QgsField( name, types[i].mType, type ) );
}
void QgsVectorLayer::addAttributeAlias( int attIndex, QString aliasString )
Modified: trunk/qgis/src/core/qgsvectorlayer.h
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/core/qgsvectorlayer.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -494,7 +494,7 @@
/** add an attribute field (but does not commit it)
returns true if the field was added
@deprecated */
- bool addAttribute( QString name, QString type );
+ QGISDEPRECATED bool addAttribute( QString name, QString type );
/**Sets an alias (a display name) for attributes to display in dialogs
@note added in version 1.2*/
Modified: trunk/qgis/src/gui/CMakeLists.txt
===================================================================
--- trunk/qgis/src/gui/CMakeLists.txt 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/gui/CMakeLists.txt 2011-02-18 15:05:35 UTC (rev 15197)
@@ -104,6 +104,11 @@
QT4_WRAP_CPP(QGIS_GUI_MOC_SRCS ${QGIS_GUI_MOC_HDRS})
+IF(MSVC AND PEDANTIC)
+ # disable deprecation warnings for qgisinterface (re-exporting deprecated methods)
+ SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/src/gui/moc_qgisinterface.cxx PROPERTIES COMPILE_FLAGS "-wd4996")
+ENDIF(MSVC AND PEDANTIC)
+
INCLUDE_DIRECTORIES(
${QT_QTUITOOLS_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/gui/qgisinterface.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -25,12 +25,7 @@
class QDockWidget;
class QMainWindow;
class QWidget;
-#include <QObject>
-#include <QPair>
-#include <map>
-
-
class QgsComposerView;
class QgsMapLayer;
class QgsMapCanvas;
@@ -39,6 +34,13 @@
class QgsLegendInterface;
class QgsFeature;
+#include <QObject>
+#include <QPair>
+#include <map>
+
+#include <qgis.h>
+
+
/** \ingroup gui
* QgisInterface
* Abstract base class defining interfaces exposed by QgisApp and
@@ -147,6 +149,9 @@
/** refresh the legend of a layer
\deprecated use QgsLegendInterface::refreshLayerSymbology
*/
+#ifndef Q_MOC_RUN
+ QGISDEPRECATED
+#endif
virtual void refreshLegend( QgsMapLayer *l ) = 0;
/** open layer properties dialog
@@ -185,6 +190,9 @@
* @param useQgisDocDirectory If true, the URL will be formed by concatenating
* url to the QGIS documentation directory path (prefix/share/doc)
*/
+#ifndef Q_MOC_RUN
+ QGISDEPRECATED
+#endif
virtual void openURL( QString url, bool useQgisDocDirectory = true ) = 0;
Modified: trunk/qgis/src/gui/qgsmapcanvasmap.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasmap.h 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/gui/qgsmapcanvasmap.h 2011-02-18 15:05:35 UTC (rev 15197)
@@ -20,6 +20,7 @@
#include <QGraphicsRectItem>
#include <QPixmap>
+#include <qgis.h>
class QgsMapRenderer;
class QgsMapCanvas;
@@ -48,9 +49,8 @@
void setPanningOffset( const QPoint& point );
- //deprecated. Please use paintDevice() function
- //which is also save in case QImage is used
- QPixmap& pixmap() { return mPixmap; }
+ //! @deprecated Please use paintDevice() function which is also save in case QImage is used
+ QGISDEPRECATED QPixmap& pixmap() { return mPixmap; }
QPaintDevice& paintDevice();
Modified: trunk/qgis/src/mapserver/qgis_map_serv.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgis_map_serv.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/mapserver/qgis_map_serv.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -152,7 +152,7 @@
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
-#ifdef QGSMSDEBUG && !_MSC_VER
+#if defined(QGSMSDEBUG) && !defined(_MSC_VER)
//write to qgis_wms_server.log in application directory
QgsMapServerLogger::instance()->setLogFilePath( qgsapp.applicationDirPath() + "/qgis_wms_server.log" );
#endif
Modified: trunk/qgis/src/mapserver/qgscomparisonfilter.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgscomparisonfilter.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/mapserver/qgscomparisonfilter.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -108,7 +108,7 @@
break;
case UNKNOWN:
default:
- return false;
+ break;
}
return false; //soon...
}
Modified: trunk/qgis/src/mapserver/qgsprojectparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgsprojectparser.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/mapserver/qgsprojectparser.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -65,7 +65,7 @@
if ( layer )
{
QgsMSDebugMsg( QString( "add layer %1 to map" ).arg( layer->id() ) );
- layerMap.insert( layer->getLayerID(), layer );
+ layerMap.insert( layer->id(), layer );
}
#if QGSMSDEBUG
else
@@ -208,7 +208,7 @@
continue;
}
- if ( nonIdentifiableLayers.contains( currentLayer->getLayerID() ) )
+ if ( nonIdentifiableLayers.contains( currentLayer->id() ) )
{
layerElem.setAttribute( "queryable", "0" );
}
Modified: trunk/qgis/src/mapserver/qgssldparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgssldparser.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/mapserver/qgssldparser.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -573,7 +573,7 @@
// if there is a viable text textSymbolizerElement
if ( !textSymbolizerElement.isNull() )
{
- QgsLabelAttributes * myLabelAttributes = vec->label()->layerAttributes();
+ QgsLabelAttributes * myLabelAttributes = vec->label()->labelAttributes();
//element <Label> contains the attribute name
QDomNodeList labelNodeList = textSymbolizerElement.elementsByTagName( "Label" );
// if a viable label element is provided
Modified: trunk/qgis/src/mapserver/qgswmsserver.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgswmsserver.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/mapserver/qgswmsserver.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -632,7 +632,7 @@
{
//is there alias info for this vector layer?
QMap< int, QString > layerAliasInfo;
- QMap< QString, QMap< int, QString > >::const_iterator aliasIt = aliasInfo.find( currentLayer->getLayerID() );
+ QMap< QString, QMap< int, QString > >::const_iterator aliasIt = aliasInfo.find( currentLayer->id() );
if ( aliasIt != aliasInfo.constEnd() )
{
layerAliasInfo = aliasIt.value();
@@ -640,7 +640,7 @@
//hidden attributes for this layer
QSet<QString> layerHiddenAttributes;
- QMap< QString, QSet<QString> >::const_iterator hiddenIt = hiddenAttributes.find( currentLayer->getLayerID() );
+ QMap< QString, QSet<QString> >::const_iterator hiddenIt = hiddenAttributes.find( currentLayer->id() );
if ( hiddenIt != hiddenAttributes.constEnd() )
{
layerHiddenAttributes = hiddenIt.value();
@@ -1180,7 +1180,7 @@
//set the sourceSRS to the same as the destSRS
theMapLayer->setCrs( destCRS );
}
- layerKeys.push_front( theMapLayer->getLayerID() );
+ layerKeys.push_front( theMapLayer->id() );
QgsMapLayerRegistry::instance()->addMapLayer( theMapLayer, false );
}
else
Modified: trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -17,6 +17,7 @@
#include "qgsdiagramoverlayplugin.h"
#include "qgisinterface.h"
+#include "qgslegendinterface.h"
#include "qgsdiagramdialog.h"
#include "qgsdiagramoverlay.h"
#include "qgsmaplayerregistry.h"
@@ -111,9 +112,9 @@
currentVectorLayer->addOverlay( newDiagramOverlay );
//notify the legend that the layer legend needs to be changed
- if ( mInterface )
+ if ( mInterface && mInterface->legendInterface() )
{
- mInterface->refreshLegend( currentVectorLayer );
+ mInterface->legendInterface()->refreshLayerSymbology( currentVectorLayer );
}
}
}
Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -252,7 +252,7 @@
//delete any old rasterlayers
if ( mLayer )
- QgsMapLayerRegistry::instance()->removeMapLayer( mLayer->getLayerID(), false );
+ QgsMapLayerRegistry::instance()->removeMapLayer( mLayer->id(), false );
// Add raster
addRaster( mRasterFileName );
@@ -775,7 +775,7 @@
// Registry layer QGis
void QgsGeorefPluginGui::layerWillBeRemoved( QString theLayerId )
{
- mAgainAddRaster = mLayer && mLayer->getLayerID().compare( theLayerId ) == 0;
+ mAgainAddRaster = mLayer && mLayer->id().compare( theLayerId ) == 0;
}
// ------------------------------ private ---------------------------------- //
Modified: trunk/qgis/src/plugins/offline_editing/offline_editing.cpp
===================================================================
--- trunk/qgis/src/plugins/offline_editing/offline_editing.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/offline_editing/offline_editing.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -547,7 +547,7 @@
featureCount = 1;
// update feature id lookup
- int layerId = getOrCreateLayerId( db, newLayer->getLayerID() );
+ int layerId = getOrCreateLayerId( db, newLayer->id() );
QList<int> offlineFeatureIds;
newLayer->select( QgsAttributeList(), QgsRectangle(), false, false );
while ( newLayer->nextFeature( f ) )
@@ -571,7 +571,7 @@
}
// remove remote layer
- QgsMapLayerRegistry::instance()->removeMapLayer( layer->getLayerID() );
+ QgsMapLayerRegistry::instance()->removeMapLayer( layer->id() );
}
}
}
Modified: trunk/qgis/src/plugins/ogr_converter/ogrconverterguibase.ui
===================================================================
--- trunk/qgis/src/plugins/ogr_converter/ogrconverterguibase.ui 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/ogr_converter/ogrconverterguibase.ui 2011-02-18 15:05:35 UTC (rev 15197)
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>491</width>
- <height>323</height>
+ <height>368</height>
</rect>
</property>
<property name="sizePolicy">
@@ -43,6 +43,47 @@
<string>Source</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="1" colspan="2">
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="radioSrcFile">
+ <property name="text">
+ <string>File</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QRadioButton" name="radioSrcProtocol">
+ <property name="text">
+ <string>Remote source</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QRadioButton" name="radioSrcDirectory">
+ <property name="text">
+ <string>Directory</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
<item row="5" column="0">
<widget class="QLabel" name="labelSrcLayer">
<property name="minimumSize">
@@ -125,60 +166,7 @@
</property>
</widget>
</item>
- <item row="1" column="1" colspan="2">
- <layout class="QGridLayout" name="gridLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QRadioButton" name="radioSrcFile">
- <property name="text">
- <string>File</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QRadioButton" name="radioSrcProtocol">
- <property name="text">
- <string>Remote source</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QRadioButton" name="radioSrcDirectory">
- <property name="text">
- <string>Directory</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
</layout>
- <zorder>radioSrcFile</zorder>
- <zorder>radioSrcDirectory</zorder>
- <zorder>radioSrcProtocol</zorder>
- <zorder>radioSrcDirectory</zorder>
- <zorder>labelSrcLayer</zorder>
- <zorder>labelSrcDataset</zorder>
- <zorder>inputSrcDataset</zorder>
- <zorder>comboSrcLayer</zorder>
- <zorder>buttonSelectSrc</zorder>
- <zorder></zorder>
- <zorder>comboSrcFormats</zorder>
- <zorder>labelSrcFormat</zorder>
</widget>
</item>
<item>
Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -797,7 +797,7 @@
}
addLayerCombobox( true, vectorLayer );
addLayerCombobox( false, vectorLayer );
- mMapIdVectorLayers.insert( vectorLayer->getLayerID(), vectorLayer );
+ mMapIdVectorLayers.insert( vectorLayer->id(), vectorLayer );
// Verify is can enable buttonBox
if ( !buttonBoxMain->button( QDialogButtonBox::Ok )->isEnabled() && targetLayerComboBox->count() > 1 )
Modified: trunk/qgis/src/plugins/sqlanywhere/sanewconnectionbase.ui
===================================================================
--- trunk/qgis/src/plugins/sqlanywhere/sanewconnectionbase.ui 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/plugins/sqlanywhere/sanewconnectionbase.ui 2011-02-18 15:05:35 UTC (rev 15197)
@@ -1,140 +1,141 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>SaNewConnectionBase</class>
- <widget class="QDialog" name="SaNewConnectionBase" >
- <property name="geometry" >
+ <widget class="QDialog" name="SaNewConnectionBase">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>323</width>
- <height>274</height>
+ <height>436</height>
</rect>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Create a new SQL Anywhere connection</string>
</property>
- <property name="sizeGripEnabled" >
+ <property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <property name="modal" >
+ <property name="modal">
<bool>true</bool>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0" >
- <widget class="QGroupBox" name="GroupBox1" >
- <property name="title" >
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="GroupBox1">
+ <property name="title">
<string>Connection Information</string>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>5</number>
</property>
- <item row="0" column="0" >
- <layout class="QHBoxLayout" >
- <property name="spacing" >
+ <item row="0" column="0">
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
- <property name="margin" >
+ <property name="margin">
<number>0</number>
</property>
<item>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
- <property name="margin" >
+ <property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QLabel" name="TextLabel1" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
<string>Name</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtName</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel2" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel2">
+ <property name="text">
<string>Host</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtHost</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel3" >
- <property name="text" >
- <string>Port</string>
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>Port</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtPort</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel4" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
<string>Server</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtServer</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel5" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel5">
+ <property name="text">
<string>Database</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtDatabase</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel6" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel6">
+ <property name="text">
<string>Connection Parameters</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtParameters</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel7" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel7">
+ <property name="text">
<string>Username</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtUsername</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel8" >
- <property name="text" >
+ <widget class="QLabel" name="TextLabel8">
+ <property name="text">
<string>Password</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>txtPassword</cstring>
</property>
</widget>
@@ -142,136 +143,136 @@
</layout>
</item>
<item>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
- <property name="margin" >
+ <property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QLineEdit" name="txtName" >
- <property name="toolTip" >
+ <widget class="QLineEdit" name="txtName">
+ <property name="toolTip">
<string>Name of the new connection</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtHost" >
- <property name="toolTip" >
+ <widget class="QLineEdit" name="txtHost">
+ <property name="toolTip">
<string>Name or IP address of computer hosting the database server (leave blank for local connections)</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtPort" >
- <property name="toolTip" >
- <string>Port number used by the database server (leave blank for default 2638)</string>
+ <widget class="QLineEdit" name="txtPort">
+ <property name="toolTip">
+ <string>Port number used by the database server (leave blank for default 2638)</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtServer" >
- <property name="toolTip" >
- <string>Name of the database server (leave blank for default server on host)</string>
+ <widget class="QLineEdit" name="txtServer">
+ <property name="toolTip">
+ <string>Name of the database server (leave blank for default server on host)</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtDatabase" >
- <property name="toolTip" >
- <string>Name of the database (leave blank for default database on server)</string>
+ <widget class="QLineEdit" name="txtDatabase">
+ <property name="toolTip">
+ <string>Name of the database (leave blank for default database on server)</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtParameters" >
- <property name="toolTip" >
- <string>Additional connection parameters</string>
+ <widget class="QLineEdit" name="txtParameters">
+ <property name="toolTip">
+ <string>Additional connection parameters</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="txtUsername" >
- <property name="toolTip" >
- <string>Database username</string>
+ <widget class="QLineEdit" name="txtUsername">
+ <property name="toolTip">
+ <string>Database username</string>
</property>
- </widget>
+ </widget>
</item>
<item>
- <widget class="QLineEdit" name="txtPassword" >
- <property name="echoMode" >
+ <widget class="QLineEdit" name="txtPassword">
+ <property name="toolTip">
+ <string>Database password</string>
+ </property>
+ <property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
- <property name="toolTip" >
- <string>Database password</string>
- </property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
- <item row="1" column="0" >
- <layout class="QGridLayout" name="gridLayout" >
- <property name="margin" >
+ <item row="1" column="0">
+ <layout class="QGridLayout" name="gridLayout_1">
+ <property name="margin">
<number>0</number>
</property>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="chkStoreUsername" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="chkStoreUsername">
+ <property name="toolTip">
+ <string>Save the connection username in the registry</string>
+ </property>
+ <property name="text">
<string>Save Username</string>
</property>
- <property name="toolTip" >
- <string>Save the connection username in the registry</string>
- </property>
</widget>
</item>
- <item rowspan="2" row="0" column="1" >
- <widget class="QPushButton" name="btnConnect" >
- <property name="text" >
+ <item row="0" column="1" rowspan="2">
+ <widget class="QPushButton" name="btnConnect">
+ <property name="text">
<string>&Test Connect</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="chkStorePassword" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="chkStorePassword">
+ <property name="toolTip">
+ <string>Save the connection password in the registry (WARNING: NOT SECURE)</string>
+ </property>
+ <property name="text">
<string>Save Password</string>
</property>
- <property name="toolTip" >
- <string>Save the connection password in the registry (WARNING: NOT SECURE)</string>
- </property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QCheckBox" name="chkSimpleEncryption" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="chkSimpleEncryption">
+ <property name="toolTip">
+ <string>Encrypt packets using simple encryption</string>
+ </property>
+ <property name="text">
<string>Simple Encryption</string>
</property>
- <property name="toolTip" >
- <string>Encrypt packets using simple encryption</string>
- </property>
</widget>
</item>
- <item row="3" column="0" >
- <widget class="QCheckBox" name="chkEstimateMetadata" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="chkEstimateMetadata">
+ <property name="toolTip">
+ <string>Use estimates for certain layer properties such as cardinality, extent, etc. (improves performance)</string>
+ </property>
+ <property name="text">
<string>Estimate table metadata</string>
</property>
- <property name="toolTip" >
- <string>Use estimates for certain layer properties such as cardinality, extent, etc. (improves performance)</string>
- </property>
</widget>
</item>
- <item row="4" column="0" >
- <widget class="QCheckBox" name="chkOtherSchemas" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="chkOtherSchemas">
+ <property name="toolTip">
+ <string>Search for geometry columns in tables owned by other users</string>
+ </property>
+ <property name="text">
<string>Search other users' tables</string>
</property>
- <property name="toolTip" >
- <string>Search for geometry columns in tables owned by other users</string>
- </property>
</widget>
</item>
</layout>
@@ -279,16 +280,16 @@
</layout>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Help</set>
+ <item row="1" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>txtName</tabstop>
<tabstop>txtHost</tabstop>
@@ -314,11 +315,11 @@
<receiver>SaNewConnectionBase</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>313</x>
<y>501</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>451</x>
<y>312</y>
</hint>
@@ -330,11 +331,11 @@
<receiver>SaNewConnectionBase</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>395</x>
<y>501</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>450</x>
<y>287</y>
</hint>
Modified: trunk/qgis/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp
===================================================================
--- trunk/qgis/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -550,7 +550,7 @@
if ( !mKeyColumn.isEmpty() )
{
bool keyIsValid = true;
- unsigned int colId;
+ unsigned int colId = 0;
// test whether key column is a member of table and appropriate type
sql = QString( "SELECT FIRST column_id "
@@ -1392,9 +1392,9 @@
bool
QgsSqlAnywhereProvider::changeAttributeValues( const QgsChangedAttributesMap & attr_map )
{
- bool ok = true;
- sacapi_i32 code;
- char errbuf[SACAPI_ERROR_SIZE];
+ bool ok = true;
+ sacapi_i32 code = 0;
+ char errbuf[SACAPI_ERROR_SIZE];
if ( !( mCapabilities & QgsVectorDataProvider::ChangeAttributeValues ) )
{
@@ -2089,7 +2089,7 @@
{
// attempt to find a compatible planar srs
bool foundProjection = false;
- int projSrid;
+ int projSrid = -1;
QString projStr;
QString projMsg;
Modified: trunk/qgis/src/providers/sqlanywhere/sqlanyconnection/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/sqlanywhere/sqlanyconnection/CMakeLists.txt 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/src/providers/sqlanywhere/sqlanyconnection/CMakeLists.txt 2011-02-18 15:05:35 UTC (rev 15197)
@@ -10,6 +10,7 @@
IF (WIN32)
IF (MSVC)
ADD_DEFINITIONS("-DSACONN_EXPORT=__declspec(dllexport)")
+ SET_SOURCE_FILES_PROPERTIES(sacapi/sacapidll.c PROPERTIES COMPILE_FLAGS "-wd4152 -wd4055")
ELSE (MSVC)
ADD_DEFINITIONS("-USACONN_EXPORT \"-DSACONN_EXPORT=__declspec(dllexport)\"")
ENDIF (MSVC)
Modified: trunk/qgis/tests/src/core/regression992.cpp
===================================================================
--- trunk/qgis/tests/src/core/regression992.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/tests/src/core/regression992.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -78,7 +78,7 @@
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
- myLayers << mpRasterLayer->getLayerID();
+ myLayers << mpRasterLayer->id();
mpMapRenderer->setLayerSet(myLayers);
mReport += "<h1>Regression 992 Test</h1>\n";
mReport += "<p>See <a href=\"https://trac.osgeo.org/qgis/ticket/992\">"
Modified: trunk/qgis/tests/src/core/testqgsmaprenderer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsmaprenderer.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/tests/src/core/testqgsmaprenderer.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -170,7 +170,7 @@
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
- myLayers << mpPolysLayer->getLayerID();
+ myLayers << mpPolysLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Map Render Tests</h1>\n";
}
Modified: trunk/qgis/tests/src/core/testqgsrasterlayer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrasterlayer.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/tests/src/core/testqgsrasterlayer.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -93,7 +93,7 @@
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
- myLayers << mpRasterLayer->getLayerID();
+ myLayers << mpRasterLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Raster Layer Tests</h1>\n";
}
@@ -134,7 +134,7 @@
void TestQgsRasterLayer::landsatBasic()
{
QStringList myLayers;
- myLayers << mpLandsatRasterLayer->getLayerID();
+ myLayers << mpLandsatRasterLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mpMapRenderer->setExtent( mpLandsatRasterLayer->extent() );
QVERIFY( render( "landsat_basic" ) );
@@ -143,7 +143,7 @@
{
//a qml that orders the rgb bands as 8,7,5
QStringList myLayers;
- myLayers << mpLandsatRasterLayer->getLayerID();
+ myLayers << mpLandsatRasterLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mpMapRenderer->setExtent( mpLandsatRasterLayer->extent() );
QVERIFY( setQml( "875" ) );
@@ -218,7 +218,7 @@
myRasterFileInfo.completeBaseName() );
QgsMapLayerRegistry::instance()->addMapLayer( mypLayer, false );
- QgsMapLayerRegistry::instance()->removeMapLayer( mypLayer->getLayerID() );
+ QgsMapLayerRegistry::instance()->removeMapLayer( mypLayer->id() );
//cleanup
//delete mypLayer;
}
Modified: trunk/qgis/tests/src/core/testqgsrenderers.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrenderers.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/tests/src/core/testqgsrenderers.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -119,9 +119,9 @@
//
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
- myLayers << mpPointsLayer->getLayerID();
- myLayers << mpPolysLayer->getLayerID();
- myLayers << mpLinesLayer->getLayerID();
+ myLayers << mpPointsLayer->id();
+ myLayers << mpPolysLayer->id();
+ myLayers << mpLinesLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Vector Renderer Tests</h1>\n";
}
Modified: trunk/qgis/tests/src/core/testqgsvectorlayer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsvectorlayer.cpp 2011-02-18 15:03:34 UTC (rev 15196)
+++ trunk/qgis/tests/src/core/testqgsvectorlayer.cpp 2011-02-18 15:05:35 UTC (rev 15197)
@@ -119,9 +119,9 @@
//
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
- myLayers << mpPointsLayer->getLayerID();
- myLayers << mpPolysLayer->getLayerID();
- myLayers << mpLinesLayer->getLayerID();
+ myLayers << mpPointsLayer->id();
+ myLayers << mpPolysLayer->id();
+ myLayers << mpLinesLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Vector Renderer Tests</h1>\n";
}
More information about the QGIS-commit
mailing list