[QGIS Commit] r9189 - in trunk/qgis: python/core src/app src/app/composer src/app/legend src/core src/core/composer src/core/raster src/core/symbology src/gui src/plugins/coordinate_capture src/plugins/dxf2shp_converter src/plugins/gps_importer src/plugins/grass src/plugins/maplayer src/providers/postgres tests/algorithms/projections tests/algorithms/qgsproject tests/src/core tools/mapserver_export

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Aug 27 08:57:47 EDT 2008


Author: jef
Date: 2008-08-27 08:57:47 -0400 (Wed, 27 Aug 2008)
New Revision: 9189

Modified:
   trunk/qgis/python/core/qgsrasterdataprovider.sip
   trunk/qgis/src/app/composer/qgscomposer.cpp
   trunk/qgis/src/app/legend/qgslegend.cpp
   trunk/qgis/src/app/legend/qgslegendgroup.cpp
   trunk/qgis/src/app/legend/qgslegendgroup.h
   trunk/qgis/src/app/legend/qgslegenditem.cpp
   trunk/qgis/src/app/legend/qgslegendlayer.h
   trunk/qgis/src/app/legend/qgslegendpropertygroup.h
   trunk/qgis/src/app/legend/qgslegendpropertyitem.cpp
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgslabeldialog.cpp
   trunk/qgis/src/app/qgsrasterlayerproperties.cpp
   trunk/qgis/src/app/qgssinglesymboldialog.cpp
   trunk/qgis/src/core/composer/qgscomposermap.h
   trunk/qgis/src/core/qgscoordinatetransform.cpp
   trunk/qgis/src/core/qgslabel.cpp
   trunk/qgis/src/core/qgslabel.h
   trunk/qgis/src/core/qgsmaplayer.h
   trunk/qgis/src/core/qgsrasterdataprovider.h
   trunk/qgis/src/core/qgsrect.h
   trunk/qgis/src/core/qgsrunprocess.cpp
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
   trunk/qgis/src/core/raster/qgsrastertransparency.cpp
   trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
   trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
   trunk/qgis/src/gui/qgsquickprint.cpp
   trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp
   trunk/qgis/src/plugins/dxf2shp_converter/README
   trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp
   trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp
   trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.cpp
   trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
   trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
   trunk/qgis/src/plugins/grass/qgsgrassmapcalc.h
   trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
   trunk/qgis/src/plugins/grass/qgsgrassshell.cpp
   trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
   trunk/qgis/src/plugins/maplayer/maplayertest.cpp
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
   trunk/qgis/tests/algorithms/projections/main.cpp
   trunk/qgis/tests/algorithms/qgsproject/main.cpp
   trunk/qgis/tests/src/core/qgsrenderchecker.cpp
   trunk/qgis/tests/src/core/testqgsrasterlayer.cpp
   trunk/qgis/tests/src/core/testqgsrenderers.cpp
   trunk/qgis/tools/mapserver_export/ms_main.cpp
Log:
minor update (indentation, debug output, plenks)

Modified: trunk/qgis/python/core/qgsrasterdataprovider.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterdataprovider.sip	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/python/core/qgsrasterdataprovider.sip	2008-08-27 12:57:47 UTC (rev 9189)
@@ -19,7 +19,7 @@
     {
       NoCapabilities =              0,
       Identify =                    1
-//      Capability2 =           1 <<  1,    , etc
+//      Capability2 =           1 <<  1, etc
     };
 
 

Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -291,10 +291,10 @@
 
 void QgsComposer::on_mActionRefreshView_activated( void )
 {
-  if(mComposition)
-    {
-      mComposition->update();
-    }
+  if ( mComposition )
+  {
+    mComposition->update();
+  }
 }
 
 void QgsComposer::on_mActionPrint_activated( void )
@@ -821,7 +821,7 @@
   QgsDebugMsg( QString( "Selected filter: %1" ).arg( myFilterString ) );
   QgsDebugMsg( QString( "Image type: %1" ).arg( myFilterMap[myFilterString] ) );
 
-  myQSettings.writeEntry( "/UI/lastSaveAsImageFormat" , myFilterMap[myFilterString] );
+  myQSettings.writeEntry( "/UI/lastSaveAsImageFormat", myFilterMap[myFilterString] );
   myQSettings.writeEntry( "/UI/lastSaveAsImageFile", myOutputFileNameQString );
 
   if ( myOutputFileNameQString == "" ) return;

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -155,9 +155,8 @@
   }
 
   QTreeWidgetItem* theItem = firstItem();
