[QGIS Commit] r10873 - in trunk/qgis/src: core core/composer core/pal gui plugins/diagram_overlay plugins/grass/qtermwidget

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jun 1 17:20:14 EDT 2009


Author: jef
Date: 2009-06-01 17:20:14 -0400 (Mon, 01 Jun 2009)
New Revision: 10873

Modified:
   trunk/qgis/src/core/composer/qgscomposeritem.cpp
   trunk/qgis/src/core/pal/util.cpp
   trunk/qgis/src/core/qgsoverlayobject.h
   trunk/qgis/src/gui/qgscomposerview.cpp
   trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
   trunk/qgis/src/plugins/grass/qtermwidget/Session.cpp
   trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
   trunk/qgis/src/plugins/grass/qtermwidget/Vt102Emulation.cpp
Log:
fix warnings

Modified: trunk/qgis/src/core/composer/qgscomposeritem.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposeritem.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/core/composer/qgscomposeritem.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -493,7 +493,7 @@
       break;
 
     case QgsComposerItem::MoveItem:
-
+    {
       //calculate total move difference
       double moveX = currentPosition.x() - mouseMoveStartPos.x();
       double moveY = currentPosition.y() - mouseMoveStartPos.y();
@@ -516,7 +516,10 @@
                                           originalItem->transform().dy() + moveRectY, \
                                           originalItem->rect().width(), originalItem->rect().height() ) );
       }
-      return;
+    }
+    return;
+    case QgsComposerItem::NoAction:
+      break;
   }
 
   if ( !changeComposerItem )
@@ -544,7 +547,6 @@
   if ( mComposition->plotStyle() == QgsComposition::Preview )
   {
     //size of symbol boxes depends on zoom level in composer view
-    double viewScaleFactor = horizontalViewScaleFactor();
     double rectHandlerSize = rectHandlerBorderTolerance();
     double sizeLockSymbol = lockSymbolSize();
 

Modified: trunk/qgis/src/core/pal/util.cpp
===================================================================
--- trunk/qgis/src/core/pal/util.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/core/pal/util.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -553,20 +553,22 @@
           std::cout << f->x[i] << ";" << f->y[i] << std::endl;
 #endif
 
-        // Butterfly detector
-        //
-        //   3____0
-        //    \  /
-        //     \/  <--- not allowed
-        //     /\
-        //   1/__\2
-        //
-        //   1____0
-        //    \  /
-        //    2\/5  <--- allowed
-        //     /\
-        //   3/__\4
-        //
+        /*
+                  Butterfly detector
+
+                   3____0
+                    \  /
+                     \/  <--- not allowed
+                     /\
+                   1/__\2
+
+                   1____0
+                    \  /
+                    2\/5  <--- allowed
+                     /\
+                   3/__\4
+        */
+
         pt_a = -1;
         pt_b = -1;
         for ( i = 0;i < f->nbPoints - 2;i++ )

Modified: trunk/qgis/src/core/qgsoverlayobject.h
===================================================================
--- trunk/qgis/src/core/qgsoverlayobject.h	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/core/qgsoverlayobject.h	2009-06-01 21:20:14 UTC (rev 10873)
@@ -45,7 +45,7 @@
     @note: this function is 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*/
-    void releaseGeosGeometry( GEOSGeometry *the_geom ) {}
+    void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
 
     //getters
     int width() const {return mWidth;}

Modified: trunk/qgis/src/gui/qgscomposerview.cpp
===================================================================
--- trunk/qgis/src/gui/qgscomposerview.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/gui/qgscomposerview.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -226,7 +226,6 @@
   else
   {
     QPointF scenePoint = mapToScene( e->pos() );
-    double newWidth, newHeight; //for rubber band
 
     switch ( mCurrentTool )
     {

Modified: trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
===================================================================
--- trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -149,7 +149,6 @@
           if ( it.value() )
           {
             QList<QgsPoint> positionList = it.value()->positions();
-            const QgsCoordinateTransform* ct = context.coordinateTransform();
 
             QList<QgsPoint>::const_iterator positionIt = positionList.constBegin();
             for ( ; positionIt != positionList.constEnd(); ++positionIt )

Modified: trunk/qgis/src/plugins/grass/qtermwidget/Session.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/Session.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/plugins/grass/qtermwidget/Session.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -977,8 +977,7 @@
     bool wasMaster = _sessions[session];
     _sessions[session] = master;
 
-    if (    !wasMaster && !master
-         || wasMaster && master )
+    if ( wasMaster==master )
       return;
 
     QListIterator<Session*> iter(_sessions.keys());

Modified: trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -1771,10 +1771,10 @@
     int i;
     int selClass;
 
-    bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
-	   here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
-    bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
-	   _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
+    bool left_not_right = here.y() < _iPntSelCorr.y() ||
+	   ( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
+    bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
+	   ( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
     swapping = left_not_right != old_left_not_right;
 
     // Find left (left_not_right ? from here : from start)
@@ -1848,10 +1848,10 @@
     int i;
     int selClass;
 
-    bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
-	   here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
-    bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
-	   _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
+    bool left_not_right = here.y() < _iPntSelCorr.y() ||
+	   ( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
+    bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
+	   ( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
     swapping = left_not_right != old_left_not_right;
 
     // Find left (left_not_right ? from here : from start)

Modified: trunk/qgis/src/plugins/grass/qtermwidget/Vt102Emulation.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/Vt102Emulation.cpp	2009-06-01 21:18:16 UTC (rev 10872)
+++ trunk/qgis/src/plugins/grass/qtermwidget/Vt102Emulation.cpp	2009-06-01 21:20:14 UTC (rev 10873)
@@ -1248,7 +1248,7 @@
 
 void Vt102Emulation::scan_buffer_report()
 {
-  if (ppos == 0 || ppos == 1 && (pbuf[0] & 0xff) >= 32) return;
+  if (ppos == 0 || (ppos == 1 && (pbuf[0] & 0xff) >= 32) ) return;
   printf("token: "); hexdump(pbuf,ppos); printf("\n");
 }
 



More information about the QGIS-commit mailing list