[QGIS Commit] r15168 - in trunk/qgis: python/core python/plugins/osm src/app src/app/legend src/core src/core/composer src/gui src/mapserver src/plugins/georeferencer src/plugins/grass src/plugins/grass/qtermwidget src/plugins/offline_editing src/plugins/raster_terrain_analysis src/plugins/roadgraph src/plugins/spatialquery src/providers/delimitedtext src/providers/memory

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Feb 13 15:24:55 EST 2011


Author: jef
Date: 2011-02-13 12:24:55 -0800 (Sun, 13 Feb 2011)
New Revision: 15168

Modified:
   trunk/qgis/python/core/qgsapplication.sip
   trunk/qgis/python/core/qgscomposermap.sip
   trunk/qgis/python/core/qgslabel.sip
   trunk/qgis/python/core/qgsmaplayer.sip
   trunk/qgis/python/core/qgsoverlayobject.sip
   trunk/qgis/python/core/qgsrenderer.sip
   trunk/qgis/python/core/qgssearchtreenode.sip
   trunk/qgis/python/core/qgsvectordataprovider.sip
   trunk/qgis/python/core/qgsvectorlayer.sip
   trunk/qgis/python/plugins/osm/OsmDatabaseManager.py
   trunk/qgis/python/plugins/osm/OsmLoadDlg.py
   trunk/qgis/src/app/legend/qgsapplegendinterface.cpp
   trunk/qgis/src/app/legend/qgslegend.cpp
   trunk/qgis/src/app/legend/qgslegendlayer.cpp
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgisappinterface.cpp
   trunk/qgis/src/app/qgsaddjoindialog.cpp
   trunk/qgis/src/app/qgsattributedialog.cpp
   trunk/qgis/src/app/qgsmaptoolidentify.cpp
   trunk/qgis/src/app/qgsprojectproperties.cpp
   trunk/qgis/src/app/qgsrasterlayerproperties.cpp
   trunk/qgis/src/app/qgssnappingdialog.cpp
   trunk/qgis/src/app/qgsvectorlayerproperties.cpp
   trunk/qgis/src/core/composer/qgscomposerattributetable.cpp
   trunk/qgis/src/core/composer/qgslegendmodel.cpp
   trunk/qgis/src/core/qgsapplication.h
   trunk/qgis/src/core/qgslabel.h
   trunk/qgis/src/core/qgsmaplayer.cpp
   trunk/qgis/src/core/qgsmaplayer.h
   trunk/qgis/src/core/qgsmaplayerregistry.cpp
   trunk/qgis/src/core/qgsmaprenderer.h
   trunk/qgis/src/core/qgsoverlayobject.h
   trunk/qgis/src/core/qgspallabeling.cpp
   trunk/qgis/src/core/qgspluginlayerregistry.cpp
   trunk/qgis/src/core/qgssearchtreenode.h
   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/qgisinterface.h
   trunk/qgis/src/gui/qgsformannotationitem.cpp
   trunk/qgis/src/gui/qgsmapcanvas.cpp
   trunk/qgis/src/mapserver/qgsconfigparser.cpp
   trunk/qgis/src/mapserver/qgsprojectparser.cpp
   trunk/qgis/src/mapserver/qgswmsserver.cpp
   trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
   trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
   trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
   trunk/qgis/src/plugins/offline_editing/offline_editing.cpp
   trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp
   trunk/qgis/src/plugins/roadgraph/exportdlg.cpp
   trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp
   trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
   trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
   trunk/qgis/src/providers/memory/qgsmemoryprovider.cpp
Log:
fix API QgsMapLayer::getLayerID() to id()), some warnings and use doxygen deprecation tag.


Modified: trunk/qgis/python/core/qgsapplication.sip
===================================================================
--- trunk/qgis/python/core/qgsapplication.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsapplication.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -159,7 +159,7 @@
     static const QStringList svgPaths();
 
     //! Returns the path to the applications svg paths
-    //! @note deprecated
+    //! @deprecated
     static const QString svgPath();
 
     //! Returns the path to the application prefix directory.

Modified: trunk/qgis/python/core/qgscomposermap.sip
===================================================================
--- trunk/qgis/python/core/qgscomposermap.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgscomposermap.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -47,7 +47,7 @@
       BoundaryDirection
     };
 
