[QGIS Commit] r10066 - in trunk/qgis: src/app src/core src/core/composer src/gui src/providers/ogr src/python tests/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jan 31 11:26:57 EST 2009


Author: jef
Date: 2009-01-31 11:26:56 -0500 (Sat, 31 Jan 2009)
New Revision: 10066

Modified:
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgisapp.h
   trunk/qgis/src/app/qgsogrsublayersdialog.cpp
   trunk/qgis/src/app/qgsogrsublayersdialog.h
   trunk/qgis/src/app/qgsserversourceselect.cpp
   trunk/qgis/src/core/composer/qgscomposermap.cpp
   trunk/qgis/src/core/qgsgeometry.cpp
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
   trunk/qgis/src/gui/qgsmapcanvas.cpp
   trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
   trunk/qgis/src/providers/ogr/qgsogrprovider.h
   trunk/qgis/src/python/qgspythonutilsimpl.cpp
   trunk/qgis/src/python/qgspythonutilsimpl.h
   trunk/qgis/tests/src/core/testqgsrenderers.cpp
Log:
automatic indentation update (r10009-r10065)

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/app/qgisapp.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -801,7 +801,7 @@
   mActionLayerSelectionSaveAs->setStatusTip( tr( "Save the selection as a shapefile" ) );
   connect( mActionLayerSelectionSaveAs, SIGNAL( triggered() ), this, SLOT( saveSelectionAsShapefile() ) );
   mActionLayerSelectionSaveAs->setEnabled( false );
-  
+
   mActionRemoveLayer = new QAction( getThemeIcon( "mActionRemoveLayer.png" ), tr( "Remove Layer" ), this );
   mActionRemoveLayer->setShortcut( tr( "Ctrl+D", "Remove a Layer" ) );
   mActionRemoveLayer->setStatusTip( tr( "Remove a Layer" ) );
@@ -2173,15 +2173,16 @@
 
       // If the newly created layer has more than 1 layer of data available, we show the
       // sublayers selection dialog so the user can select the sublayers to actually load.
-			if ( sublayers.count() > 1)
-			{
-        askUserForSublayers(layer);				
+      if ( sublayers.count() > 1 )
+      {
+        askUserForSublayers( layer );
 
-        // The first layer loaded is not usefull in that case. The user can select it in 
+        // The first layer loaded is not usefull in that case. The user can select it in
         // the list if he wants to load it.
         delete layer;
 
-			}else  // there is 1 layer of data available
+      }
+      else  // there is 1 layer of data available
       {
         // Register this layer with the layers registry
         QgsMapLayerRegistry::instance()->addMapLayer( layer );
@@ -2219,57 +2220,57 @@
 } // QgisApp::addVectorLayer()
 
 // This method is the method that does the real job. If the layer given in
-// parameter is NULL, then the method tries to act on the activeLayer. 
-void QgisApp::askUserForSublayers(QgsVectorLayer *layer)
+// parameter is NULL, then the method tries to act on the activeLayer.
+void QgisApp::askUserForSublayers( QgsVectorLayer *layer )
 {
-  if (layer == NULL)
+  if ( layer == NULL )
   {
-    if (activeLayer() == NULL || activeLayer()->type() != QgsMapLayer::VectorLayer)
+    if ( activeLayer() == NULL || activeLayer()->type() != QgsMapLayer::VectorLayer )
       return;
-    
-    layer = (QgsVectorLayer*) activeLayer();
-    if (layer->dataProvider()->name() != "ogr")
+
+    layer = ( QgsVectorLayer* ) activeLayer();
+    if ( layer->dataProvider()->name() != "ogr" )
       return;
   }
-  
+
   QStringList sublayers = layer->dataProvider()->subLayers();
 
   // We initialize a selection dialog and display it.
   QgsOGRSublayersDialog chooseSublayersDialog( this );
   chooseSublayersDialog.populateLayerTable( sublayers );
-  
-  if (chooseSublayersDialog.exec())
+
+  if ( chooseSublayersDialog.exec() )
   {
     QString uri = layer->source();
-    if ( uri.contains('&', Qt::CaseSensitive) )
+    if ( uri.contains( '&', Qt::CaseSensitive ) )
     {
       // If we get here, there are some options added to the filename.
       // A valid uri is of the form: filename&option1=value1&option2=value2,...
       // We want only the filename here, so we get the first part of the split.
-      QStringList theURIParts = uri.split("&");
+      QStringList theURIParts = uri.split( "&" );
       uri = theURIParts.at( 0 );
     }
-    
+
     // the user has done his choice
-    loadOGRSublayers(uri, chooseSublayersDialog.getSelection());
+    loadOGRSublayers( uri, chooseSublayersDialog.getSelection() );
   }
 }
 