-#ifdef QGISDEBUG
-  qWarning( "in QgsLegend::removeLayer" );
-#endif
+  QgsDebugMsg( "called." )
+
   while ( theItem )
   {
     QgsLegendItem *li = dynamic_cast<QgsLegendItem*>( theItem );
@@ -236,9 +235,8 @@
       QgsLegendItem::DRAG_ACTION action = dest->accept( origin );
       if ( action == QgsLegendItem::REORDER )
       {
-#ifdef QGISDEBUG
-        qWarning( "mouseMoveEvent::REORDER" );
-#endif
+        QgsDebugMsg( "mouseMoveEvent::REORDER" );
+
         if ( !yCoordAboveCenter( dest, e->y() ) ) //over bottom of item
         {
           if ( origin->nextSibling() != dest )
@@ -266,9 +264,8 @@
       }
       else if ( action == QgsLegendItem::INSERT )
       {
-#ifdef QGISDEBUG
-        qWarning( "mouseMoveEvent::INSERT" );
-#endif
+        QgsDebugMsg( "mouseMoveEvent::INSERT" );
+
         setCursor( QCursor( Qt::PointingHandCursor ) );
         if ( origin->parent() != dest )
         {
@@ -278,9 +275,8 @@
       }
       else//no action
       {
-#ifdef QGISDEBUG
-        qWarning( "mouseMoveEvent::NO_ACTION" );
-#endif
+        QgsDebugMsg( "mouseMoveEvent::NO_ACTION" );
+
         if ( origin->type() == QgsLegendItem::LEGEND_LAYER_FILE && mItemBeingMovedOrigPos != getItemPos( mItemBeingMoved ) )
         {
           resetToInitialPosition( mItemBeingMoved );
@@ -1121,17 +1117,15 @@
   QgsLegendItem* formerParent = dynamic_cast<QgsLegendItem*>( li->parent() ); //todo: make sure legend layers are updated
   if ( mRestoreInformation == FIRST_ITEM )
   {
-#ifdef QGISDEBUG
-    qWarning( "FIRST_ITEM" );
-#endif
+    QgsDebugMsg( "FIRST_ITEM" );
+
     removeItem( li );
     insertTopLevelItem( 0, li );
   }
   else if ( mRestoreInformation == FIRST_CHILD )
   {
-#ifdef QGISDEBUG
-    qWarning( "FIRST_CHILD" );
-#endif
+    QgsDebugMsg( "FIRST_CHILD" );
+
     removeItem( li );
     if ( formerParent )
     {
@@ -1142,9 +1136,8 @@
   }
   else if ( mRestoreInformation == YOUNGER_SIBLING )
   {
-#ifdef QGISDEBUG
-    qWarning( "YOUNGER_SIBLING" );
-#endif
+    QgsDebugMsg( "YOUNGER_SIBLING" );
+
     if ( formerParent )
     {
       formerParent->release(( QgsLegendItem* )li );
@@ -1439,10 +1432,10 @@
   }
 
 #ifdef QGISDEBUG
-  qWarning( "QgsLegend::layerIDs()" );
+  QgsDebugMsg( "QgsLegend::layerIDs()" );
   for ( std::deque<QString>::iterator it = layers.begin(); it != layers.end(); ++it )
   {
-    qWarning(( *it ).toUtf8() );
+    QgsDebugMsg( *it );
   }
 #endif
 
@@ -1596,15 +1589,15 @@
 #ifdef QGISDEBUG
       if ( item->checkState( 0 ) == Qt::Checked )
       {
-        qWarning( "item checked" );
+        QgsDebugMsg( "item checked" );
       }
       else if ( item->checkState( 0 ) == Qt::Unchecked )
       {
-        qWarning( "item unchecked" );
+        QgsDebugMsg( "item unchecked" );
       }
       else if ( item->checkState( 0 ) == Qt::PartiallyChecked )
       {
-        qWarning( "item partially checked" );
+        QgsDebugMsg( "item partially checked" );
       }
 #endif
       blockSignals( true );

Modified: trunk/qgis/src/app/legend/qgslegendgroup.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendgroup.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegendgroup.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -25,7 +25,7 @@
 #include <QCoreApplication>
 #include <QIcon>
 
-QgsLegendGroup::QgsLegendGroup( QTreeWidgetItem * theItem , QString theName )
+QgsLegendGroup::QgsLegendGroup( QTreeWidgetItem * theItem, QString theName )
     : QgsLegendItem( theItem, theName )
 {
   mType = LEGEND_GROUP;

Modified: trunk/qgis/src/app/legend/qgslegendgroup.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegendgroup.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegendgroup.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -33,7 +33,7 @@
 class QgsLegendGroup : public QgsLegendItem
 {
   public:
-    QgsLegendGroup( QTreeWidgetItem * , QString );
+    QgsLegendGroup( QTreeWidgetItem *, QString );
     QgsLegendGroup( QTreeWidget*, QString );
     QgsLegendGroup( QString name );
     ~QgsLegendGroup();

Modified: trunk/qgis/src/app/legend/qgslegenditem.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegenditem.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegenditem.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -23,7 +23,7 @@
 #include "qgslogger.h"
 
 
-QgsLegendItem::QgsLegendItem( QTreeWidgetItem * theItem , QString theName )
+QgsLegendItem::QgsLegendItem( QTreeWidgetItem * theItem, QString theName )
     : QTreeWidgetItem( theItem )
 {
   setText( 0, theName );

Modified: trunk/qgis/src/app/legend/qgslegendlayer.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegendlayer.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -45,8 +45,8 @@
     Q_OBJECT
 
   public:
-    QgsLegendLayer( QTreeWidgetItem * , QString );
-    QgsLegendLayer( QTreeWidget* , QString );
+    QgsLegendLayer( QTreeWidgetItem *, QString );
+    QgsLegendLayer( QTreeWidget*, QString );
     QgsLegendLayer( QString name );
     ~QgsLegendLayer();
     /**Sets an icon characterising the type of layer(s) it contains.

Modified: trunk/qgis/src/app/legend/qgslegendpropertygroup.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegendpropertygroup.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegendpropertygroup.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -30,7 +30,7 @@
 class QgsLegendPropertyGroup : public QgsLegendItem
 {
   public:
-    QgsLegendPropertyGroup( QTreeWidgetItem * , QString );
+    QgsLegendPropertyGroup( QTreeWidgetItem *, QString );
 
     ~QgsLegendPropertyGroup();
 

Modified: trunk/qgis/src/app/legend/qgslegendpropertyitem.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendpropertyitem.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/legend/qgslegendpropertyitem.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -22,7 +22,7 @@
 #include <QIcon>
 
 QgsLegendPropertyItem::QgsLegendPropertyItem( QTreeWidgetItem * theItem, QString theString )
-    : QgsLegendItem( theItem , theString )
+    : QgsLegendItem( theItem, theString )
 {
   mType = LEGEND_PROPERTY_ITEM;
   QIcon myIcon( QgsApplication::pkgDataPath() + QString( "/images/icons/property_item.png" ) );

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/qgisapp.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -3439,7 +3439,7 @@
     myOutputFileNameQString += "." + myFilterMap[myFilterString];
   }
 
-  myQSettings.setValue( "/UI/lastSaveAsImageFilter" , myFilterString );
+  myQSettings.setValue( "/UI/lastSaveAsImageFilter", myFilterString );
   myQSettings.setValue( "/UI/lastSaveAsImageDir", myQFileDialog->directory().absolutePath() );
 
   if ( myOutputFileNameQString != "" )

Modified: trunk/qgis/src/app/qgslabeldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgslabeldialog.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/qgslabeldialog.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -320,7 +320,7 @@
   {
     myTypeInt = QgsLabelAttributes::MapUnits;
   }
-  myLabelAttributes->setSize( mFont.pointSize() , myTypeInt );
+  myLabelAttributes->setSize( mFont.pointSize(), myTypeInt );
   myLabelAttributes->setBold( mFont.bold() );
   myLabelAttributes->setItalic( mFont.italic() );
   myLabelAttributes->setUnderline( mFont.underline() );
@@ -334,7 +334,7 @@
   {
     myTypeInt = QgsLabelAttributes::MapUnits;
   }
-  myLabelAttributes->setOffset( spinXOffset->value() , spinYOffset->value(), myTypeInt );
+  myLabelAttributes->setOffset( spinXOffset->value(), spinYOffset->value(), myTypeInt );
   myLabelAttributes->setAngle( spinAngle->value() );
 
   //the values here may seem a bit counterintuitive - basically everything

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -2123,9 +2123,9 @@
             {
               myPainter.setPen( Qt::gray );
             }
-#ifdef QGISDEBUG
-            // QgsDebugMsg(QString("myPainter.fillRect(QRect(%1,%2,%3,%2) , myBrush );").arg(myX).arg(myY).arg(myBarWidth));
-#endif
+
+            // QgsDebugMsg(QString("myPainter.fillRect(QRect(%1,%2,%3,%2), myBrush );").arg(myX).arg(myY).arg(myBarWidth));
+
             myPainter.drawRect( myX + myYGutterWidth, myImageHeight - ( myY + myXGutterHeight ), myBarWidth, myY );
           }
           else //line graph
@@ -2209,10 +2209,10 @@
   for ( int i = 0;i < myXDivisions;++i )
   {
     QPolygon myPolygon;
-    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
-    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - ( myXGutterHeight - 5 ) );
-    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
-    myPolygon << QPoint((( i + 1 )*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
+    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
+    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - ( myXGutterHeight - 5 ) );
+    myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
+    myPolygon << QPoint((( i + 1 )*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
     myPainter.drawPolyline( myPolygon );
   }
   //
@@ -2235,7 +2235,7 @@
   //now draw the axis labels onto the graph
   myPainter.drawText( 1, 12, myYMaxLabel );
   myPainter.drawText( 1, myImageHeight - myXGutterHeight, QString::number( static_cast < unsigned int >( myYAxisMin ) ) );
-  myPainter.drawText( myYGutterWidth, myImageHeight - 1 , myXMinLabel );
+  myPainter.drawText( myYGutterWidth, myImageHeight - 1, myXMinLabel );
   myPainter.drawText( myImageWidth - myXGutterWidth, myImageHeight - 1, myXMaxLabel );
 
   //
@@ -2604,7 +2604,7 @@
   for ( int i = 0; i < numberOfEntries; ++i )
   {
     QColor currentColor;
-    currentColor.setRgb( colorDiff*i , 0, 255 - colorDiff * i );
+    currentColor.setRgb( colorDiff*i, 0, 255 - colorDiff * i );
     entryColors.push_back( currentColor );
   }
 

Modified: trunk/qgis/src/app/qgssinglesymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgssinglesymboldialog.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/app/qgssinglesymboldialog.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -37,19 +37,14 @@
 QgsSingleSymbolDialog::QgsSingleSymbolDialog(): QDialog(), mVectorLayer( 0 )
 {
   setupUi( this );
-#ifdef QGISDEBUG
-  qWarning( "constructor QgsSingleSymbolDialog called WITHOUT a layer" );
-#endif
+  QgsDebugMsg( "entered." );
 }
 
 QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disabled ): QDialog(), mVectorLayer( layer )
 {
   setupUi( this );
+  QgsDebugMsg( "entered." );
 
-#ifdef QGISDEBUG
-  qWarning( "constructor QgsSingleSymbolDialog called WITH a layer" );
-#endif
-
   //
   //set point symbol list
   //
@@ -110,7 +105,7 @@
   }
   else
   {
-    qWarning( "Warning, data provider is null in QgsSingleSymbolDialog::QgsSingleSymbolDialog(...)" );
+    QgsDebugMsg( "Warning, data provider is null" );
     return;
   }
   //
@@ -173,8 +168,7 @@
     }
     else
     {
-      qWarning( "Warning, layer is a null pointer in "
-                "QgsSingleSymbolDialog::QgsSingleSymbolDialog(QgsVectorLayer)" );
+      QgsDebugMsg( "Warning, layer is a null pointer" );
     }
   }
 
@@ -183,8 +177,8 @@
   connect( btnFillColor, SIGNAL( clicked() ), this, SLOT( selectFillColor() ) );
   connect( outlinewidthspinbox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
   connect( mLabelEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( resendSettingsChanged() ) );
-  connect( lstSymbols, SIGNAL( currentItemChanged( QListWidgetItem * , QListWidgetItem * ) ),
-           this, SLOT( symbolChanged( QListWidgetItem * , QListWidgetItem * ) ) );
+  connect( lstSymbols, SIGNAL( currentItemChanged( QListWidgetItem *, QListWidgetItem * ) ),
+           this, SLOT( symbolChanged( QListWidgetItem *, QListWidgetItem * ) ) );
   connect( mPointSizeSpinBox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
   connect( mRotationClassificationComboBox, SIGNAL( currentIndexChanged( const QString & ) ),
            this, SLOT( resendSettingsChanged() ) );
@@ -203,9 +197,7 @@
 
 QgsSingleSymbolDialog::~QgsSingleSymbolDialog()
 {
-#ifdef QGISDEBUG
-  qWarning( "destructor QgsSingleSymbolDialog" );
-#endif
+  QgsDebugMsg( "entered." );
 }
 
 void QgsSingleSymbolDialog::selectOutlineColor()
@@ -508,9 +500,8 @@
 
 void QgsSingleSymbolDialog::setFillStyle( Qt::BrushStyle fstyle )
 {
-#ifdef QGISDEBUG
-  qWarning(( "Setting fill style: " + QgsSymbologyUtils::brushStyle2QString( fstyle ) ).toLocal8Bit().data() );
-#endif
+  QgsDebugMsg( QString( "Setting fill style: %1" ).arg( QgsSymbologyUtils::brushStyle2QString( fstyle ) ) );
+
   QString myFillStyle =  QgsSymbologyUtils::brushStyle2QString( fstyle );
   for ( int i = 0; i < cboFillStyle->count(); ++i )
   {
@@ -587,7 +578,7 @@
   //if the new style is texture we need to enable the texture
   //selection button, otherwise disable it
   QString myFillStyle =
-    cboFillStyle->itemData( theIndex , Qt::UserRole ).toString();
+    cboFillStyle->itemData( theIndex, Qt::UserRole ).toString();
   if ( "TexturePattern" == myFillStyle )
   {
     toolSelectTexture->setEnabled( true );

Modified: trunk/qgis/src/core/composer/qgscomposermap.h
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/composer/qgscomposermap.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -36,7 +36,7 @@
  *  \brief Object representing map window.
  */
 // NOTE: QgsComposerMapBase must be first, otherwise does not compile
-class CORE_EXPORT QgsComposerMap : /*public QWidget , private Ui::QgsComposerMapBase,*/ public QObject, public QgsComposerItem
+class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapBase,*/ public QObject, public QgsComposerItem
 {
     Q_OBJECT
 

Modified: trunk/qgis/src/core/qgscoordinatetransform.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgscoordinatetransform.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -284,7 +284,7 @@
   QgsLogger::debug( "Ymax : ", theRect.yMax(), 1, __FILE__, __FUNCTION__, __LINE__ );
   QgsLogger::debug( "-->", y2, 1, __FILE__, __FUNCTION__, __LINE__ );
 #endif
-  return QgsRect( x1, y1, x2 , y2 );
+  return QgsRect( x1, y1, x2, y2 );
 }
 
 void QgsCoordinateTransform::transformInPlace( double& x, double& y, double& z,
@@ -450,24 +450,24 @@
   int projResult;
   if ( direction == INVERSE )
   {
-    /*
-    QgsDebugMsg("!!!! INVERSE PROJ4 TRANSFORM !!!!");
-    QgsDebugMsg(QString("     numPoint: %1").arg(numPoints));
-    QgsDebugMsg(QString("     x       : %1").arg(x));
-    QgsDebugMsg(QString("     y       : %1").arg(y));
-    */
-    projResult = pj_transform( mDestinationProjection, mSourceProjection , numPoints, 0, x, y, z );
+#if 0
+    QgsDebugMsg( "!!!! INVERSE PROJ4 TRANSFORM !!!!" );
+    QgsDebugMsg( QString( "     numPoint: %1" ).arg( numPoints ) );
+    QgsDebugMsg( QString( "     x       : %1" ).arg( x ) );
+    QgsDebugMsg( QString( "     y       : %1" ).arg( y ) );
+#endif
+    projResult = pj_transform( mDestinationProjection, mSourceProjection, numPoints, 0, x, y, z );
     dir = "inverse";
   }
   else
   {
-    /*
-    QgsDebugMsg("!!!! FORWARD PROJ4 TRANSFORM !!!!");
-    QgsDebugMsg(QString("     numPoint: %1").arg(numPoints));
-    QgsDebugMsg(QString("     x       : %1").arg(x));
-    QgsDebugMsg(QString("     y       : %1").arg(y));
-    QgsDebugMsg(QString("     z       : %1").arg(z));
-    */
+#if 0
+    QgsDebugMsg( "!!!! FORWARD PROJ4 TRANSFORM !!!!" );
+    QgsDebugMsg( QString( "     numPoint: %1" ).arg( numPoints ) );
+    QgsDebugMsg( QString( "     x       : %1" ).arg( x ) );
+    QgsDebugMsg( QString( "     y       : %1" ).arg( y ) );
+    QgsDebugMsg( QString( "     z       : %1" ).arg( z ) );
+#endif
     assert( mSourceProjection != 0 );
     assert( mDestinationProjection != 0 );
     projResult = pj_transform( mSourceProjection, mDestinationProjection, numPoints, 0, x, y, z );

Modified: trunk/qgis/src/core/qgslabel.cpp
===================================================================
--- trunk/qgis/src/core/qgslabel.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgslabel.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -156,9 +156,9 @@
     size = sizeMM * sizeScale;
   }
   if ( size > 0.0 )
-    {
-      font.setPixelSize(size);
-    }
+  {
+    font.setPixelSize( size );
+  }
 
   value = fieldValue( Color, feature );
   if ( value.isEmpty() )
@@ -324,10 +324,10 @@
     yoffset *= scale;
   }
   else
-    {
-      xoffset = xoffset * 0.3527 * sizeScale;
-      yoffset = yoffset * 0.3527 * sizeScale;
-    }
+  {
+    xoffset = xoffset * 0.3527 * sizeScale;
+    yoffset = yoffset * 0.3527 * sizeScale;
+  }
 
   // Angle
   double ang;
@@ -408,36 +408,36 @@
   //
   if ( mLabelAttributes->bufferSizeIsSet() && mLabelAttributes->bufferEnabled() )
   {
-    int myBufferSize = static_cast<int>( mLabelAttributes->bufferSize() * 0.3527 * sizeScale);
+    int myBufferSize = static_cast<int>( mLabelAttributes->bufferSize() * 0.3527 * sizeScale );
     QPen bufferPen;
     if ( mLabelAttributes->bufferColorIsSet() )
     {
-      bufferPen.setColor( mLabelAttributes->bufferColor());
+      bufferPen.setColor( mLabelAttributes->bufferColor() );
     }
     else //default to a white buffer
     {
       bufferPen.setColor( Qt::white );
     }
-    painter->setPen(bufferPen);
+    painter->setPen( bufferPen );
 
     double bufferStepSize; //hack to distinguish pixel devices from logical devices
-    if((sizeScale - 1) > 1.5)
-      {
-	bufferStepSize = 1;
-      }
+    if (( sizeScale - 1 ) > 1.5 )
+    {
+      bufferStepSize = 1;
+    }
     else //draw more dense in case of logical devices
-      {
-	bufferStepSize = 0.25;
-      }
+    {
+      bufferStepSize = 0.25;
+    }
 
-    for ( double i = dx - myBufferSize; i <= dx + myBufferSize; i+= 0.25)
+    for ( double i = dx - myBufferSize; i <= dx + myBufferSize; i += 0.25 )
     {
-      for ( double j = dy - myBufferSize; j <= dy + myBufferSize; j+= 0.25 )
+      for ( double j = dy - myBufferSize; j <= dy + myBufferSize; j += 0.25 )
       {
         if ( mLabelAttributes->multilineEnabled() )
-          painter->drawText( QRectF(i , j - height, width, height), alignment, text );
+          painter->drawText( QRectF( i, j - height, width, height ), alignment, text );
         else
-          painter->drawText( QPointF(i , j), text );
+          painter->drawText( QPointF( i, j ), text );
       }
     }
   }

Modified: trunk/qgis/src/core/qgslabel.h
===================================================================
--- trunk/qgis/src/core/qgslabel.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgslabel.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -134,7 +134,7 @@
                       int dx, int dy,
                       double xoffset, double yoffset,
                       double ang,
-                      int width, int height, int alignment, double sizeScale=1.0 );
+                      int width, int height, int alignment, double sizeScale = 1.0 );
 
     /** Get label point for simple feature in map units */
     void labelPoint( std::vector<QgsPoint>&, QgsFeature &feature );

Modified: trunk/qgis/src/core/qgsmaplayer.h
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgsmaplayer.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -215,9 +215,9 @@
      * @return a QString with any status messages
      * @see also loadDefaultStyle ();
      */
-    virtual QString loadNamedStyle( const QString theURI , bool & theResultFlag );
+    virtual QString loadNamedStyle( const QString theURI, bool & theResultFlag );
 
-    virtual bool loadNamedStyleFromDb( const QString db, const QString theURI , QString &qml );
+    virtual bool loadNamedStyleFromDb( const QString db, const QString theURI, QString &qml );
 
     /** Save the properties of this layer as the default style
      * (either as a .qml file on disk or as a
@@ -242,7 +242,7 @@
      * @return a QString with any status messages
      * @see also saveDefaultStyle ();
      */
-    virtual QString saveNamedStyle( const QString theURI , bool & theResultFlag );
+    virtual QString saveNamedStyle( const QString theURI, bool & theResultFlag );
 
   public slots:
 

Modified: trunk/qgis/src/core/qgsrasterdataprovider.h
===================================================================
--- trunk/qgis/src/core/qgsrasterdataprovider.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgsrasterdataprovider.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -47,7 +47,7 @@
     {
       NoCapabilities =              0,
       Identify =                    1
-//      Capability2 =           1 <<  1,    , etc
+//      Capability2 =           1 <<  1, etc
     };
 
 

Modified: trunk/qgis/src/core/qgsrect.h
===================================================================
--- trunk/qgis/src/core/qgsrect.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgsrect.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -187,7 +187,7 @@
 
 inline QgsPoint QgsRect::center() const
 {
-  return QgsPoint( xmin + width() / 2 ,  ymin + height() / 2 );
+  return QgsPoint( xmin + width() / 2,  ymin + height() / 2 );
 }
 inline std::ostream& operator << ( std::ostream& os, const QgsRect &r )
 {

Modified: trunk/qgis/src/core/qgsrunprocess.cpp
===================================================================
--- trunk/qgis/src/core/qgsrunprocess.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgsrunprocess.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -70,8 +70,8 @@
     if ( ! mProcess->startDetached( action ) ) // let the program run by itself
     {
       QMessageBox::critical( 0, tr( "Action" ),
-                             tr( "Unable to run command" ) + "\n" + action
-                             , QMessageBox::Ok, Qt::NoButton );
+                             tr( "Unable to run command" ) + "\n" + action,
+                             QMessageBox::Ok, Qt::NoButton );
     }
     // We're not capturing the output from the process, so we don't
     // need to exist anymore.

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -286,7 +286,7 @@
   {
     return;
   }
-  drawLabels( thePainter, rendererContext.extent(), &( rendererContext.mapToPixel() ), rendererContext.coordinateTransform(), rendererContext.scaleFactor());
+  drawLabels( thePainter, rendererContext.extent(), &( rendererContext.mapToPixel() ), rendererContext.coordinateTransform(), rendererContext.scaleFactor() );
 }
 
 // NOTE this is a temporary method added by Tim to prevent label clipping

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -1357,7 +1357,7 @@
   }
 
   QgsDebugMsg( "Starting main render loop" );
-  // print each point in myGdalScanData with equal parts R, G ,B o make it show as gray
+  // print each point in myGdalScanData with equal parts R, G, B or make it show as gray
   double myGrayValue = 0.0;
   int myGrayVal = 0;
   int myAlphaValue = 0;
@@ -4686,8 +4686,8 @@
      */
     double myerval = ( myRasterBandStats.maxVal - myRasterBandStats.minVal ) / theBinCount;
     GDALGetRasterHistogram( myGdalBand, myRasterBandStats.minVal - 0.1*myerval,
-                            myRasterBandStats.maxVal + 0.1*myerval, theBinCount, myHistogramArray
-                            , theIgnoreOutOfRangeFlag , theHistogramEstimatedFlag , progressCallback,
+                            myRasterBandStats.maxVal + 0.1*myerval, theBinCount, myHistogramArray,
+                            theIgnoreOutOfRangeFlag, theHistogramEstimatedFlag, progressCallback,
                             this ); //this is the arg for our custome gdal progress callback
 
     for ( int myBin = 0; myBin < theBinCount; myBin++ )

Modified: trunk/qgis/src/core/raster/qgsrastertransparency.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrastertransparency.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/raster/qgsrastertransparency.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -74,7 +74,7 @@
 
 
 /**
-  Mutator for transparentSingleValuePixelList, , replaces the whole list
+  Mutator for transparentSingleValuePixelList, replaces the whole list
 */
 void QgsRasterTransparency::setTransparentSingleValuePixelList( QList<QgsRasterTransparency::TransparentSingleValuePixel> theNewList )
 {
@@ -82,7 +82,7 @@
 }
 
 /**
-  Mutator for transparentThreeValuePixelList, , replaces the whole list
+  Mutator for transparentThreeValuePixelList, replaces the whole list
 */
 void QgsRasterTransparency::setTransparentThreeValuePixelList( QList<QgsRasterTransparency::TransparentThreeValuePixel> theNewList )
 {

Modified: trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -111,7 +111,7 @@
     // proportion of scale factor as in oritignal SVG TS XXX
     if ( size < 1 ) size = 1;
     //QPixmap myPixmap = QPixmap(width,height);
-    myImage = QImage( size , size , QImage::Format_ARGB32_Premultiplied );
+    myImage = QImage( size, size, QImage::Format_ARGB32_Premultiplied );
   }
 
   // starting with transparent QImage

Modified: trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
===================================================================
--- trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -150,8 +150,8 @@
   //
   myTextStartY += myHeight / 2;
   thepPainter->setFont( titleFont( theOption ) );
-  thepPainter->drawText( myTextStartX ,
-                         myTextStartY ,
+  thepPainter->drawText( myTextStartX,
+                         myTextStartY,
                          theData.title() );
   //
   // Draw the description with word wrapping if needed

Modified: trunk/qgis/src/gui/qgsquickprint.cpp
===================================================================
--- trunk/qgis/src/gui/qgsquickprint.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/gui/qgsquickprint.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -600,8 +600,8 @@
   myLogo1 = myLogo1.scaled( myLogoXDim, myLogoYDim, Qt::KeepAspectRatio );
   myOriginX = myPrinter.pageRect().left() + myHorizontalSpacing;
   myOriginY += myVerticalSpacing ;
-  myPrintPainter.drawPixmap( myOriginX ,
-                             myOriginY ,
+  myPrintPainter.drawPixmap( myOriginX,
+                             myOriginY,
                              myLogo1 );
 
   //
@@ -623,11 +623,10 @@
   myLogo2.load( mLogo2File );
   myLogo2 = myLogo2.scaled( myLogoXDim, myLogoYDim, Qt::KeepAspectRatio );
   myOriginX += myHorizontalSpacing + myLogoXDim;
-  myPrintPainter.drawPixmap( myOriginX ,
-                             myOriginY ,
+  myPrintPainter.drawPixmap( myOriginX,
+                             myOriginY,
                              myLogo2 );
 
-
   //
   // Draw the north arrow
   //
@@ -639,8 +638,8 @@
   QPainter myNorthPainter( &myNorthArrow );
   QSvgRenderer mySvgRenderer( mNorthArrowFile );
   mySvgRenderer.render( &myNorthPainter );
-  myPrintPainter.drawPixmap( myOriginX + (( myLogoXDim / 2 ) ) ,
-                             myOriginY ,
+  myPrintPainter.drawPixmap( myOriginX + (( myLogoXDim / 2 ) ),
+                             myOriginY,
                              myNorthArrow );
 
   //
@@ -703,13 +702,13 @@
         if ( theDirection == ScaleUp )
         {
           mypLabelAttributes->setSize(
-            mypLabelAttributes->size() * theScaleFactor ,
+            mypLabelAttributes->size() * theScaleFactor,
             mypLabelAttributes->sizeType() );
         }
         else //scale down
         {
           mypLabelAttributes->setSize(
-            mypLabelAttributes->size() / theScaleFactor ,
+            mypLabelAttributes->size() / theScaleFactor,
             mypLabelAttributes->sizeType() );
         }
       } //if vectorlayer

Modified: trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp
===================================================================
--- trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -106,7 +106,7 @@
   QToolButton * mypUserCrsToolButton = new QToolButton( mypWidget );
   mypUserCrsToolButton->setIcon( QIcon( ":/coordinatecapture/geographic.png" ) );
   mypUserCrsToolButton->setToolTip( tr( "Click to select the CRS to use for coordinate display" ) );
-  connect( mypUserCrsToolButton , SIGNAL( clicked() ), this, SLOT( setCRS() ) );
+  connect( mypUserCrsToolButton, SIGNAL( clicked() ), this, SLOT( setCRS() ) );
 
   QLabel * mypCRSLabel = new QLabel( mypWidget );
   mypCRSLabel->setPixmap( QPixmap( ":/coordinatecapture/transformed.png" ) );

Modified: trunk/qgis/src/plugins/dxf2shp_converter/README
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/README	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/dxf2shp_converter/README	2008-08-27 12:57:47 UTC (rev 9189)
@@ -16,7 +16,7 @@
 
 We've just developed and partially tested this plugin that converts a DXF file
 into one or more vector layers in QGIS;  it can also extract labels from the
-DXF file and inserts the data (string, x, y ,z, angle) in the dbf file of a new
+DXF file and inserts the data (string, x, y, z, angle) in the dbf file of a new
 point layer populated with points located where the labels should be rendered.
 The purpose is to let Mapserver render them.
 

Modified: trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -142,10 +142,9 @@
 
 void Builder::addLine( const DL_LineData& data )
 {
+  //data.x1, data.y1, data.z1
+  //data.x2, data.y2, data.z2
 
-  //data.x1 , data.y1, data.z1
-  //data.x2 , data.y2, data.z2
-
   if ( shapefileType != SHPT_ARC )
   {
     QgsDebugMsg( "ignoring line" );

Modified: trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -157,7 +157,9 @@
 {
   QString fileName =
     QFileDialog::getSaveFileName( mQGisInterface->getMainWindow(),
-                                  tr( "Save new GPX file as..." ), "." , tr( "GPS eXchange file (*.gpx)" ) );
+                                  tr( "Save new GPX file as..." ),
+                                  ".",
+                                  tr( "GPS eXchange file (*.gpx)" ) );
   if ( !fileName.isEmpty() )
   {
     QFileInfo fileInfo( fileName );

Modified: trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -149,7 +149,7 @@
   QString myFileNameQString =
     QFileDialog::getSaveFileName( this, //parent dialog
                                   tr( "Choose a file name to save under" ),
-                                  "." , //initial dir
+                                  ".", //initial dir
                                   tr( "GPS eXchange format (*.gpx)" ) );
   if ( !myFileNameQString.isEmpty() )
     leDLOutput->setText( myFileNameQString );

Modified: trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedit.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrassedit.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -433,7 +433,7 @@
   symbologyList->setColumnWidth( 0, 50 );
   symbologyList->addColumn( tr( "Type", "Column title" ) );
   symbologyList->setColumnWidthMode( 2, Q3ListView::Maximum );
-  symbologyList->addColumn( tr( "Index", "Column title" ) , 0 );
+  symbologyList->addColumn( tr( "Index", "Column title" ), 0 );
   symbologyList->clear();
   symbologyList->setSorting( -1 );
 
@@ -449,13 +449,13 @@
 
     if ( i == SYMB_BACKGROUND || i == SYMB_HIGHLIGHT || i == SYMB_DYNAMIC )
     {
-      Q3ListViewItem *lvi = new Q3ListViewItem( symbologyList , "", "", mSymbName[i] );
+      Q3ListViewItem *lvi = new Q3ListViewItem( symbologyList, "", "", mSymbName[i] );
       lvi->setPixmap( 1, pm );
       lvi->setText( 3, index );
     }
     else
     {
-      Q3CheckListItem *clvi = new Q3CheckListItem( symbologyList , "", Q3CheckListItem::CheckBox );
+      Q3CheckListItem *clvi = new Q3CheckListItem( symbologyList, "", Q3CheckListItem::CheckBox );
       clvi->setText( 2, mSymbName[i] );
       clvi->setPixmap( 1, pm );
       clvi->setOn( mSymbDisplay[i] );

Modified: trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -549,7 +549,7 @@
       continue;
     }
 
-    if ( G_window_overlap( &currentWindow ,
+    if ( G_window_overlap( &currentWindow,
                            window.north, window.south, window.east, window.west ) == 0 )
     {
       list.append( obj->value() );
@@ -1825,7 +1825,7 @@
   Q3CanvasRectangle::update();
 }
 
-QPoint QgsGrassMapcalcObject::socketPoint( int direction , int socket )
+QPoint QgsGrassMapcalcObject::socketPoint( int direction, int socket )
 {
   // QgsDebugMsg("entered.");
 

Modified: trunk/qgis/src/plugins/grass/qgsgrassmapcalc.h
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmapcalc.h	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrassmapcalc.h	2008-08-27 12:57:47 UTC (rev 9189)
@@ -378,7 +378,7 @@
     bool tryConnect( QgsGrassMapcalcConnector *, int );
 
     // Get socket coordinates
-    QPoint socketPoint( int direction , int socket );
+    QPoint socketPoint( int direction, int socket );
 
     // Set socket's connector
     void setConnector( int direction, int socket,

Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -864,7 +864,7 @@
       continue;
     }
 
-    if ( G_window_overlap( &currentWindow ,
+    if ( G_window_overlap( &currentWindow,
                            window.north, window.south, window.east, window.west ) == 0 )
     {
       list.append( item->currentMap() );

Modified: trunk/qgis/src/plugins/grass/qgsgrassshell.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassshell.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrassshell.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -99,7 +99,7 @@
 
   QGridLayout *layout = new QGridLayout( mTextFrame, 1, 1 );
   mText = new QgsGrassShellText( this, mTextFrame );
-  layout->addWidget( mText, 0 , 0 );
+  layout->addWidget( mText, 0, 0 );
   mText->show();
 
   connect( mCloseButton, SIGNAL( clicked() ), this, SLOT( closeShell() ) );

Modified: trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrasstools.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/grass/qgsgrasstools.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -398,7 +398,7 @@
         QStandardItem * mypDetailItem = new QStandardItem( name );
         mypDetailItem->setData( name, Qt::UserRole + 1 ); //for calling runModule later
         QString mySearchText = name + " - " + label;
-        mypDetailItem->setData( mySearchText , Qt::UserRole + 2 ); //for filtering later
+        mypDetailItem->setData( mySearchText, Qt::UserRole + 2 ); //for filtering later
         mypDetailItem->setData( pixmap, Qt::DecorationRole );
         mypDetailItem->setCheckable( false );
         mypDetailItem->setEditable( false );

Modified: trunk/qgis/src/plugins/maplayer/maplayertest.cpp
===================================================================
--- trunk/qgis/src/plugins/maplayer/maplayertest.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/plugins/maplayer/maplayertest.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -41,10 +41,11 @@
   menu = (( Q3MainWindow * )qgisApp )->menuBar();
 
   menuId = menu->insertItem( "&PluginMenu", mapLayerPluginMenu );
-  //QAction *zoomPreviousAction = new QAction( "Zoom Previous",QIconSet(icon_matrix), "&Zoom Previous", CTRL+Key_S, qgisMainWindow, "zoomFull" );
 
-  //   connect( zoomPreviousAction, SIGNAL( triggered() ) , this, SLOT( zoomPrevious() ) );
-
+#if 0
+  QAction *zoomPreviousAction = new QAction( "Zoom Previous", QIconSet( icon_matrix ), "&Zoom Previous", CTRL + Key_S, qgisMainWindow, "zoomFull" );
+  connect( zoomPreviousAction, SIGNAL( triggered() ), this, SLOT( zoomPrevious() ) );
+#endif
 }
 void MapLayerTest::unload()
 {

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -2245,17 +2245,17 @@
                  "xmin(extent(%1)) as xmin,"
                  "ymax(extent(%1)) as ymax,"
                  "ymin(extent(%1)) as ymin"
-                 " from %2" ).arg( quotedIdentifier( geometryColumn ).arg( mSchemaTableName );
+                 " from %2" ).arg( quotedIdentifier( geometryColumn ) ).arg( mSchemaTableName );
 #endif
 
-                                   QgsDebugMsg( "Getting approximate extent using: '" + sql + "'" );
+  QgsDebugMsg( "Getting approximate extent using: '" + sql + "'" );
 
-                                   Result result = connectionRO->PQexec( sql );
+  Result result = connectionRO->PQexec( sql );
 
-                                   // TODO: Guard against the result having no rows
-                                   for ( int i = 0; i < PQntuples( result ); i++ )
-{
-  QString box3d = PQgetvalue( result, i, 0 );
+  // TODO: Guard against the result having no rows
+  for ( int i = 0; i < PQntuples( result ); i++ )
+  {
+    QString box3d = PQgetvalue( result, i, 0 );
 
     if ( 0 == i )
     {

Modified: trunk/qgis/tests/algorithms/projections/main.cpp
===================================================================
--- trunk/qgis/tests/algorithms/projections/main.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tests/algorithms/projections/main.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -17,11 +17,11 @@
 #include "projectioncshandlingtest.h"
 
 
-int main( int , char **)
+int main( int, char ** )
 {
-    std::cout << std::endl << "PROJECTION TESTS..................." << std::endl;  
-    CppUnit::TextUi::TestRunner runner;
-    runner.addTest( ProjectionCsHandlingTest::suite() );
-    runner.run();
-    return 0;
+  std::cout << std::endl << "PROJECTION TESTS..................." << std::endl;
+  CppUnit::TextUi::TestRunner runner;
+  runner.addTest( ProjectionCsHandlingTest::suite() );
+  runner.run();
+  return 0;
 }

Modified: trunk/qgis/tests/algorithms/qgsproject/main.cpp
===================================================================
--- trunk/qgis/tests/algorithms/qgsproject/main.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tests/algorithms/qgsproject/main.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -25,19 +25,19 @@
 
 CPPUNIT_TEST_SUITE_REGISTRATION( ProjectTest );
 
-int main( int , char **)
+int main( int, char ** )
 {
-    std::cout << "\n" 
-              << "QgsProject TESTS...................\n";
+  std::cout << "\n"
+            << "QgsProject TESTS...................\n";
 
-    CppUnit::TextUi::TestRunner runner;
+  CppUnit::TextUi::TestRunner runner;
 
-    CppUnit::TestFactoryRegistry &registry = 
-        CppUnit::TestFactoryRegistry::getRegistry();
+  CppUnit::TestFactoryRegistry &registry =
+    CppUnit::TestFactoryRegistry::getRegistry();
 
-    runner.addTest( registry.makeTest() );
+  runner.addTest( registry.makeTest() );
 
-    runner.run();
+  runner.run();
 
-    return 0;
+  return 0;
 }

Modified: trunk/qgis/tests/src/core/qgsrenderchecker.cpp
===================================================================
--- trunk/qgis/tests/src/core/qgsrenderchecker.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tests/src/core/qgsrenderchecker.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -23,85 +23,85 @@
 
 
 QgsRenderChecker::QgsRenderChecker( ) :
-  mReport(""),
-  mExpectedImageFile(""),
-  mRenderedImageFile(""), 
-  mMismatchCount(0),
-  mMatchTarget(0),
-  mElapsedTime(0),
-  mElapsedTimeTarget(0),
-  mpMapRenderer(NULL)
+    mReport( "" ),
+    mExpectedImageFile( "" ),
+    mRenderedImageFile( "" ),
+    mMismatchCount( 0 ),
+    mMatchTarget( 0 ),
+    mElapsedTime( 0 ),
+    mElapsedTimeTarget( 0 ),
+    mpMapRenderer( NULL )
 {
 
 }
 bool QgsRenderChecker::runTest( QString theTestName )
 {
-  if (mExpectedImageFile.isEmpty())
+  if ( mExpectedImageFile.isEmpty() )
   {
-    qDebug("QgsRenderChecker::runTest failed - Expected Image File not set.");
-    mReport= "<table>"
-      "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
-      "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
-      "Image File not set.</td></tr></table>\n";
+    qDebug( "QgsRenderChecker::runTest failed - Expected Image File not set." );
+    mReport = "<table>"
+              "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
+              "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
+              "Image File not set.</td></tr></table>\n";
     return false;
   }
   //
   // Load the expected result pixmap
   //
-  QImage myExpectedImage (mExpectedImageFile);
+  QImage myExpectedImage( mExpectedImageFile );
   mMatchTarget = myExpectedImage.width() * myExpectedImage.height();
   //
-  // Now render our layers onto a pixmap 
+  // Now render our layers onto a pixmap
   //
-  QImage myImage( myExpectedImage.width() , myExpectedImage.height(), QImage::Format_RGB32 );
-  myImage.fill ( qRgb( 152,219,249  ) );
+  QImage myImage( myExpectedImage.width(), myExpectedImage.height(), QImage::Format_RGB32 );
+  myImage.fill( qRgb( 152, 219, 249 ) );
   QPainter myPainter( &myImage );
-  mpMapRenderer->setOutputSize( QSize (
-        myExpectedImage.width(),myExpectedImage.height() ),myExpectedImage.logicalDpiX() ); 
+  mpMapRenderer->setOutputSize( QSize(
+                                  myExpectedImage.width(), myExpectedImage.height() ), myExpectedImage.logicalDpiX() );
   QTime myTime;
   myTime.start();
   mpMapRenderer->render( &myPainter );
   mElapsedTime = myTime.elapsed();
   myPainter.end();
   //
-  // Save the pixmap to disk so the user can make a 
+  // Save the pixmap to disk so the user can make a
   // visual assessment if needed
   //
   mRenderedImageFile = QDir::tempPath() + QDir::separator() + theTestName + "_result.png";
-  myImage.save (mRenderedImageFile);
-  return compareImages(theTestName);
+  myImage.save( mRenderedImageFile );
+  return compareImages( theTestName );
 
 }
 
 
 bool QgsRenderChecker::compareImages( QString theTestName )
 {
-  if (mExpectedImageFile.isEmpty())
+  if ( mExpectedImageFile.isEmpty() )
   {
-    qDebug("QgsRenderChecker::runTest failed - Expected Image (control) File not set.");
-    mReport= "<table>"
-      "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
-      "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
-      "Image File not set.</td></tr></table>\n";
+    qDebug( "QgsRenderChecker::runTest failed - Expected Image (control) File not set." );
+    mReport = "<table>"
+              "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
+              "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
+              "Image File not set.</td></tr></table>\n";
     return false;
   }
-  if (mRenderedImageFile.isEmpty())
+  if ( mRenderedImageFile.isEmpty() )
   {
-    qDebug("QgsRenderChecker::runTest failed - Rendered Image File not set.");
-    mReport= "<table>"
-      "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
-      "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
-      "Image File not set.</td></tr></table>\n";
+    qDebug( "QgsRenderChecker::runTest failed - Rendered Image File not set." );
+    mReport = "<table>"
+              "<tr><td>Test Result:</td><td>Expected Result:</td></tr>\n"
+              "<tr><td>Nothing rendered</td>\n<td>Failed because Expected "
+              "Image File not set.</td></tr></table>\n";
     return false;
   }
   //
   // Load /create the images
   //
-  QImage myExpectedImage (mExpectedImageFile);
-  QImage myResultImage (mRenderedImageFile);
-  QImage myDifferenceImage( myExpectedImage.width() , myExpectedImage.height(), QImage::Format_RGB32);
+  QImage myExpectedImage( mExpectedImageFile );
+  QImage myResultImage( mRenderedImageFile );
+  QImage myDifferenceImage( myExpectedImage.width(), myExpectedImage.height(), QImage::Format_RGB32 );
   QString myResultDiffImage = QDir::tempPath() + QDir::separator() + theTestName + "_result_diff.png";
-  myDifferenceImage.fill ( qRgb( 152,219,249 ) );
+  myDifferenceImage.fill( qRgb( 152, 219, 249 ) );
 
   //
   // Set pixel count score and target
@@ -111,41 +111,41 @@
   //
   // Set the report with the result
   //
-  mReport= "<table>";
+  mReport = "<table>";
   mReport += "<tr><td colspan=2>";
   mReport += "Test image and result image for " + theTestName + "<br>"
-    "Expected size: " + QString::number(myExpectedImage.width()).toLocal8Bit() + "w x " + 
-    QString::number(myExpectedImage.width()).toLocal8Bit() + "h (" +
-    QString::number(mMatchTarget).toLocal8Bit() + " pixels)<br>"
-    "Actual   size: " + QString::number(myResultImage.width()).toLocal8Bit() + "w x " + 
-    QString::number(myResultImage.width()).toLocal8Bit() + "h (" +
-    QString::number(myPixelCount).toLocal8Bit() + " pixels)";
+             "Expected size: " + QString::number( myExpectedImage.width() ).toLocal8Bit() + "w x " +
+             QString::number( myExpectedImage.width() ).toLocal8Bit() + "h (" +
+             QString::number( mMatchTarget ).toLocal8Bit() + " pixels)<br>"
+             "Actual   size: " + QString::number( myResultImage.width() ).toLocal8Bit() + "w x " +
+             QString::number( myResultImage.width() ).toLocal8Bit() + "h (" +
+             QString::number( myPixelCount ).toLocal8Bit() + " pixels)";
   mReport += "</td></tr>";
   mReport += "<tr><td colspan = 2>\n";
-  mReport += "Expected Duration : <= " + QString::number(mElapsedTimeTarget) + 
-    "ms (0 indicates not specified)<br>";
-  mReport += "Actual Duration :  " + QString::number(mElapsedTime) + "ms<br>";
-  QString myImagesString= "</td></tr>"
-    "<tr><td>Test Result:</td><td>Expected Result:</td><td>Difference (all blue is good, any red is bad)</td></tr>\n"
-    "<tr><td><img src=\"file://" +
-    mRenderedImageFile +
-    "\"></td>\n<td><img src=\"file://" +
-    mExpectedImageFile +
-    "\"></td><td><img src=\"file://" +
-    myResultDiffImage  +
-    "\"></td>\n</tr>\n</table>";
+  mReport += "Expected Duration : <= " + QString::number( mElapsedTimeTarget ) +
+             "ms (0 indicates not specified)<br>";
+  mReport += "Actual Duration :  " + QString::number( mElapsedTime ) + "ms<br>";
+  QString myImagesString = "</td></tr>"
+                           "<tr><td>Test Result:</td><td>Expected Result:</td><td>Difference (all blue is good, any red is bad)</td></tr>\n"
+                           "<tr><td><img src=\"file://" +
+                           mRenderedImageFile +
+                           "\"></td>\n<td><img src=\"file://" +
+                           mExpectedImageFile +
+                           "\"></td><td><img src=\"file://" +
+                           myResultDiffImage  +
+                           "\"></td>\n</tr>\n</table>";
   //
   // Put the same info to debug too
   //
-  
-  qDebug ("Expected size: " + QString::number(myExpectedImage.width()).toLocal8Bit() + "w x " + 
-      QString::number(myExpectedImage.width()).toLocal8Bit() + "h");
-  qDebug ("Actual   size: " + QString::number(myResultImage.width()).toLocal8Bit() + "w x " + 
-      QString::number(myResultImage.width()).toLocal8Bit() + "h");
 
-  if (mMatchTarget!= myPixelCount )
+  qDebug( "Expected size: " + QString::number( myExpectedImage.width() ).toLocal8Bit() + "w x " +
+          QString::number( myExpectedImage.width() ).toLocal8Bit() + "h" );
+  qDebug( "Actual   size: " + QString::number( myResultImage.width() ).toLocal8Bit() + "w x " +
+          QString::number( myResultImage.width() ).toLocal8Bit() + "h" );
+
+  if ( mMatchTarget != myPixelCount )
   {
-    qDebug ( QString("Test image and result image for %1 are different - FAILING!").arg(theTestName).toLocal8Bit() );
+    qDebug( QString( "Test image and result image for %1 are different - FAILING!" ).arg( theTestName ).toLocal8Bit() );
     mReport += "<tr><td colspan=3>";
     mReport += "<font color=red>Expected image and result image for " + theTestName + " are different dimensions - FAILING!</font>";
     mReport += "</td></tr>";
@@ -154,55 +154,55 @@
   }
 
   //
-  // Now iterate through them counting how many 
+  // Now iterate through them counting how many
   // dissimilar pixel values there are
   //
-  
+
   mMismatchCount = 0;
-  for (int x = 0; x < myExpectedImage.width(); ++x) 
+  for ( int x = 0; x < myExpectedImage.width(); ++x )
   {
-    for (int y = 0; y < myExpectedImage.height(); ++y) 
+    for ( int y = 0; y < myExpectedImage.height(); ++y )
     {
-      QRgb myExpectedPixel = myExpectedImage.pixel(x,y);
-      QRgb myActualPixel = myResultImage.pixel(x,y);
-      if (myExpectedPixel != myActualPixel)
+      QRgb myExpectedPixel = myExpectedImage.pixel( x, y );
+      QRgb myActualPixel = myResultImage.pixel( x, y );
+      if ( myExpectedPixel != myActualPixel )
       {
         ++mMismatchCount;
-        myDifferenceImage.setPixel(x,y,qRgb(255,0,0));
+        myDifferenceImage.setPixel( x, y, qRgb( 255, 0, 0 ) );
       }
     }
   }
   //
   //save the diff image to disk
   //
-  myDifferenceImage.save (myResultDiffImage);
+  myDifferenceImage.save( myResultDiffImage );
 
   //
   // Send match result to debug
   //
-  qDebug (QString::number(mMismatchCount).toLocal8Bit() + "/" +
-      QString::number(mMatchTarget).toLocal8Bit() + 
-      " pixels mismatched");; 
+  qDebug( QString::number( mMismatchCount ).toLocal8Bit() + "/" +
+          QString::number( mMatchTarget ).toLocal8Bit() +
+          " pixels mismatched" );;
 
   //
   // Send match result to report
   //
-  mReport += "<tr><td colspan=3>" + 
-    QString::number(mMismatchCount) + "/" +
-    QString::number(mMatchTarget) + 
-    " pixels mismatched"; 
+  mReport += "<tr><td colspan=3>" +
+             QString::number( mMismatchCount ) + "/" +
+             QString::number( mMatchTarget ) +
+             " pixels mismatched";
   mReport += "</td></tr>";
 
 
-  if ( mMismatchCount==0 )
+  if ( mMismatchCount == 0 )
   {
     mReport += "<tr><td colspan = 3>\n";
     mReport += "Test image and result image for " + theTestName + " are matched<br>";
     mReport += "</td></tr>";
-    if (mElapsedTimeTarget != 0 && mElapsedTimeTarget < mElapsedTime)
+    if ( mElapsedTimeTarget != 0 && mElapsedTimeTarget < mElapsedTime )
     {
       //test failed because it took too long...
-      qDebug("Test failed because render step took too long");
+      qDebug( "Test failed because render step took too long" );
       mReport += "<tr><td colspan = 3>\n";
       mReport += "<font color=red>Test failed because render step took too long</font>";
       mReport += "</td></tr>";

Modified: trunk/qgis/tests/src/core/testqgsrasterlayer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrasterlayer.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tests/src/core/testqgsrasterlayer.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -28,12 +28,12 @@
 
 
 //qgis includes...
-#include <qgsrasterlayer.h> 
+#include <qgsrasterlayer.h>
 #include <qgsrasterpyramid.h>
-#include <qgsrasterbandstats.h> 
-#include <qgsmaplayerregistry.h> 
+#include <qgsrasterbandstats.h>
+#include <qgsmaplayerregistry.h>
 #include <qgsapplication.h>
-#include <qgsmaprenderer.h> 
+#include <qgsmaprenderer.h>
 
 //qgis unit test includes
 #include <qgsrenderchecker.h>
@@ -44,22 +44,22 @@
  */
 class TestQgsRasterLayer: public QObject
 {
-  Q_OBJECT;
+    Q_OBJECT;
   private slots:
     void initTestCase();// will be called before the first testfunction is executed.
     void cleanupTestCase();// will be called after the last testfunction was executed.
-    void init(){};// will be called before each testfunction is executed.
-    void cleanup(){};// will be called after every testfunction.
+    void init() {};// will be called before each testfunction is executed.
+    void cleanup() {};// will be called after every testfunction.
 
     void isValid();
     void pseudoColor();
     void landsatBasic();
     void landsatBasic875Qml();
-    void checkDimensions(); 
+    void checkDimensions();
     void buildExternalOverviews();
   private:
-    bool render(QString theFileName);
-    bool setQml (QString theType);
+    bool render( QString theFileName );
+    bool setQml( QString theType );
     QString mTestDataDir;
     QgsRasterLayer * mpRasterLayer;
     QgsRasterLayer * mpLandsatRasterLayer;
@@ -71,89 +71,89 @@
 void TestQgsRasterLayer::initTestCase()
 {
   // init QGIS's paths - true means that all path will be inited from prefix
-  QString qgisPath = QCoreApplication::applicationDirPath ();
-  QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
+  QString qgisPath = QCoreApplication::applicationDirPath();
+  QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
   QgsApplication::showSettings();
   //create some objects that will be used in all tests...
   //create a raster layer that will be used in all tests...
-  mTestDataDir = QString(TEST_DATA_DIR) + QDir::separator(); //defined in CmakeLists.txt
+  mTestDataDir = QString( TEST_DATA_DIR ) + QDir::separator(); //defined in CmakeLists.txt
   QString myFileName = mTestDataDir + "tenbytenraster.asc";
   QString myLandsatFileName = mTestDataDir + "landsat.tif";
-  QFileInfo myRasterFileInfo ( myFileName );
-  mpRasterLayer = new QgsRasterLayer ( myRasterFileInfo.filePath(),
-            myRasterFileInfo.completeBaseName() );
-  QFileInfo myLandsatRasterFileInfo ( myLandsatFileName );
-  mpLandsatRasterLayer = new QgsRasterLayer ( myLandsatRasterFileInfo.filePath(),
-            myLandsatRasterFileInfo.completeBaseName() );
+  QFileInfo myRasterFileInfo( myFileName );
+  mpRasterLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
+                                      myRasterFileInfo.completeBaseName() );
+  QFileInfo myLandsatRasterFileInfo( myLandsatFileName );
+  mpLandsatRasterLayer = new QgsRasterLayer( myLandsatRasterFileInfo.filePath(),
+      myLandsatRasterFileInfo.completeBaseName() );
   // Register the layer with the registry
-  QgsMapLayerRegistry::instance()->addMapLayer(mpRasterLayer);
-  QgsMapLayerRegistry::instance()->addMapLayer(mpLandsatRasterLayer);
+  QgsMapLayerRegistry::instance()->addMapLayer( mpRasterLayer );
+  QgsMapLayerRegistry::instance()->addMapLayer( mpLandsatRasterLayer );
   // add the test layer to the maprender
   mpMapRenderer = new QgsMapRenderer();
   QStringList myLayers;
   myLayers << mpRasterLayer->getLayerID();
-  mpMapRenderer->setLayerSet(myLayers);
+  mpMapRenderer->setLayerSet( myLayers );
   mReport += "<h1>Raster Layer Tests</h1>\n";
 }
 //runs after all tests
 void TestQgsRasterLayer::cleanupTestCase()
 {
   QString myReportFile = QDir::tempPath() + QDir::separator() + "rastertest.html";
-  QFile myFile ( myReportFile);
-  if ( myFile.open ( QIODevice::WriteOnly ) )
+  QFile myFile( myReportFile );
+  if ( myFile.open( QIODevice::WriteOnly ) )
   {
-    QTextStream myQTextStream ( &myFile );
+    QTextStream myQTextStream( &myFile );
     myQTextStream << mReport;
     myFile.close();
-    QDesktopServices::openUrl("file://"+myReportFile);
+    QDesktopServices::openUrl( "file://" + myReportFile );
   }
-  
+
 }
 
 void TestQgsRasterLayer::isValid()
 {
-  QVERIFY ( mpRasterLayer->isValid() );
-  mpMapRenderer->setExtent(mpRasterLayer->extent());
-  QVERIFY ( render("raster") );
+  QVERIFY( mpRasterLayer->isValid() );
+  mpMapRenderer->setExtent( mpRasterLayer->extent() );
+  QVERIFY( render( "raster" ) );
 }
 
 void TestQgsRasterLayer::pseudoColor()
 {
-  mpRasterLayer->setDrawingStyle(QgsRasterLayer::SINGLE_BAND_PSEUDO_COLOR);
-  mpRasterLayer->setColorShadingAlgorithm(QgsRasterLayer::PSEUDO_COLOR);  
+  mpRasterLayer->setDrawingStyle( QgsRasterLayer::SINGLE_BAND_PSEUDO_COLOR );
+  mpRasterLayer->setColorShadingAlgorithm( QgsRasterLayer::PSEUDO_COLOR );
   mpRasterLayer->setContrastEnhancementAlgorithm(
-      QgsContrastEnhancement::STRETCH_TO_MINMAX, false);
-  mpRasterLayer->setMinimumValue(mpRasterLayer->getGrayBandName(),0.0, false);
-  mpRasterLayer->setMaximumValue(mpRasterLayer->getGrayBandName(),10.0);
-  mpMapRenderer->setExtent(mpRasterLayer->extent());
-  QVERIFY(render("raster_pseudo"));
+    QgsContrastEnhancement::STRETCH_TO_MINMAX, false );
+  mpRasterLayer->setMinimumValue( mpRasterLayer->getGrayBandName(), 0.0, false );
+  mpRasterLayer->setMaximumValue( mpRasterLayer->getGrayBandName(), 10.0 );
+  mpMapRenderer->setExtent( mpRasterLayer->extent() );
+  QVERIFY( render( "raster_pseudo" ) );
 }
 
 void TestQgsRasterLayer::landsatBasic()
 {
   QStringList myLayers;
   myLayers << mpLandsatRasterLayer->getLayerID();
-  mpMapRenderer->setLayerSet(myLayers);
-  mpMapRenderer->setExtent(mpLandsatRasterLayer->extent());
-  QVERIFY(render("landsat_basic"));
+  mpMapRenderer->setLayerSet( myLayers );
+  mpMapRenderer->setExtent( mpLandsatRasterLayer->extent() );
+  QVERIFY( render( "landsat_basic" ) );
 }
 void TestQgsRasterLayer::landsatBasic875Qml()
 {
   //a qml that orders the rgb bands as 8,7,5
   QStringList myLayers;
   myLayers << mpLandsatRasterLayer->getLayerID();
-  mpMapRenderer->setLayerSet(myLayers);
-  mpMapRenderer->setExtent(mpLandsatRasterLayer->extent());
-  QVERIFY(setQml("875"));
-  QVERIFY(render("landsat_875"));
+  mpMapRenderer->setLayerSet( myLayers );
+  mpMapRenderer->setExtent( mpLandsatRasterLayer->extent() );
+  QVERIFY( setQml( "875" ) );
+  QVERIFY( render( "landsat_875" ) );
 }
 void TestQgsRasterLayer::checkDimensions()
 {
-   QVERIFY ( mpRasterLayer->getRasterXDim() == 10 );
-   QVERIFY ( mpRasterLayer->getRasterYDim() == 10 );
-   // regression check for ticket #832
-   // note getRasterBandStats call is base 1
-   QVERIFY ( mpRasterLayer->getRasterBandStats(1).elementCount == 100 );
+  QVERIFY( mpRasterLayer->getRasterXDim() == 10 );
+  QVERIFY( mpRasterLayer->getRasterYDim() == 10 );
+  // regression check for ticket #832
+  // note getRasterBandStats call is base 1
+  QVERIFY( mpRasterLayer->getRasterBandStats( 1 ).elementCount == 100 );
 }
 
 void TestQgsRasterLayer::buildExternalOverviews()
@@ -163,10 +163,10 @@
 
   QString myTempPath = QDir::tempPath() + QDir::separator();
   QFile::remove( myTempPath + "landsat.tif.ovr" );
-  QFile::copy( mTestDataDir + "landsat.tif" , myTempPath + "landsat.tif" );
-  QFileInfo myRasterFileInfo ( myTempPath + "landsat.tif" );
-  QgsRasterLayer * mypLayer = new QgsRasterLayer ( myRasterFileInfo.filePath(),
-            myRasterFileInfo.completeBaseName() );
+  QFile::copy( mTestDataDir + "landsat.tif", myTempPath + "landsat.tif" );
+  QFileInfo myRasterFileInfo( myTempPath + "landsat.tif" );
+  QgsRasterLayer * mypLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
+      myRasterFileInfo.completeBaseName() );
 
 
   //
@@ -178,15 +178,15 @@
   for ( int myCounterInt = 0; myCounterInt < myPyramidList.count(); myCounterInt++ )
   {
     //mark to be pyramided
-    myPyramidList[myCounterInt].existsFlag=true;
+    myPyramidList[myCounterInt].existsFlag = true;
   }
   //now actually make the pyramids
   QString myResult = mypLayer->buildPyramids(
-        myPyramidList,
-        "NEAREST",
-        myInternalFlag
-        );
-  qDebug (myResult.toLocal8Bit());
+                       myPyramidList,
+                       "NEAREST",
+                       myInternalFlag
+                     );
+  qDebug( myResult.toLocal8Bit() );
   //
   // Lets verify we have pyramids now...
   //
@@ -194,30 +194,30 @@
   for ( int myCounterInt = 0; myCounterInt < myPyramidList.count(); myCounterInt++ )
   {
     //mark to be pyramided
-    QVERIFY(myPyramidList.at(myCounterInt).existsFlag);
+    QVERIFY( myPyramidList.at( myCounterInt ).existsFlag );
   }
 
   //
   // And that they were indeed in an external file...
   //
-  QVERIFY(QFile::exists(myTempPath + "landsat.tif.ovr"));
+  QVERIFY( QFile::exists( myTempPath + "landsat.tif.ovr" ) );
   //cleanup
   delete mypLayer;
 }
-bool TestQgsRasterLayer::render(QString theTestType)
+bool TestQgsRasterLayer::render( QString theTestType )
 {
   mReport += "<h2>" + theTestType + "</h2>\n";
-  QString myDataDir (TEST_DATA_DIR); //defined in CmakeLists.txt
+  QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
   QString myTestDataDir = myDataDir + QDir::separator();
   QgsRenderChecker myChecker;
-  myChecker.setExpectedImage ( myTestDataDir + "expected_" + theTestType + ".png" );
-  myChecker.setMapRenderer ( mpMapRenderer );
-  bool myResultFlag = myChecker.runTest(theTestType);
+  myChecker.setExpectedImage( myTestDataDir + "expected_" + theTestType + ".png" );
+  myChecker.setMapRenderer( mpMapRenderer );
+  bool myResultFlag = myChecker.runTest( theTestType );
   mReport += "\n\n\n" + myChecker.report();
   return myResultFlag;
 }
 
-bool TestQgsRasterLayer::setQml (QString theType)
+bool TestQgsRasterLayer::setQml( QString theType )
 {
   //load a qml style and apply to our layer
   // huh? this is failing but shouldnt!
@@ -227,16 +227,16 @@
   //  return false;
   //}
   QString myFileName = mTestDataDir + "landsat_" + theType + ".qml";
-  bool myStyleFlag=false;
-  mpLandsatRasterLayer->loadNamedStyle ( myFileName , myStyleFlag );
-  if (!myStyleFlag)
+  bool myStyleFlag = false;
+  mpLandsatRasterLayer->loadNamedStyle( myFileName, myStyleFlag );
+  if ( !myStyleFlag )
   {
-    qDebug(" **** setQml -> mpLandsatRasterLayer is invalid");
-    qDebug("Qml File :" +  myFileName.toLocal8Bit());
+    qDebug( " **** setQml -> mpLandsatRasterLayer is invalid" );
+    qDebug( "Qml File :" +  myFileName.toLocal8Bit() );
   }
   return myStyleFlag;
 }
 
-QTEST_MAIN(TestQgsRasterLayer)
+QTEST_MAIN( TestQgsRasterLayer )
 #include "moc_testqgsrasterlayer.cxx"
 

Modified: trunk/qgis/tests/src/core/testqgsrenderers.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrenderers.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tests/src/core/testqgsrenderers.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -24,9 +24,9 @@
 
 #include <iostream>
 //qgis includes...
-#include <qgsmaprenderer.h> 
-#include <qgsmaplayer.h> 
-#include <qgsvectorlayer.h> 
+#include <qgsmaprenderer.h>
+#include <qgsmaplayer.h>
+#include <qgsvectorlayer.h>
 #include <qgsapplication.h>
 #include <qgsproviderregistry.h>
 #include <qgsmaplayerregistry.h>
@@ -38,20 +38,20 @@
  */
 class TestQgsRenderers: public QObject
 {
-  Q_OBJECT;
+    Q_OBJECT;
   private slots:
     void initTestCase();// will be called before the first testfunction is executed.
     void cleanupTestCase();// will be called after the last testfunction was executed.
-    void init(){};// will be called before each testfunction is executed.
-    void cleanup(){};// will be called after every testfunction.
+    void init() {};// will be called before each testfunction is executed.
+    void cleanup() {};// will be called after every testfunction.
 
     void singleSymbol();
     void uniqueValue();
     void graduatedSymbol();
     void continuousSymbol();
   private:
-    bool setQml (QString theType); //uniquevalue / continuous / single / 
-    bool imageCheck(QString theType); //as above
+    bool setQml( QString theType ); //uniquevalue / continuous / single /
+    bool imageCheck( QString theType ); //as above
     QgsMapRenderer * mpMapRenderer;
     QgsMapLayer * mpPointsLayer;
     QgsMapLayer * mpLinesLayer;
@@ -64,11 +64,11 @@
 void TestQgsRenderers::initTestCase()
 {
   // init QGIS's paths - true means that all path will be inited from prefix
-  QString qgisPath = QCoreApplication::applicationDirPath ();
-  QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
+  QString qgisPath = QCoreApplication::applicationDirPath();
+  QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
   QgsApplication::showSettings();
   // Instantiate the plugin directory so that providers are loaded
-  QgsProviderRegistry::instance(QgsApplication::pluginPath());
+  QgsProviderRegistry::instance( QgsApplication::pluginPath() );
 
   //create some objects that will be used in all tests...
 
@@ -80,34 +80,34 @@
   //
   //create a point layer that will be used in all tests...
   //
-  QString myDataDir (TEST_DATA_DIR); //defined in CmakeLists.txt
+  QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
   mTestDataDir = myDataDir + QDir::separator();
   QString myPointsFileName = mTestDataDir + "points.shp";
-  QFileInfo myPointFileInfo ( myPointsFileName );
-  mpPointsLayer = new QgsVectorLayer ( myPointFileInfo.filePath(),
-            myPointFileInfo.completeBaseName(), "ogr" );
+  QFileInfo myPointFileInfo( myPointsFileName );
+  mpPointsLayer = new QgsVectorLayer( myPointFileInfo.filePath(),
+                                      myPointFileInfo.completeBaseName(), "ogr" );
   // Register the layer with the registry
-  QgsMapLayerRegistry::instance()->addMapLayer(mpPointsLayer);
+  QgsMapLayerRegistry::instance()->addMapLayer( mpPointsLayer );
 
   //
   //create a poly layer that will be used in all tests...
   //
   QString myPolysFileName = mTestDataDir + "polys.shp";
-  QFileInfo myPolyFileInfo ( myPolysFileName );
-  mpPolysLayer = new QgsVectorLayer ( myPolyFileInfo.filePath(),
-            myPolyFileInfo.completeBaseName(), "ogr" );
+  QFileInfo myPolyFileInfo( myPolysFileName );
+  mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(),
+                                     myPolyFileInfo.completeBaseName(), "ogr" );
   // Register the layer with the registry
-  QgsMapLayerRegistry::instance()->addMapLayer(mpPolysLayer);
-  
+  QgsMapLayerRegistry::instance()->addMapLayer( mpPolysLayer );
+
   //
   // Create a line layer that will be used in all tests...
   //
   QString myLinesFileName = mTestDataDir + "lines.shp";
-  QFileInfo myLineFileInfo ( myLinesFileName );
-  mpLinesLayer = new QgsVectorLayer ( myLineFileInfo.filePath(),
-            myLineFileInfo.completeBaseName(), "ogr" );
+  QFileInfo myLineFileInfo( myLinesFileName );
+  mpLinesLayer = new QgsVectorLayer( myLineFileInfo.filePath(),
+                                     myLineFileInfo.completeBaseName(), "ogr" );
   // Register the layer with the registry
-  QgsMapLayerRegistry::instance()->addMapLayer(mpLinesLayer);
+  QgsMapLayerRegistry::instance()->addMapLayer( mpLinesLayer );
   //
   // We only need maprender instead of mapcanvas
   // since maprender does not require a qui
@@ -118,103 +118,103 @@
   myLayers << mpPointsLayer->getLayerID();
   myLayers << mpPolysLayer->getLayerID();
   myLayers << mpLinesLayer->getLayerID();
-  mpMapRenderer->setLayerSet(myLayers);
-  mReport+= "<h1>Vector Renderer Tests</h1>\n";
+  mpMapRenderer->setLayerSet( myLayers );
+  mReport += "<h1>Vector Renderer Tests</h1>\n";
 }
 void TestQgsRenderers::cleanupTestCase()
 {
   QString myReportFile = QDir::tempPath() + QDir::separator() + "renderertest.html";
-  QFile myFile ( myReportFile);
-  if ( myFile.open ( QIODevice::WriteOnly ) )
+  QFile myFile( myReportFile );
+  if ( myFile.open( QIODevice::WriteOnly ) )
   {
-    QTextStream myQTextStream ( &myFile );
+    QTextStream myQTextStream( &myFile );
     myQTextStream << mReport;
     myFile.close();
-    QDesktopServices::openUrl("file://"+myReportFile);
+    QDesktopServices::openUrl( "file://" + myReportFile );
   }
-  
+
 }
 
 void TestQgsRenderers::singleSymbol()
 {
-  mReport+= "<h2>Single symbol renderer test</h2>\n";
-  QVERIFY ( setQml("single") );
-  QVERIFY ( imageCheck("single"));
+  mReport += "<h2>Single symbol renderer test</h2>\n";
+  QVERIFY( setQml( "single" ) );
+  QVERIFY( imageCheck( "single" ) );
 }
 
 void TestQgsRenderers::uniqueValue()
 {
-  mReport+= "<h2>Unique value symbol renderer test</h2>\n";
-  QVERIFY ( setQml("uniquevalue") );
-  QVERIFY ( imageCheck("uniquevalue"));
+  mReport += "<h2>Unique value symbol renderer test</h2>\n";
+  QVERIFY( setQml( "uniquevalue" ) );
+  QVERIFY( imageCheck( "uniquevalue" ) );
 }
 
 void TestQgsRenderers::graduatedSymbol()
 {
-  mReport+= "<h2>Graduated symbol renderer test</h2>\n";
-  QVERIFY ( setQml("graduated") );
-  QVERIFY ( imageCheck("graduated"));
+  mReport += "<h2>Graduated symbol renderer test</h2>\n";
+  QVERIFY( setQml( "graduated" ) );
+  QVERIFY( imageCheck( "graduated" ) );
 }
 
 void TestQgsRenderers::continuousSymbol()
 {
-  mReport+= "<h2>Continuous symbol renderer test</h2>\n";
-  QVERIFY ( setQml("continuous") );
-  QVERIFY ( imageCheck("continuous"));
+  mReport += "<h2>Continuous symbol renderer test</h2>\n";
+  QVERIFY( setQml( "continuous" ) );
+  QVERIFY( imageCheck( "continuous" ) );
 }
 //
 // Private helper functions not called directly by CTest
 //
 
-bool TestQgsRenderers::setQml (QString theType)
+bool TestQgsRenderers::setQml( QString theType )
 {
   //load a qml style and apply to our layer
   //the style will correspond to the renderer
   //type we are testing
-  if (! mpPointsLayer->isValid() )
+  if ( ! mpPointsLayer->isValid() )
   {
     return false;
   }
   QString myFileName = mTestDataDir + "points_" + theType + "_symbol.qml";
-  bool myStyleFlag=false;
-  mpPointsLayer->loadNamedStyle ( myFileName , myStyleFlag );
-  if (!myStyleFlag)
+  bool myStyleFlag = false;
+  mpPointsLayer->loadNamedStyle( myFileName, myStyleFlag );
+  if ( !myStyleFlag )
   {
     return false;
   }
   else
   {
-    myStyleFlag=false; //ready for next test
+    myStyleFlag = false; //ready for next test
   }
   myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml";
-  mpPolysLayer->loadNamedStyle ( myFileName , myStyleFlag );
-  if (!myStyleFlag)
+  mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag );
+  if ( !myStyleFlag )
   {
     return false;
   }
   else
   {
-    myStyleFlag=false; //ready for next test
+    myStyleFlag = false; //ready for next test
   }
   myFileName = mTestDataDir + "lines_" + theType + "_symbol.qml";
-  mpLinesLayer->loadNamedStyle ( myFileName , myStyleFlag );
+  mpLinesLayer->loadNamedStyle( myFileName, myStyleFlag );
   return myStyleFlag;
 }
 
-bool TestQgsRenderers::imageCheck(QString theTestType)
+bool TestQgsRenderers::imageCheck( QString theTestType )
 {
-  //use the QgsRenderChecker test utility class to 
+  //use the QgsRenderChecker test utility class to
   //ensure the rendered output matches our control image
-  mpMapRenderer->setExtent(mpPointsLayer->extent());
+  mpMapRenderer->setExtent( mpPointsLayer->extent() );
   QString myExpectedImage = mTestDataDir + "expected_" + theTestType + ".png";
   QgsRenderChecker myChecker;
-  myChecker.setExpectedImage ( myExpectedImage );
-  myChecker.setMapRenderer ( mpMapRenderer );
+  myChecker.setExpectedImage( myExpectedImage );
+  myChecker.setMapRenderer( mpMapRenderer );
   bool myResultFlag = myChecker.runTest( theTestType );
   mReport += myChecker.report();
   return myResultFlag;
 }
 
-QTEST_MAIN(TestQgsRenderers)
+QTEST_MAIN( TestQgsRenderers )
 #include "moc_testqgsrenderers.cxx"
 

Modified: trunk/qgis/tools/mapserver_export/ms_main.cpp
===================================================================
--- trunk/qgis/tools/mapserver_export/ms_main.cpp	2008-08-27 11:15:41 UTC (rev 9188)
+++ trunk/qgis/tools/mapserver_export/ms_main.cpp	2008-08-27 12:57:47 UTC (rev 9189)
@@ -26,48 +26,48 @@
 {
   // Using QgsApplication instead of QApplication gives access to the
   // qgis translation files.
-  QgsApplication a( argc, argv , true);
+  QgsApplication a( argc, argv, true );
 
   // Set up the QSettings environment must be done after a is created
-  QCoreApplication::setOrganizationName("QuantumGIS");
-  QCoreApplication::setOrganizationDomain("qgis.org");
-  QCoreApplication::setApplicationName("qgis");
+  QCoreApplication::setOrganizationName( "QuantumGIS" );
+  QCoreApplication::setOrganizationDomain( "qgis.org" );
+  QCoreApplication::setApplicationName( "qgis" );
 
   // Install translations if available. Based on the code in the Qgis
-  // main.cpp file. 
+  // main.cpp file.
 
   // Let the user set the locale on the command line. If this program
   // needs to parse any more arguments, it'll be worthwhile using
   // something like getopt.
   QString translationCode;
   QStringList args = a.arguments();
-  int i = args.lastIndexOf("-h");
-  if (i != -1)
+  int i = args.lastIndexOf( "-h" );
+  if ( i != -1 )
   {
     std::cout << "Usage: msexport [--lang language]\n"
-      "\t[--lang language]\tuse language for interface text (optional)\n";
-    exit(0);
+              "\t[--lang language]\tuse language for interface text (optional)\n";
+    exit( 0 );
   }
 
-  i = args.lastIndexOf("--lang");
-  if (i != -1)
+  i = args.lastIndexOf( "--lang" );
+  if ( i != -1 )
   {
-    if (args.count() > i+1)
+    if ( args.count() > i + 1 )
       translationCode = args[i+1];
   }
 
-  if (translationCode.isEmpty())
+  if ( translationCode.isEmpty() )
     translationCode = QTextCodec::locale();
 
   QString i18nPath = QgsApplication::i18nPath();
 
   QTranslator qttor;
-  if (qttor.load("qt_" + translationCode, i18nPath))
-    a.installTranslator(&qttor);
+  if ( qttor.load( "qt_" + translationCode, i18nPath ) )
+    a.installTranslator( &qttor );
 
   QTranslator mstor;
-  if (mstor.load("qgis_" + translationCode, i18nPath))
-    a.installTranslator(&mstor);
+  if ( mstor.load( "qgis_" + translationCode, i18nPath ) )
+    a.installTranslator( &mstor );
 
   QgsMapserverExport *mse = new QgsMapserverExport();
   mse->show();



More information about the QGIS-commit mailing list