-    /**This function is deprecated*/
+    /**@deprecated*/
     void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi );
 
     /** \brief Draw to paint device

Modified: trunk/qgis/python/core/qgslabel.sip
===================================================================
--- trunk/qgis/python/core/qgslabel.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgslabel.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -49,7 +49,7 @@
 
 
     /** \brief render label
-        \note deprecated
+        \deprecated
       */
     void renderLabel ( QPainter* painter, QgsRectangle& viewExtent, 
                        QgsCoordinateTransform* coordinateTransform,
@@ -83,8 +83,7 @@
     QMap<int, QgsField> & fields ( );
 
     /** Pointer to default attributes.
-     * @note this will be deprecated in version 2 as it is 
-     * badly named. Rather use attributes.
+     * @deprecated in version 2 badly named. Rather use attributes.
      * @see labelAttributes method rather */
     QgsLabelAttributes *layerAttributes( );
 

Modified: trunk/qgis/python/core/qgsmaplayer.sip
===================================================================
--- trunk/qgis/python/core/qgsmaplayer.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsmaplayer.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -57,7 +57,14 @@
      */
     QgsMapLayer::LayerType type() const;
 
-    /** Get this layer's unique ID, this ID is used to access this layer from map layer registry */
+    /** Get this layer's unique ID, this ID is used to access this layer from map layer registry
+     * @note added in 1.7
+     */
+    QString id() const;
+
+    /** Get this layer's unique ID, this ID is used to access this layer from map layer registry
+     * @deprecated in 1.7
+     */
     QString getLayerID() const;
 
     /** Set the display name of the layer
@@ -215,7 +222,7 @@
 
     /** Returns layer's spatial reference system
     @note This method is here for API compatibility
-    and will be deprecited in 2.0
+    and will be deprecated in 2.0
     @see crs()
     */
     const QgsCoordinateReferenceSystem& srs();

Modified: trunk/qgis/python/core/qgsoverlayobject.sip
===================================================================
--- trunk/qgis/python/core/qgsoverlayobject.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsoverlayobject.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -14,9 +14,10 @@
     //this function fill not be wrapped to not depend on geos python bindings
     /**Returns the feature geometry in geos format. The calling function does _not_ take
      ownership of the generated object. The geometry is in map coordinates
-    @note: this function is deprecated. Please use geometry() and QgsGeometry::asGeos instead*/
+    @deprecated Please use geometry() and QgsGeometry::asGeos instead*/
     //GEOSGeometry* getGeosGeometry();
-    /**Feature geometry is released when object is destructed so this function is empty. This function is deprecated and does nothing*/
+    /**Feature geometry is released when object is destructed so this function is empty.
+    @deprecated nop */
     //void releaseGeosGeometry( GEOSGeometry *the_geom )
 
     //getters

Modified: trunk/qgis/python/core/qgsrenderer.sip
===================================================================
--- trunk/qgis/python/core/qgsrenderer.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsrenderer.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -40,7 +40,7 @@
      @param widthScale scale factor
      @param rasterScaleFactor scale factor for rasters
      
-     deprecated */
+     @deprecated */
     void renderFeature(QPainter* p, QgsFeature& f,QImage* pic, bool selected, double widthScale = 1.0, double rasterScaleFactor = 1.0);
      
     /**A vector layer passes features to a renderer object to change the brush ans pen of the qpainter

Modified: trunk/qgis/python/core/qgssearchtreenode.sip
===================================================================
--- trunk/qgis/python/core/qgssearchtreenode.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgssearchtreenode.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -104,7 +104,7 @@
     //! @note attributes and optional geom parameter replace with feature in 1.6
     bool checkAgainst( const QMap<int,QgsField>& fields, QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     bool checkAgainst( const QMap<int,QgsField>& fields, const QMap<int, QVariant>& attributes, QgsGeometry* geom = 0 );
 
     //! checks if there were errors during evaluation
@@ -119,7 +119,7 @@
     bool getValue( QgsSearchTreeValue& value /Out/, QgsSearchTreeNode* node,
                    const QMap<int,QgsField>& fields, QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     bool getValue( QgsSearchTreeValue& value /Out/, QgsSearchTreeNode* node,
                    const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 );
 
@@ -149,7 +149,7 @@
     //! @note attribute/geom replaced by feature in 1.6
     QgsSearchTreeValue valueAgainst( const QMap<int,QgsField>& fields, QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     QgsSearchTreeValue valueAgainst( const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 );
 
     //! strips mText when node is of string type

Modified: trunk/qgis/python/core/qgsvectordataprovider.sip
===================================================================
--- trunk/qgis/python/core/qgsvectordataprovider.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsvectordataprovider.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -196,7 +196,7 @@
        * Adds new attributes
        * @param attributes map with attribute name as key and type as value
        * @return true in case of success and false in case of failure
-       * @note deprecated
+       * @deprecated
        */
       virtual bool addAttributes(const QMap<QString, QString> &attributes);
 
@@ -283,7 +283,7 @@
       const QList< QgsVectorDataProvider::NativeType > &nativeTypes() const;
 
       /**Returns the names of the numerical types
-         @note deprecated */
+         @deprecated */
       const QMap<QString,QVariant::Type> &supportedNativeTypes() const; 
 
       /**

Modified: trunk/qgis/python/core/qgsvectorlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsvectorlayer.sip	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/core/qgsvectorlayer.sip	2011-02-13 20:24:55 UTC (rev 15168)
@@ -390,7 +390,7 @@
 
   /** add an attribute field (but does not commit it) 
       returns true in case of success
-      @note deprecated
+      @deprecated
       */
   bool addAttribute( QString name, QString type );
 

Modified: trunk/qgis/python/plugins/osm/OsmDatabaseManager.py
===================================================================
--- trunk/qgis/python/plugins/osm/OsmDatabaseManager.py	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/plugins/osm/OsmDatabaseManager.py	2011-02-13 20:24:55 UTC (rev 15168)
@@ -143,21 +143,21 @@
         key=dbFileName.toLatin1().data()
 
         # remove map layers that belong to dbFileName database
-        if key in self.lineLayers.keys() and layer.getLayerID()==self.lineLayers[key].getLayerID():
+        if key in self.lineLayers.keys() and layer.id()==self.lineLayers[key].getLayerID():
             del self.lineLayers[key]
 
-        elif key in self.pointLayers.keys() and layer.getLayerID()==self.pointLayers[key].getLayerID():
+        elif key in self.pointLayers.keys() and layer.id()==self.pointLayers[key].id():
             del self.pointLayers[key]
             if key in self.lineLayers.keys():
                 if self.lineLayers[key]:
-                    lineLayID=self.lineLayers[key].getLayerID()
+                    lineLayID=self.lineLayers[key].id()
                     self.mapReg.removeMapLayer(lineLayID,True)
 
-        elif key in self.polygonLayers.keys() and layer.getLayerID()==self.polygonLayers[key].getLayerID():
+        elif key in self.polygonLayers.keys() and layer.id()==self.polygonLayers[key].id():
             del self.polygonLayers[key]
             if key in self.pointLayers.keys():
                 if self.pointLayers[key]:
-                    pointLayID=self.pointLayers[key].getLayerID()
+                    pointLayID=self.pointLayers[key].id()
                     self.mapReg.removeMapLayer(pointLayID,True)
 
         if key in self.dbConns.keys():
@@ -177,7 +177,7 @@
                 continue
 
             if layer.type()==QgsMapLayer.VectorLayer and layer.dataProvider().name()=="osm":
-                QgsMapLayerRegistry.instance().removeMapLayer(layer.getLayerID(),True)
+                QgsMapLayerRegistry.instance().removeMapLayer(layer.id(),True)
 
         self.dbConns={}    # map dbFileName->sqlite3ConnectionObject
         self.pointLayers={}

Modified: trunk/qgis/python/plugins/osm/OsmLoadDlg.py
===================================================================
--- trunk/qgis/python/plugins/osm/OsmLoadDlg.py	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/python/plugins/osm/OsmLoadDlg.py	2011-02-13 20:24:55 UTC (rev 15168)
@@ -131,7 +131,7 @@
 
         if replacing: 
             # remove layers of current data first 
-            QgsMapLayerRegistry.instance().removeMapLayer(self.canvas.currentLayer().getLayerID(),True)
+            QgsMapLayerRegistry.instance().removeMapLayer(self.canvas.currentLayer().id(),True)
 
         if self.chkCustomRenderer.isChecked():
             styleFile=self.styleFiles[self.styleCombo.currentIndex()]

Modified: trunk/qgis/src/app/legend/qgsapplegendinterface.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgsapplegendinterface.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/legend/qgsapplegendinterface.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -134,5 +134,5 @@
 
 void QgsAppLegendInterface::refreshLayerSymbology( QgsMapLayer *ml )
 {
-  mLegend->refreshLayerSymbology( ml->getLayerID() );
+  mLegend->refreshLayerSymbology( ml->id() );
 }

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -230,7 +230,7 @@
       // save legend layer (parent of a legend layer file we're going to delete)
       QgsLegendLayer* ll = qobject_cast<QgsLegendLayer *>( li );
 
-      if ( ll && ll->layer() && ll->layer()->getLayerID() == layerId )
+      if ( ll && ll->layer() && ll->layer()->id() == layerId )
       {
         removeItem( ll );
         delete ll;

Modified: trunk/qgis/src/app/legend/qgslegendlayer.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/legend/qgslegendlayer.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -540,7 +540,7 @@
   {
     widthScale = canvas->map()->paintDevice().logicalDpiX() / 25.4;
   }
-  refreshSymbology( mLyr.layer()->getLayerID(), widthScale );
+  refreshSymbology( mLyr.layer()->id(), widthScale );
 }
 
 void QgsLegendLayer::updateItemListCountV2( SymbologyList& itemList, QgsVectorLayer* layer )

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgisapp.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -4920,7 +4920,7 @@
       mMapCanvas->refresh();
       if ( mMapLegend )
       {
-        mMapLegend->refreshLayerSymbology( vlayer->getLayerID(), false );
+        mMapLegend->refreshLayerSymbology( vlayer->id(), false );
       }
     }
   }

Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgisappinterface.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -220,7 +220,7 @@
 {
   if ( l && qgis && qgis->legend() )
   {
-    qgis->legend()->refreshLayerSymbology( l->getLayerID() );
+    qgis->legend()->refreshLayerSymbology( l->id() );
   }
 }
 