-// This method will load with OGR the layers  in parameter. 
+// This method will load with OGR the layers  in parameter.
 // This method has been conceived to use the new URI
 // format of the ogrprovider so as to give precisions about which
 // sublayer to load into QGIS. It is normally triggered by the
 // sublayer selection dialog.
-void QgisApp::loadOGRSublayers( QString uri, QStringList list)
+void QgisApp::loadOGRSublayers( QString uri, QStringList list )
 {
   // The uri must contain the actual uri of the vectorLayer from which we are
   // going to load the sublayers.
-  QString fileName = QFileInfo(uri).baseName();
-	for (int i = 0; i < list.size(); i++)
-	{
-		QString composedURI=uri+"&layername="+list.at(i);
-		QgsVectorLayer *layer=addVectorLayer(composedURI,fileName+":"+list.at(i),"ogr");
-	}
+  QString fileName = QFileInfo( uri ).baseName();
+  for ( int i = 0; i < list.size(); i++ )
+  {
+    QString composedURI = uri + "&layername=" + list.at( i );
+    QgsVectorLayer *layer = addVectorLayer( composedURI, fileName + ":" + list.at( i ), "ogr" );
+  }
 }
 
 /** This helper checks to see whether the file name appears to be a valid vector file name */

Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/app/qgisapp.h	2009-01-31 16:26:56 UTC (rev 10066)
@@ -600,7 +600,7 @@
     /** This method will open a dialog so the user can select the sublayers
     * to load
     */
-    void askUserForSublayers(QgsVectorLayer *layer);
+    void askUserForSublayers( QgsVectorLayer *layer );
     /** Add a raster layer to the map (passed in as a ptr).
      * It won't force a refresh.
      */

Modified: trunk/qgis/src/app/qgsogrsublayersdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsogrsublayersdialog.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/app/qgsogrsublayersdialog.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -23,8 +23,8 @@
     : QDialog( parent, fl )
 {
   setupUi( this );
-  QStringList labels=QStringList() << "Layer ID" << "Layer name" << "Nb of features" << "Geometry type";
-	layersTable->setHeaderLabels(labels);
+  QStringList labels = QStringList() << "Layer ID" << "Layer name" << "Nb of features" << "Geometry type";
+  layersTable->setHeaderLabels( labels );
 }
 
 QgsOGRSublayersDialog::~QgsOGRSublayersDialog()
@@ -33,22 +33,23 @@
 
 QStringList QgsOGRSublayersDialog::getSelection()
 {
-  QStringList list=QStringList();
-  for (int i = 0; i < layersTable-> selectedItems().size(); i++)
+  QStringList list = QStringList();
+  for ( int i = 0; i < layersTable-> selectedItems().size(); i++ )
   {
-    QString theItem =layersTable-> selectedItems().at(i)->text(1);
-    list.append(theItem);
+    QString theItem = layersTable-> selectedItems().at( i )->text( 1 );
+    list.append( theItem );
   }
   return list;
 }
 
-void QgsOGRSublayersDialog::populateLayerTable (QStringList theList)
+void QgsOGRSublayersDialog::populateLayerTable( QStringList theList )
 {
-	for (int i =0; i< theList.size(); i++){
-		QString ligne = theList.at(i);
-		QStringList elements = ligne.split(":");
-    QStringList item=QStringList();
-    item << elements.at(0) << elements.at(1) << elements.at(2) << elements.at(3);
-    layersTable -> addTopLevelItem(new QTreeWidgetItem(item));
-	}	
+  for ( int i = 0; i < theList.size(); i++ )
+  {
+    QString ligne = theList.at( i );
+    QStringList elements = ligne.split( ":" );
+    QStringList item = QStringList();
+    item << elements.at( 0 ) << elements.at( 1 ) << elements.at( 2 ) << elements.at( 3 );
+    layersTable -> addTopLevelItem( new QTreeWidgetItem( item ) );
+  }
 }

Modified: trunk/qgis/src/app/qgsogrsublayersdialog.h
===================================================================
--- trunk/qgis/src/app/qgsogrsublayersdialog.h	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/app/qgsogrsublayersdialog.h	2009-01-31 16:26:56 UTC (rev 10066)
@@ -28,8 +28,8 @@
   public:
     QgsOGRSublayersDialog( QWidget* parent = 0, Qt::WFlags fl = 0 );
     ~QgsOGRSublayersDialog();
-		void populateLayerTable(QStringList theList);
-		QStringList getSelection();
+    void populateLayerTable( QStringList theList );
+    QStringList getSelection();
 
 };
 

Modified: trunk/qgis/src/app/qgsserversourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsserversourceselect.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/app/qgsserversourceselect.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -77,7 +77,7 @@
   int i = 1;
   while ( iter != m_PotentialFormats.end() )
   {
-    QRadioButton* btn = new QRadioButton(iter.value().first);
+    QRadioButton* btn = new QRadioButton( iter.value().first );
     m_imageFormatGroup->addButton( btn, iter.value().second );
     m_imageFormatLayout->addWidget( btn );
     if ( i == 1 )
@@ -584,7 +584,7 @@
   QString imageEncoding = m_PotentialFormats.key( qMakePair( label, id ) );
 
   //substitute blanks with %20 (e.g. in "image/png; mode=24bit")
-  imageEncoding.replace(QRegExp(" "), "%20");
+  imageEncoding.replace( QRegExp( " " ), "%20" );
   return imageEncoding;
 }
 

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -372,7 +372,7 @@
   mExtent = QgsRectangle( mExtent.xMinimum(), mExtent.yMinimum(), mExtent.xMaximum(), mExtent.yMinimum() + newHeight );
   mCacheUpdated = false;
   emit extentChanged();
-  if(mPreviewMode != Rectangle)
+  if ( mPreviewMode != Rectangle )
   {
     cache();
   }

Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/core/qgsgeometry.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -5453,29 +5453,29 @@
     if ( mGeos == NULL )
       return QList<QgsGeometry*>();
   }
- 
+
   int type = GEOSGeomTypeId( mGeos );
-  QgsDebugMsg("geom type: "+QString::number(type));
-  
+  QgsDebugMsg( "geom type: " + QString::number( type ) );
+
   QList<QgsGeometry*> geomCollection;
-  
+
   if ( type != GEOS_MULTIPOINT &&
        type != GEOS_MULTILINESTRING &&
        type != GEOS_MULTIPOLYGON &&
        type != GEOS_GEOMETRYCOLLECTION )
   {
     // we have a single-part geometry - put there a copy of this one
-    geomCollection.append( new QgsGeometry(*this) );
+    geomCollection.append( new QgsGeometry( *this ) );
     return geomCollection;
   }
-  
+
   int count = GEOSGetNumGeometries( mGeos );