Modified: trunk/qgis/src/app/qgsaddjoindialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsaddjoindialog.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsaddjoindialog.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -44,7 +44,7 @@
       if ( currentVectorLayer && currentVectorLayer != mLayer )
       {
         if ( currentVectorLayer->dataProvider() && currentVectorLayer->dataProvider()->supportsSubsetString() )
-          mJoinLayerComboBox->addItem( currentLayer->name(), QVariant( currentLayer->getLayerID() ) );
+          mJoinLayerComboBox->addItem( currentLayer->name(), QVariant( currentLayer->id() ) );
       }
     }
   }

Modified: trunk/qgis/src/app/qgsattributedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributedialog.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsattributedialog.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -288,7 +288,7 @@
     mFormNr = smFormCounter++;
     QgisApp::instance()->runPythonString( QString( "_qgis_featureform_%1 = wrapinstance( %2, QtGui.QDialog )" ).arg( mFormNr ).arg(( unsigned long ) mDialog ) );
 
-    QString expr = QString( "%1(_qgis_featureform_%2,'%3',%4)" ).arg( vl->editFormInit() ).arg( mFormNr ).arg( vl->getLayerID() ).arg( mFeature->id() );
+    QString expr = QString( "%1(_qgis_featureform_%2,'%3',%4)" ).arg( vl->editFormInit() ).arg( mFormNr ).arg( vl->id() ).arg( mFeature->id() );
     QgsDebugMsg( QString( "running featureForm init: %1" ).arg( expr ) );
     QgisApp::instance()->runPythonString( expr );
   }

Modified: trunk/qgis/src/app/qgsmaptoolidentify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsmaptoolidentify.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -120,7 +120,7 @@
       emit identifyProgress( i, mCanvas->layerCount() );
       emit identifyMessage( tr( "Identifying on %1..." ).arg( layer->name() ) );
 
-      if ( noIdentifyLayerIdList.contains( layer->getLayerID() ) )
+      if ( noIdentifyLayerIdList.contains( layer->id() ) )
         continue;
 
       if ( identifyLayer( layer, e->x(), e->y() ) )

Modified: trunk/qgis/src/app/qgsprojectproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsprojectproperties.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsprojectproperties.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -159,7 +159,7 @@
     twIdentifyLayers->setItem( i, 1, twi );
 
     QCheckBox *cb = new QCheckBox();
-    cb->setChecked( !noIdentifyLayerIdList.contains( currentLayer->getLayerID() ) );
+    cb->setChecked( !noIdentifyLayerIdList.contains( currentLayer->id() ) );
     twIdentifyLayers->setCellWidget( i, 2, cb );
   }
 

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -1393,7 +1393,7 @@
   pixmapThumbnail->setPixmap( myQPixmap );
 
   // update symbology
-  emit refreshLegend( mRasterLayer->getLayerID(), false );
+  emit refreshLegend( mRasterLayer->id(), false );
 
   //no need to delete the old one, maplayer will do it if needed
   mRasterLayer->setCacheImage( 0 );

Modified: trunk/qgis/src/app/qgssnappingdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgssnappingdialog.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgssnappingdialog.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -157,7 +157,7 @@
 
     QCheckBox *cbxEnable = new QCheckBox( mLayerTreeWidget );
     mLayerTreeWidget->setItemWidget( item, 0, cbxEnable );
-    item->setData( 0, Qt::UserRole, currentVectorLayer->getLayerID() );
+    item->setData( 0, Qt::UserRole, currentVectorLayer->id() );
 
     item->setText( 1, currentVectorLayer->name() );
 

Modified: trunk/qgis/src/app/qgsvectorlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsvectorlayerproperties.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/app/qgsvectorlayerproperties.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -683,7 +683,7 @@
   }
 
   // update symbology
-  emit refreshLegend( layer->getLayerID(), false );
+  emit refreshLegend( layer->id(), false );
 
   //no need to delete the old one, maplayer will do it if needed
   layer->setCacheImage( 0 );

Modified: trunk/qgis/src/core/composer/qgscomposerattributetable.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposerattributetable.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/composer/qgscomposerattributetable.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -193,7 +193,7 @@
 {
   if ( mVectorLayer )
   {
-    if ( layerId == mVectorLayer->getLayerID() )
+    if ( layerId == mVectorLayer->id() )
     {
       mVectorLayer = 0;
     }

Modified: trunk/qgis/src/core/composer/qgslegendmodel.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgslegendmodel.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/composer/qgslegendmodel.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -210,7 +210,7 @@
       continue;
     }
 
-    QStandardItem* currentSymbolItem = itemFromSymbol( *symbolIt, opacity, vlayer->getLayerID() );
+    QStandardItem* currentSymbolItem = itemFromSymbol( *symbolIt, opacity, vlayer->id() );
     if ( !currentSymbolItem )
     {
       continue;

Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsapplication.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -110,7 +110,7 @@
     static const QStringList svgPaths();
 
     //! Returns the paths to svg applications svg directory.
-    //! @note deprecated since 1.4
+    //! @deprecated since 1.4
     static const QString svgPath();
 
     //! Returns the path to the application prefix directory.

Modified: trunk/qgis/src/core/qgslabel.h
===================================================================
--- trunk/qgis/src/core/qgslabel.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgslabel.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -146,8 +146,7 @@
     QgsFieldMap & fields( void );
 
     /** Pointer to default attributes.
-     * @note this will be deprecated in version 2 as it is
-     * badly named. Rather use attributes.
+     * @deprecated in version 2 as it is badly named. Rather use attributes.
      * @see labelAttributes method rather */
     QgsLabelAttributes *layerAttributes( void );
 

Modified: trunk/qgis/src/core/qgsmaplayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsmaplayer.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -95,7 +95,7 @@
 }
 
 /** Get this layer's unique ID */
-QString QgsMapLayer::getLayerID() const
+QString QgsMapLayer::id() const
 {
   return mID;
 }
@@ -282,11 +282,11 @@
   maplayer.setAttribute( "maximumScale", maximumScale() );
 
   // ID
-  QDomElement id = document.createElement( "id" );
-  QDomText idText = document.createTextNode( getLayerID() );
-  id.appendChild( idText );
+  QDomElement layerId = document.createElement( "id" );
+  QDomText layerIdText = document.createTextNode( id() );
+  layerId.appendChild( layerIdText );
 
-  maplayer.appendChild( id );
+  maplayer.appendChild( layerId );
 
   // data source
   QDomElement dataSource = document.createElement( "datasource" );

Modified: trunk/qgis/src/core/qgsmaplayer.h
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsmaplayer.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -67,9 +67,16 @@
      */
     QgsMapLayer::LayerType type() const;
 
-    /** Get this layer's unique ID, this ID is used to access this layer from map layer registry */
-    QString getLayerID() const;
+    /** Get this layer's unique ID, this ID is used to access this layer from map layer registry
+     * @note added in 1.7
+     **/
+    QString id() const;
 
+    /** 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(); }
+
     /** Set the display name of the layer
      * @param name New name for the layer
      */

Modified: trunk/qgis/src/core/qgsmaplayerregistry.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaplayerregistry.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsmaplayerregistry.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -72,16 +72,16 @@
   }
 
   //check the layer is not already registered!
-  QMap<QString, QgsMapLayer*>::iterator myIterator = mMapLayers.find( theMapLayer->getLayerID() );
+  QMap<QString, QgsMapLayer*>::iterator myIterator = mMapLayers.find( theMapLayer->id() );
   //if myIterator returns mMapLayers.end() then it does not exist in registry and its safe to add it
   if ( myIterator == mMapLayers.end() )
   {
-    mMapLayers[theMapLayer->getLayerID()] = theMapLayer;
+    mMapLayers[theMapLayer->id()] = theMapLayer;
 
     if ( theEmitSignal )
       emit layerWasAdded( theMapLayer );
 
-    return mMapLayers[theMapLayer->getLayerID()];
+    return mMapLayers[theMapLayer->id()];
   }
   else
   {

Modified: trunk/qgis/src/core/qgsmaprenderer.h
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsmaprenderer.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -134,7 +134,7 @@
     void updateScale();
 
     //! Return the measuring object
-    //! @note deprecated.
+    //! @deprecated
     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-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsoverlayobject.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -42,9 +42,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
-    @note: this function is deprecated. Please use geometry() and QgsGeometry::asGeos instead*/
+     @deprecated Please use geometry() and QgsGeometry::asGeos instead*/
     GEOSGeometry* getGeosGeometry();
-    /**Feature geometry is released when object is destructed so this function is empty. This function is deprecated and does nothing*/
+    /**Feature geometry is released when object is destructed so this function is empty.
+     * @deprecated nop
+     */
     void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
 
     //getters

Modified: trunk/qgis/src/core/qgspallabeling.cpp
===================================================================
--- trunk/qgis/src/core/qgspallabeling.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgspallabeling.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -696,7 +696,7 @@
     max_scale = lyr.scaleMax;
   }
 
-  Layer* l = mPal->addLayer( layer->getLayerID().toLocal8Bit().data(),
+  Layer* l = mPal->addLayer( layer->id().toLocal8Bit().data(),
                              min_scale, max_scale, arrangement,
                              METER, priority, lyr.obstacle, true, true );
 
@@ -781,7 +781,7 @@
   QHash<QgsVectorLayer*, QgsPalLayerSettings>::iterator lit;
   for ( lit = mActiveLayers.begin(); lit != mActiveLayers.end(); ++lit )
   {
-    if ( lit.key() && lit.key()->getLayerID() == layerName )
+    if ( lit.key() && lit.key()->id() == layerName )
     {
       return lit.value();
     }

Modified: trunk/qgis/src/core/qgspluginlayerregistry.cpp
===================================================================
--- trunk/qgis/src/core/qgspluginlayerregistry.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgspluginlayerregistry.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -100,7 +100,7 @@
       QgsPluginLayer* pl = qobject_cast<QgsPluginLayer*>( layer );
       if ( pl->pluginLayerType() == typeName )
       {
-        QgsMapLayerRegistry::instance()->removeMapLayer( layer->getLayerID() );
+        QgsMapLayerRegistry::instance()->removeMapLayer( layer->id() );
       }
     }
   }