-  QgsDebugMsg("geom count: "+QString::number(count));
+  QgsDebugMsg( "geom count: " + QString::number( count ) );
 
   for ( int i = 0; i < count; ++i )
   {
     const GEOSGeometry * geometry = GEOSGetGeometryN( mGeos, i );
-    geomCollection.append( fromGeosGeom( GEOSGeom_clone(geometry) ) );
+    geomCollection.append( fromGeosGeom( GEOSGeom_clone( geometry ) ) );
   }
 
   return geomCollection;

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -2324,7 +2324,7 @@
 
   if ( !renderer )
   {
-    errorMessage = tr("Unknown renderer");
+    errorMessage = tr( "Unknown renderer" );
     return false;
   }
 

Modified: trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
===================================================================
--- trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -122,11 +122,11 @@
   if ( theOption.state & QStyle::State_Selected )
   {
     drawHighlight( theOption, thepPainter, height( theOption, theData ) );
-    thepPainter->setPen(theOption.palette.highlightedText().color());
+    thepPainter->setPen( theOption.palette.highlightedText().color() );
   }
   else
   {
-    thepPainter->setPen(theOption.palette.text().color());
+    thepPainter->setPen( theOption.palette.text().color() );
   }
 
 

Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -431,14 +431,14 @@
   myHeader += QString::number( myRect.xMinimum() ) + "\r\n";
   //Origin Y (top left corner)
   myHeader += QString::number( myRect.yMaximum() ) + "\r\n";
-  QFileInfo myInfo  = QFileInfo(theFileName);
+  QFileInfo myInfo  = QFileInfo( theFileName );
   QString myWorldFileName = myInfo.absolutePath() + QDir::separator() + myInfo.baseName() + "." + theFormat + "w";
-  QFile myWorldFile(myWorldFileName);
-  if (!myWorldFile.open(QIODevice::WriteOnly | QIODevice::Text))
+  QFile myWorldFile( myWorldFileName );
+  if ( !myWorldFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
   {
     return;
   }
-  QTextStream myStream(&myWorldFile);
+  QTextStream myStream( &myWorldFile );
   myStream << myHeader;
 } // saveAsImage
 

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -74,30 +74,30 @@
   // message if the file is read only, because we cope with that
   // ourselves.
 
-  // This part of the code parses the uri transmitted to the ogr provider to 
+  // This part of the code parses the uri transmitted to the ogr provider to
   // get the options the client wants us to apply
 
   QString mFilePath;
   QString theLayerName;
-  int theLayerIndex=0;
+  int theLayerIndex = 0;
 
   // If there is no & in the uri, then the uri is just the filename. The loaded
   // layer will be layer 0.
-  if ( ! uri.contains('&', Qt::CaseSensitive))
+  if ( ! uri.contains( '&', Qt::CaseSensitive ) )
   {
     mFilePath = uri;
   }
   else
   {
-  // If we get here, there are some options added to the filename. We must parse
-  // the different parts separated by &, and among each option, the name and the
-  // value around the =.
-  // A valid uri is of the form: filename&option1=value1&option2=value2,...
+    // If we get here, there are some options added to the filename. We must parse
+    // the different parts separated by &, and among each option, the name and the
+    // value around the =.
+    // A valid uri is of the form: filename&option1=value1&option2=value2,...
 
- 	  QStringList theURIParts = uri.split("&");
+    QStringList theURIParts = uri.split( "&" );
     mFilePath = theURIParts.at( 0 );
 
-    for (int i = 1 ; i < theURIParts.size(); i++ )
+    for ( int i = 1 ; i < theURIParts.size(); i++ )
     {
       QStringList theInstruction = theURIParts.at( i ).split( "=" );
       if ( theInstruction.at( 0 ) == QString( "layerid" ) )
@@ -112,14 +112,14 @@
       if ( theInstruction.at( 0 ) == QString( "layername" ) )
       {
         theLayerName = theInstruction.at( 1 );
-      }				
+      }
     }
   }
 