Modified: trunk/qgis/src/core/qgssearchtreenode.h
===================================================================
--- trunk/qgis/src/core/qgssearchtreenode.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgssearchtreenode.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -154,7 +154,7 @@
     //! @note attribute and optional geom parameter replaced with feature in 1.6
     bool checkAgainst( const QgsFieldMap& fields, QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     bool checkAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
 
     //! checks if there were errors during evaluation
@@ -170,7 +170,7 @@
                    const QgsFieldMap& fields,
                    QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     bool getValue( QgsSearchTreeValue& value,
                    QgsSearchTreeNode* node,
                    const QgsFieldMap &fields,
@@ -210,7 +210,7 @@
     //! returns scalar value of node
     QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, QgsFeature &f );
 
-    //! @note deprecated
+    //! @deprecated
     QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
 
     //! strips mText when node is of string type

Modified: trunk/qgis/src/core/qgsvectordataprovider.h
===================================================================
--- trunk/qgis/src/core/qgsvectordataprovider.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsvectordataprovider.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -235,7 +235,7 @@
      * Add new attributes
      * @param attributes map of attributes name as key and type as value
      * @return true in case of success and false in case of failure
-     * @note deprecated
+     * @deprecated
      */
     virtual bool addAttributes( const QMap<QString, QString> &attributes );
 
@@ -345,7 +345,7 @@
 
     /**
      * Returns the names of the supported types
-     * @note deprecated
+     * @deprecated
      */
     const QMap<QString, QVariant::Type> &supportedNativeTypes() const;
 

Modified: trunk/qgis/src/core/qgsvectorfilewriter.h
===================================================================
--- trunk/qgis/src/core/qgsvectorfilewriter.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsvectorfilewriter.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -57,7 +57,7 @@
     };
 
     /** Write contents of vector layer to a shapefile
-        @note: deprecated. Use writeAsVectorFormat instead*/
+        @deprecated Use writeAsVectorFormat instead*/
     static WriterError writeAsShapefile( QgsVectorLayer* layer,
                                          const QString& shapefileName,
                                          const QString& fileEncoding,

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -3396,7 +3396,7 @@
     {
       mCommitErrors << tr( "SUCCESS: %n attribute(s) deleted.", "deleted attributes count", mDeletedAttributeIds.size() );
 
-      emit committedAttributesDeleted( getLayerID(), mDeletedAttributeIds );
+      emit committedAttributesDeleted( id(), mDeletedAttributeIds );
 
       mDeletedAttributeIds.clear();
       attributesChanged = true;
@@ -3424,7 +3424,7 @@
     {
       mCommitErrors << tr( "SUCCESS: %n attribute(s) added.", "added attributes count", mAddedAttributeIds.size() );
 
-      emit committedAttributesAdded( getLayerID(), addedAttributes );
+      emit committedAttributesAdded( id(), addedAttributes );
 
       mAddedAttributeIds.clear();
       attributesChanged = true;
@@ -3543,7 +3543,7 @@
       {
         mCommitErrors << tr( "SUCCESS: %n attribute value(s) changed.", "changed attribute values count", mChangedAttributeValues.size() );
 
-        emit committedAttributeValuesChanges( getLayerID(), mChangedAttributeValues );
+        emit committedAttributeValuesChanges( id(), mChangedAttributeValues );
 
         mChangedAttributeValues.clear();
       }
@@ -3584,7 +3584,7 @@
       {
         mCommitErrors << tr( "SUCCESS: %n feature(s) added.", "added features count", mAddedFeatures.size() );
 
-        emit committedFeaturesAdded( getLayerID(), mAddedFeatures );
+        emit committedFeaturesAdded( id(), mAddedFeatures );
 
         mAddedFeatures.clear();
       }
@@ -3605,7 +3605,7 @@
     {
       mCommitErrors << tr( "SUCCESS: %n geometries were changed.", "changed geometries count", mChangedGeometries.size() );
 
-      emit committedGeometriesChanges( getLayerID(), mChangedGeometries );
+      emit committedGeometriesChanges( id(), mChangedGeometries );
 
       mChangedGeometries.clear();
     }
@@ -3630,7 +3630,7 @@
         mChangedGeometries.remove( *it );
       }
 
-      emit committedFeaturesRemoved( getLayerID(), mDeletedFeatureIds );
+      emit committedFeaturesRemoved( id(), mDeletedFeatureIds );
 
       mDeletedFeatureIds.clear();
     }

Modified: trunk/qgis/src/core/qgsvectorlayer.h
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/core/qgsvectorlayer.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -489,7 +489,7 @@
 
     /** add an attribute field (but does not commit it)
       returns true if the field was added
-      @note deprecated */
+      @deprecated */
     bool addAttribute( QString name, QString type );
 
     /**Sets an alias (a display name) for attributes to display in dialogs

Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/gui/qgisinterface.h	2011-02-13 20:24:55 UTC (rev 15168)
@@ -145,7 +145,7 @@
     virtual void removeDockWidget( QDockWidget * dockwidget ) = 0;
 
     /** refresh the legend of a layer
-     \note deprecated - use QgsLegendInterface::refreshLayerSymbology
+     \deprecated use QgsLegendInterface::refreshLayerSymbology
      */
     virtual void refreshLegend( QgsMapLayer *l ) = 0;
 

Modified: trunk/qgis/src/gui/qgsformannotationitem.cpp
===================================================================
--- trunk/qgis/src/gui/qgsformannotationitem.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/gui/qgsformannotationitem.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -177,7 +177,7 @@
   QDomElement formAnnotationElem = doc.createElement( "FormAnnotationItem" );
   if ( mVectorLayer )
   {
-    formAnnotationElem.setAttribute( "vectorLayer", mVectorLayer->getLayerID() );
+    formAnnotationElem.setAttribute( "vectorLayer", mVectorLayer->id() );
   }
   formAnnotationElem.setAttribute( "hasFeature", mHasAssociatedFeature );
   formAnnotationElem.setAttribute( "feature", mFeature );

Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -243,11 +243,11 @@
 
     if ( lyr.isVisible() )
     {
-      layerSet.push_back( lyr.layer()->getLayerID() );
+      layerSet.push_back( lyr.layer()->id() );
     }
     if ( lyr.isInOverview() )
     {
-      layerSetOverview.push_back( lyr.layer()->getLayerID() );
+      layerSetOverview.push_back( lyr.layer()->id() );
     }
   }
 
@@ -937,7 +937,7 @@
 
 void QgsMapCanvas::paintEvent( QPaintEvent *e )
 {
-  if( mNewSize.isValid() )
+  if ( mNewSize.isValid() )
   {
     static bool isAlreadyIn = false;
     static QSize lastSize = QSize();
@@ -980,7 +980,7 @@
 
       emit extentsChanged();
     }
-  isAlreadyIn = false;
+    isAlreadyIn = false;
   }
 
   QGraphicsView::paintEvent( e );

Modified: trunk/qgis/src/mapserver/qgsconfigparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgsconfigparser.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/mapserver/qgsconfigparser.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -392,7 +392,7 @@
         {
           if ( *mapIdIt )
           {
-            layerSet.push_back(( *mapIdIt )->getLayerID() );
+            layerSet.push_back(( *mapIdIt )->id() );
           }
         }
       }

Modified: trunk/qgis/src/mapserver/qgsprojectparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgsprojectparser.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/mapserver/qgsprojectparser.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -64,7 +64,7 @@
     QgsMapLayer *layer = createLayerFromElement( *layerIt );
     if ( layer )
     {
-      QgsMSDebugMsg( QString( "add layer %1 to map" ).arg( layer->getLayerID() ) );
+      QgsMSDebugMsg( QString( "add layer %1 to map" ).arg( layer->id() ) );
       layerMap.insert( layer->getLayerID(), layer );
     }
 #if QGSMSDEBUG

Modified: trunk/qgis/src/mapserver/qgswmsserver.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgswmsserver.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/mapserver/qgswmsserver.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -612,7 +612,7 @@
     //create maplayer from sld parser
     layerList = mConfigParser->mapLayerFromStyle( *layerIt, "" );
     currentLayer = layerList.at( 0 );
-    if ( !currentLayer || nonIdentifiableLayers.contains( currentLayer->getLayerID() ) )
+    if ( !currentLayer || nonIdentifiableLayers.contains( currentLayer->id() ) )
     {
       continue;
     }

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -147,7 +147,7 @@
   // delete layer (and don't signal it as it's our private layer)
   if ( mLayer )
   {
-    QgsMapLayerRegistry::instance()->removeMapLayer( mLayer->getLayerID(), false );
+    QgsMapLayerRegistry::instance()->removeMapLayer( mLayer->id(), false );
   }
 
   delete mToolZoomIn;

Modified: trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -466,7 +466,7 @@
 
 void QgsGrassPlugin::closeEdit( QString layerId )
 {
-  if ( mEdit->layer()->getLayerID() == layerId )
+  if ( mEdit->layer()->id() == layerId )
   {
     mEdit->closeEdit();
   }

Modified: trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -2423,6 +2423,8 @@
     case Qt::ImCurrentSelection:
       return QString();
       break;
+    default:
+      break;
   }
 
   return QVariant();

Modified: trunk/qgis/src/plugins/offline_editing/offline_editing.cpp
===================================================================
--- trunk/qgis/src/plugins/offline_editing/offline_editing.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/offline_editing/offline_editing.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -189,7 +189,7 @@
       QgsMapLayerRegistry::instance()->addMapLayer( remoteLayer, true );
 
       // apply layer edit log
-      QString qgisLayerId = layer->getLayerID();
+      QString qgisLayerId = layer->id();
       QString sql = QString( "SELECT \"id\" FROM 'log_layer_ids' WHERE \"qgis_id\" = '%1'" ).arg( qgisLayerId );
       int layerId = sqlQueryInt( db, sql, -1 );
       if ( layerId != -1 )

Modified: trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -43,7 +43,7 @@
     QgsRasterLayer* rl = qobject_cast<QgsRasterLayer *>( layer_it.value() );
     if ( rl )
     {
-      mInputLayerComboBox->addItem( rl->name(), QVariant( rl->getLayerID() ) );
+      mInputLayerComboBox->addItem( rl->name(), QVariant( rl->id() ) );
     }
   }
 

Modified: trunk/qgis/src/plugins/roadgraph/exportdlg.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/exportdlg.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/roadgraph/exportdlg.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -59,7 +59,7 @@
       continue;
     if ( vl->geometryType() != QGis::Line )
       continue;
-    mcbLayers->insertItem( 0, vl->name(), QVariant( vl->getLayerID() ) );
+    mcbLayers->insertItem( 0, vl->name(), QVariant( vl->id() ) );
   }
 
 } // RgSettingsDlg::RgSettingsDlg()

Modified: trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -26,7 +26,8 @@
 //standard includes
 
 RgSettingsDlg::RgSettingsDlg( RgSettings *settings, QWidget* parent, Qt::WFlags fl )
-    : mSettings( settings ), QDialog( parent, fl )
+    : QDialog( parent, fl )
+    , mSettings( settings )
 {
   // create base widgets;
   setWindowTitle( tr( "Road graph plugin settings" ) );

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -495,7 +495,7 @@
     }
 
     addLayerCombobox( true, vectorLayer );
-    mMapIdVectorLayers.insert( vectorLayer->getLayerID(), vectorLayer );
+    mMapIdVectorLayers.insert( vectorLayer->id(), vectorLayer );
   }
   targetLayerComboBox->setCurrentIndex( 0 );
   targetLayerComboBox->blockSignals( false );