-  QgsDebugMsg("mFilePath: " + mFilePath);
-  QgsDebugMsg("theLayerIndex: "+theLayerIndex);
-  QgsDebugMsg("theLayerName: "+theLayerName);
-	
+  QgsDebugMsg( "mFilePath: " + mFilePath );
+  QgsDebugMsg( "theLayerIndex: " + theLayerIndex );
+  QgsDebugMsg( "theLayerName: " + theLayerName );
+
   CPLPushErrorHandler( CPLQuietErrorHandler );
   ogrDataSource = OGROpen( QFile::encodeName( mFilePath ).constData(), TRUE, &ogrDriver );
   CPLPopErrorHandler();
@@ -142,7 +142,7 @@
     valid = true;
 
     ogrDriverName = OGR_Dr_GetName( ogrDriver );
-		
+
     // We get the layer which was requested by the uri. The layername
     // has precedence over the layerid if both are given.
     if ( theLayerName.isNull() )
@@ -151,7 +151,7 @@
     }
     else
     {
-      ogrLayer = OGR_DS_GetLayerByName( ogrDataSource, (char*)(theLayerName.toLocal8Bit().data()) );
+      ogrLayer = OGR_DS_GetLayerByName( ogrDataSource, ( char* )( theLayerName.toLocal8Bit().data() ) );
     }
 
     // get the extent_ (envelope) of the layer
@@ -204,19 +204,19 @@
 QStringList QgsOgrProvider::subLayers() const
 {
   QStringList theList = QStringList();
-  if (! valid )
+  if ( ! valid )
   {
     return theList;
   }
   for ( int i = 0; i < layerCount() ; i++ )
-  {  
-    QString theLayerName = QString(OGR_FD_GetName(OGR_L_GetLayerDefn(OGR_DS_GetLayer( ogrDataSource, i ))));
-    OGRwkbGeometryType layerGeomType = OGR_FD_GetGeomType(OGR_L_GetLayerDefn(OGR_DS_GetLayer( ogrDataSource, i )));
+  {
+    QString theLayerName = QString( OGR_FD_GetName( OGR_L_GetLayerDefn( OGR_DS_GetLayer( ogrDataSource, i ) ) ) );
+    OGRwkbGeometryType layerGeomType = OGR_FD_GetGeomType( OGR_L_GetLayerDefn( OGR_DS_GetLayer( ogrDataSource, i ) ) );
 
-    int theLayerFeatureCount=OGR_L_GetFeatureCount(OGR_DS_GetLayer( ogrDataSource, i ),1) ;
+    int theLayerFeatureCount = OGR_L_GetFeatureCount( OGR_DS_GetLayer( ogrDataSource, i ), 1 ) ;
 
     QString geom;
-    switch (layerGeomType)
+    switch ( layerGeomType )
     {
       case wkbUnknown:            geom = "Unknown"; break;
       case wkbPoint:              geom="Point"; break;
@@ -232,9 +232,9 @@
       case wkbMultiPoint25D:      geom="MultiPoint25D"; break;
       case wkbMultiLineString25D: geom="MultiLineString25D"; break;
       case wkbMultiPolygon25D:    geom="MultiPolygon25D"; break;
-      default: geom="Unknown WKB: " + QString::number(layerGeomType);
+      default: geom="Unknown WKB: " + QString::number( layerGeomType );
     }
-    theList.append(QString::number(i)+":"+ theLayerName+":"+QString::number(theLayerFeatureCount)+":"+geom);
+    theList.append( QString::number( i ) + ":" + theLayerName + ":" + QString::number( theLayerFeatureCount ) + ":" + geom );
   }
   return theList;
 }

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.h
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.h	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.h	2009-01-31 16:26:56 UTC (rev 10066)
@@ -47,7 +47,7 @@
 
     virtual QgsCoordinateReferenceSystem crs();
 
-	   /**
+    /**
      * Sub-layers handled by this provider, in order from bottom to top
      *
      * Sub-layers are used when the provider's source can combine layers
@@ -188,7 +188,7 @@
      *  @param index the index of the attribute
      *  @param values reference to the list of unique values */
     virtual void uniqueValues( int index, QList<QVariant> &uniqueValues );
-    
+
     /** return a provider name
 
     Essentially just returns the provider key.  Should be used to build file

Modified: trunk/qgis/src/python/qgspythonutilsimpl.cpp
===================================================================
--- trunk/qgis/src/python/qgspythonutilsimpl.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/python/qgspythonutilsimpl.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -305,7 +305,7 @@
 {
   if ( !PyErr_Occurred() )
     return false;
-  
+
   PyObject* obj_str;
   PyObject* err_type;
   PyObject* err_value;
@@ -341,13 +341,13 @@
 QString QgsPythonUtilsImpl::PyObjectToQString( PyObject* obj )
 {
   QString result;
-  
+
   // is it None?
   if ( obj == Py_None )
   {
     return QString();
   }
-  
+
   // check whether the object is already a unicode string
   if ( PyUnicode_Check( obj ) )
   {
@@ -359,31 +359,31 @@
     Py_XDECREF( utf8 );
     return result;
   }
-  
+
   // check whether the object is a classical (8-bit) string
   if ( PyString_Check( obj ) )
   {
     return QString::fromUtf8( PyString_AS_STRING( obj ) );
   }
-  
+
   // it's some other type of object:
   // convert object to unicode string (equivalent to calling unicode(obj) )
-  
+
   PyObject* obj_uni = PyObject_Unicode( obj ); // obj_uni is new reference
   if ( obj_uni )
   {
     // get utf-8 representation of unicode string (new reference)
-    PyObject* obj_utf8 = PyUnicode_AsUTF8String(obj_uni);
+    PyObject* obj_utf8 = PyUnicode_AsUTF8String( obj_uni );
     // convert from utf-8 to QString
     if ( obj_utf8 )
-      result = QString::fromUtf8(PyString_AsString( obj_utf8 ));
+      result = QString::fromUtf8( PyString_AsString( obj_utf8 ) );
     else
       result = "(qgis error)";
     Py_XDECREF( obj_utf8 );
     Py_XDECREF( obj_uni );
     return result;
   }
-  
+
   // if conversion to unicode failed, try to convert it to classic string, i.e. str(obj)
   PyObject* obj_str = PyObject_Str( obj ); // new reference
   if ( obj_str )
@@ -392,9 +392,9 @@
     Py_XDECREF( obj_str );
     return result;
   }
-  
+
   // some problem with conversion to unicode string
-  QgsDebugMsg("unable to convert PyObject to a QString!");
+  QgsDebugMsg( "unable to convert PyObject to a QString!" );
   return "(qgis error)";
 }
 

Modified: trunk/qgis/src/python/qgspythonutilsimpl.h
===================================================================
--- trunk/qgis/src/python/qgspythonutilsimpl.h	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/src/python/qgspythonutilsimpl.h	2009-01-31 16:26:56 UTC (rev 10066)
@@ -118,7 +118,7 @@
 
     //! convert python object to QString. If the object isn't unicode/str, it will be converted
     QString PyObjectToQString( PyObject* obj );
-    
+
     //! reference to module __main__
     PyObject* mMainModule;
 

Modified: trunk/qgis/tests/src/core/testqgsrenderers.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrenderers.cpp	2009-01-31 16:04:02 UTC (rev 10065)
+++ trunk/qgis/tests/src/core/testqgsrenderers.cpp	2009-01-31 16:26:56 UTC (rev 10066)
@@ -196,7 +196,7 @@
   QString error = mpPointsLayer->loadNamedStyle( myFileName, myStyleFlag );
   if ( !myStyleFlag )
   {
-    qDebug(error.toLocal8Bit().data());
+    qDebug( error.toLocal8Bit().data() );
     return false;
   }
   else



More information about the QGIS-commit mailing list