Modified: trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
===================================================================
--- trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -132,41 +132,41 @@
 
 QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
     : QgsVectorDataProvider( uri )
+    , mDelimiter( "," )
+    , mDelimiterRegexp()
+    , mDelimiterType( "plain" )
     , mHasWktField( false )
     , mFieldCount( 0 )
-    , mXFieldIndex( -1 ) 
+    , mXFieldIndex( -1 )
     , mYFieldIndex( -1 )
     , mWktFieldIndex( -1 )
-    , mDelimiterType( "plain" )
-    , mDelimiter( "," )
-    , mDelimiterRegexp()
     , mWktHasZM( false )
     , mWktZMRegexp( "\\s+(?:z|m|zm)(?=\\s*\\()", Qt::CaseInsensitive )
     , mWktCrdRegexp( "(\\-?\\d+(?:\\.\\d*)?\\s+\\-?\\d+(?:\\.\\d*)?)\\s[\\s\\d\\.\\-]+" )
-    , mSkipLines(0)
+    , mSkipLines( 0 )
     , mFirstDataLine( 0 )
     , mShowInvalidLines( true )
+    , mCrs()
     , mWkbType( QGis::WKBNoGeometry )
-    , mCrs()
 {
 
-  QUrl url = QUrl::fromEncoded(uri.toUtf8());
+  QUrl url = QUrl::fromEncoded( uri.toUtf8() );
 
   // Extract the provider definition from the url
 
   mFileName = url.path();
 
-  QString wktField("");
-  QString xField("");
-  QString yField("");
+  QString wktField( "" );
+  QString xField( "" );
+  QString yField( "" );
 
-  if( url.hasQueryItem("delimiter")) mDelimiter = url.queryItemValue("delimiter");
-  if( url.hasQueryItem("delimiterType")) mDelimiterType = url.queryItemValue("delimiterType");
-  if( url.hasQueryItem("wktField")) wktField = url.queryItemValue("wktField");
-  if( url.hasQueryItem("xField")) xField = url.queryItemValue("xField");
-  if( url.hasQueryItem("yField")) yField = url.queryItemValue("yField");
-  if( url.hasQueryItem("skipLines")) mSkipLines = url.queryItemValue("skipLines").toInt();
-  if( url.hasQueryItem("crs")) mCrs.createFromString( url.queryItemValue("crs"));
+  if ( url.hasQueryItem( "delimiter" ) ) mDelimiter = url.queryItemValue( "delimiter" );
+  if ( url.hasQueryItem( "delimiterType" ) ) mDelimiterType = url.queryItemValue( "delimiterType" );
+  if ( url.hasQueryItem( "wktField" ) ) wktField = url.queryItemValue( "wktField" );
+  if ( url.hasQueryItem( "xField" ) ) xField = url.queryItemValue( "xField" );
+  if ( url.hasQueryItem( "yField" ) ) yField = url.queryItemValue( "yField" );
+  if ( url.hasQueryItem( "skipLines" ) ) mSkipLines = url.queryItemValue( "skipLines" ).toInt();
+  if ( url.hasQueryItem( "crs" ) ) mCrs.createFromString( url.queryItemValue( "crs" ) );
 
   mHasWktField = wktField != "";
 

Modified: trunk/qgis/src/providers/memory/qgsmemoryprovider.cpp
===================================================================
--- trunk/qgis/src/providers/memory/qgsmemoryprovider.cpp	2011-02-13 20:02:34 UTC (rev 15167)
+++ trunk/qgis/src/providers/memory/qgsmemoryprovider.cpp	2011-02-13 20:24:55 UTC (rev 15168)
@@ -34,17 +34,17 @@
     mSelectRectGeom( NULL ),
     mSpatialIndex( NULL )
 {
-  // Initiallize the geometry with the uri to support old style uri's 
+  // Initialize the geometry with the uri to support old style uri's
   // (ie, just 'point', 'line', 'polygon')
-  QUrl url = QUrl::fromEncoded(uri.toUtf8());
+  QUrl url = QUrl::fromEncoded( uri.toUtf8() );
   QString geometry;
-  if( url.hasQueryItem("geometry")) 
+  if ( url.hasQueryItem( "geometry" ) )
   {
-      geometry = url.queryItemValue("geometry");
+    geometry = url.queryItemValue( "geometry" );
   }
   else
   {
-      geometry = url.path();
+    geometry = url.path();
   }
 
   geometry = geometry.toLower();
@@ -63,10 +63,10 @@
   else
     mWkbType = QGis::WKBUnknown;
 
-  if( url.hasQueryItem("crs"))
+  if ( url.hasQueryItem( "crs" ) )
   {
-      QString crsDef = url.queryItemValue("crs");
-      mCrs.createFromString(crsDef);
+    QString crsDef = url.queryItemValue( "crs" );
+    mCrs.createFromString( crsDef );
   }
 
   mNextFeatureId = 1;
@@ -77,60 +77,60 @@
   << QgsVectorDataProvider::NativeType( tr( "Text (string)" ), "string", QVariant::String, 1, 255 )
   ;
 
-  if( url.hasQueryItem("field"))
+  if ( url.hasQueryItem( "field" ) )
   {
     QList<QgsField> attributes;
-    QRegExp reFieldDef("\\:" 
-                       "(int|integer|real|double|string)" // type
-                       "(?:\\((\\d+)"                // length
-                       "(?:\\,(\\d+))?"                // precision
-                       "\\))?"
-                       "$", Qt::CaseInsensitive);
-    QStringList fields = url.allQueryItemValues("field");
-    for( int i = 0; i < fields.size(); i++ )
+    QRegExp reFieldDef( "\\:"
+                        "(int|integer|real|double|string)" // type
+                        "(?:\\((\\d+)"                // length
+                        "(?:\\,(\\d+))?"                // precision
+                        "\\))?"
+                        "$", Qt::CaseInsensitive );
+    QStringList fields = url.allQueryItemValues( "field" );
+    for ( int i = 0; i < fields.size(); i++ )
     {
-        QString name = fields.at(i);
-        QVariant::Type type = QVariant::String;
-        QString typeName("string");
-        int length = 255;
-        int precision = 0;
-        
-        int pos = reFieldDef.indexIn(name);
-        if( pos >= 0 )
+      QString name = fields.at( i );
+      QVariant::Type type = QVariant::String;
+      QString typeName( "string" );
+      int length = 255;
+      int precision = 0;
+
+      int pos = reFieldDef.indexIn( name );
+      if ( pos >= 0 )
+      {
+        name = name.mid( 0, pos );
+        typeName = reFieldDef.cap( 1 ).toLower();
+        if ( typeName == "int" || typeName == "integer" )
         {
-            name = name.mid(0,pos);
-            typeName = reFieldDef.cap(1).toLower();
-            if( typeName == "int" || typeName == "integer" )
-            {
-                type = QVariant::Int;
-                typeName = "integer";
-                length = 10;
-            }
-            else if( typeName == "real" || typeName == "double" )
-            {
-                type = QVariant::Double;
-                typeName = "double";
-                length=20;
-                precision = 5;
-            }
+          type = QVariant::Int;
+          typeName = "integer";
+          length = 10;
+        }
+        else if ( typeName == "real" || typeName == "double" )
+        {
+          type = QVariant::Double;
+          typeName = "double";
+          length = 20;
+          precision = 5;
+        }
 
-            if( reFieldDef.cap(2) != "" )
-            {
-                length = reFieldDef.cap(2).toInt();
-            }
-            if( reFieldDef.cap(3) != "" )
-            {
-                precision = reFieldDef.cap(3).toInt();
-            }
+        if ( reFieldDef.cap( 2 ) != "" )
+        {
+          length = reFieldDef.cap( 2 ).toInt();
         }
-       if( name != "" ) attributes.append(QgsField(name,type,typeName,length,precision));
+        if ( reFieldDef.cap( 3 ) != "" )
+        {
+          precision = reFieldDef.cap( 3 ).toInt();
+        }
+      }
+      if ( name != "" ) attributes.append( QgsField( name, type, typeName, length, precision ) );
     }
-    addAttributes(attributes);
+    addAttributes( attributes );
   }
 
-  if( url.hasQueryItem("index") && url.queryItemValue("index") == "yes" )
+  if ( url.hasQueryItem( "index" ) && url.queryItemValue( "index" ) == "yes" )
   {
-      createSpatialIndex();
+    createSpatialIndex();
   }
 
 }
@@ -143,65 +143,68 @@
 
 QString QgsMemoryProvider::dataSourceUri() const
 {
-    QUrl uri("memory");
-    QString geometry("");
-    switch(mWkbType)
-    {
+  QUrl uri( "memory" );
+  QString geometry;
+  switch ( mWkbType )
+  {
     case QGis::WKBPoint :
-        geometry="Point";
-        break;
+      geometry = "Point";
+      break;
     case QGis::WKBLineString :
-        geometry="LineString";
-        break;
+      geometry = "LineString";
+      break;
     case QGis::WKBPolygon :
-        geometry="Polygon";
-        break;
+      geometry = "Polygon";
+      break;
     case QGis::WKBMultiPoint :
-        geometry="MultiPoint";
-        break;
+      geometry = "MultiPoint";
+      break;
     case QGis::WKBMultiLineString :
-        geometry="MultiLineString";
-        break;
+      geometry = "MultiLineString";
+      break;
     case QGis::WKBMultiPolygon :
-        geometry="MultiPolygon";
-        break;
-    }
-    uri.addQueryItem("geometry",geometry);
+      geometry = "MultiPolygon";
+      break;
+    default:
+      geometry = "";
+      break;
+  }
+  uri.addQueryItem( "geometry", geometry );
 
-    if( mCrs.isValid())
+  if ( mCrs.isValid() )
+  {
+    QString crsDef( "" );
+    long srid = mCrs.epsg();
+    if ( srid )
     {
-        QString crsDef("");
-        long srid = mCrs.epsg();
-        if( srid )
-        {
-            crsDef = QString("epsg:%1").arg(srid);
-        }
-        else if(  srid=mCrs.postgisSrid() )
-        {
-            crsDef = QString("postgis:%1").arg(srid);
-        }
-        else
-        {
-            crsDef = QString("wkt:%1").arg(mCrs.toWkt());
-        }
-        uri.addQueryItem("crs",crsDef);
+      crsDef = QString( "epsg:%1" ).arg( srid );
     }
-    if( mSpatialIndex )
+    else if (( srid = mCrs.postgisSrid() ) )
     {
-        uri.addQueryItem("index","yes");
+      crsDef = QString( "postgis:%1" ).arg( srid );
     }
-
-    QgsAttributeList attrs = const_cast<QgsMemoryProvider *>(this)->attributeIndexes();
-    for( int i = 0; i < attrs.size(); i++ )
+    else
     {
-        QgsField field = mFields[attrs[i]];
-        QString fieldDef = field.name();
-        fieldDef.append(QString(":%2(%3,%4)").arg(field.typeName()).arg(field.length()).arg(field.precision()));
-        uri.addQueryItem("field",fieldDef);
+      crsDef = QString( "wkt:%1" ).arg( mCrs.toWkt() );
     }
+    uri.addQueryItem( "crs", crsDef );
+  }
+  if ( mSpatialIndex )
+  {
+    uri.addQueryItem( "index", "yes" );
+  }
 
-    return QString(uri.toEncoded());
+  QgsAttributeList attrs = const_cast<QgsMemoryProvider *>( this )->attributeIndexes();
+  for ( int i = 0; i < attrs.size(); i++ )
+  {
+    QgsField field = mFields[attrs[i]];
+    QString fieldDef = field.name();
+    fieldDef.append( QString( ":%2(%3,%4)" ).arg( field.typeName() ).arg( field.length() ).arg( field.precision() ) );
+    uri.addQueryItem( "field", fieldDef );
+  }
 
+  return QString( uri.toEncoded() );
+
 }
 
 QString QgsMemoryProvider::storageType() const



More information about the QGIS-commit mailing list