[QGIS Commit] r10595 - in trunk/qgis/src: app core gui providers/postgres providers/spatialite

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Apr 19 04:32:37 EDT 2009


Author: jef
Date: 2009-04-19 04:32:36 -0400 (Sun, 19 Apr 2009)
New Revision: 10595

Modified:
   trunk/qgis/src/app/qgsabout.cpp
   trunk/qgis/src/app/qgsattributeactiondialog.cpp
   trunk/qgis/src/app/qgsmaptooladdvertex.cpp
   trunk/qgis/src/core/qgsdatasourceuri.h
   trunk/qgis/src/core/qgsmaprenderer.cpp
   trunk/qgis/src/core/qgstolerance.cpp
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/gui/qgsmapcanvas.cpp
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
   trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp
Log:
automatic indentation update (r10488-r10594)

Modified: trunk/qgis/src/app/qgsabout.cpp
===================================================================
--- trunk/qgis/src/app/qgsabout.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/app/qgsabout.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -164,12 +164,12 @@
   if ( translatorFile.open( QIODevice::ReadOnly ) )
   {
     QString translatorHTML = ""
-                          + tr( "<p>The following have contributed to QGIS"
-                                " by translating the user interface or documentation</p>" )
-                          + "<hr>"
-                          "<table width='100%'>"
-                          "<tr><th>" + tr( "Language" ) + "</th>"
-                          "<th>" + tr( "Names" ) + "</th></tr>";
+                             + tr( "<p>The following have contributed to QGIS"
+                                   " by translating the user interface or documentation</p>" )
+                             + "<hr>"
+                             "<table width='100%'>"
+                             "<tr><th>" + tr( "Language" ) + "</th>"
+                             "<th>" + tr( "Names" ) + "</th></tr>";
     QString website;
     QTextStream translatorStream( &translatorFile );
     // Always use UTF-8

Modified: trunk/qgis/src/app/qgsattributeactiondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributeactiondialog.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/app/qgsattributeactiondialog.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -184,8 +184,8 @@
 
   if ( actionName->text().isEmpty() || actionAction->text().isEmpty() )
   {
-    QMessageBox::warning( this, tr( "Missing Information" ), 
-        tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
+    QMessageBox::warning( this, tr( "Missing Information" ),
+                          tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
 
   }
   else
@@ -216,7 +216,7 @@
       attributeActionTable->item( pos, 0 )->setText( name );
       attributeActionTable->item( pos, 1 )->setText( actionAction->text() );
       attributeActionTable->item( pos, 2 )->setCheckState(
-          captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
+        captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
     }
   }
 }

Modified: trunk/qgis/src/app/qgsmaptooladdvertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooladdvertex.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/app/qgsmaptooladdvertex.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -99,20 +99,20 @@
         //ignore the snapping results that are on features / segments already considered in mRecentSnappingResults
         QList<QgsSnappingResult> filteredSnapResults = snapResults;
         QList<QgsSnappingResult>::iterator recentIt = mRecentSnappingResults.begin();
-        for(; recentIt != mRecentSnappingResults.end(); ++recentIt)
+        for ( ; recentIt != mRecentSnappingResults.end(); ++recentIt )
         {
-            QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
-            for(; filterIt != filteredSnapResults.end(); ++filterIt)
+          QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
+          for ( ; filterIt != filteredSnapResults.end(); ++filterIt )
+          {
+            if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
+                 && filterIt->snappedVertexNr == recentIt->snappedVertexNr \
+                 && filterIt->beforeVertexNr == recentIt->beforeVertexNr )
             {
-                if(filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
-                    && filterIt->snappedVertexNr == recentIt->snappedVertexNr \
-                    && filterIt->beforeVertexNr == recentIt->beforeVertexNr )
-                {
-                    filteredSnapResults.erase(filterIt);
-                    continue;
-                }
+              filteredSnapResults.erase( filterIt );
+              continue;
+            }
 
-            }
+          }
         }
         insertSegmentVerticesForSnap( filteredSnapResults, vlayer );
       }

Modified: trunk/qgis/src/core/qgsdatasourceuri.h
===================================================================
--- trunk/qgis/src/core/qgsdatasourceuri.h	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/core/qgsdatasourceuri.h	2009-04-19 08:32:36 UTC (rev 10595)
@@ -49,7 +49,7 @@
     QString quotedTablename() const;
 
     //! Set all connection related members at once
-    //! \note This optional sslmode parameter has been added in version 1.1 
+    //! \note This optional sslmode parameter has been added in version 1.1
     void setConnection( const QString& aHost,
                         const QString& aPort,
                         const QString& aDatabase,

Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -471,7 +471,7 @@
     overlayManager->removeLayers();
   }
 
-    delete overlayManager;
+  delete overlayManager;
   // make sure progress bar arrives at 100%!
   emit drawingProgress( 1, 1 );
 

Modified: trunk/qgis/src/core/qgstolerance.cpp
===================================================================
--- trunk/qgis/src/core/qgstolerance.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/core/qgstolerance.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -60,19 +60,19 @@
   // the layer is projected. Find out how many pixels are in one map unit - either horizontal and vertical direction
   // this check might not work correctly in some cases
   // (on a large area the pixels projected around "0,0" can have different properties from the actual point)
-  QgsPoint p1 = toLayerCoordinates(layer, renderer, QPoint(0,1));
-  QgsPoint p2 = toLayerCoordinates(layer, renderer, QPoint(0,2));
-  QgsPoint p3 = toLayerCoordinates(layer, renderer, QPoint(1,0));
-  QgsPoint p4 = toLayerCoordinates(layer, renderer, QPoint(2,0));
-  double x = p1.sqrDist(p2);
-  double y = p3.sqrDist(p4);
-  if (x > y) 
+  QgsPoint p1 = toLayerCoordinates( layer, renderer, QPoint( 0, 1 ) );
+  QgsPoint p2 = toLayerCoordinates( layer, renderer, QPoint( 0, 2 ) );
+  QgsPoint p3 = toLayerCoordinates( layer, renderer, QPoint( 1, 0 ) );
+  QgsPoint p4 = toLayerCoordinates( layer, renderer, QPoint( 2, 0 ) );
+  double x = p1.sqrDist( p2 );
+  double y = p3.sqrDist( p4 );
+  if ( x > y )
   {
-    return sqrt(x);
+    return sqrt( x );
   }
   else
   {
-    return sqrt(y);
+    return sqrt( y );
   }
 }
 

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -2117,12 +2117,12 @@
   }
 
   QDomElement pkeyElem = pkeyNode.toElement();
-  if(!pkeyElem.isNull())
+  if ( !pkeyElem.isNull() )
   {
-    QString encodingString = pkeyElem.attribute("encoding");
-    if(!encodingString.isEmpty())
+    QString encodingString = pkeyElem.attribute( "encoding" );
+    if ( !encodingString.isEmpty() )
     {
-       mDataProvider->setEncoding(encodingString);
+      mDataProvider->setEncoding( encodingString );
     }
   }
 
@@ -2255,14 +2255,14 @@
   mapLayerNode.setAttribute( "geometry", QGis::qgisVectorGeometryType[geometryType()] );
 
   // add provider node
-  if(mDataProvider)
-    {
-        QDomElement provider  = document.createElement( "provider" );
-        provider.setAttribute("encoding", mDataProvider->encoding());
-        QDomText providerText = document.createTextNode( providerType() );
-        provider.appendChild( providerText );
-        layer_node.appendChild( provider );
-    }
+  if ( mDataProvider )
+  {
+    QDomElement provider  = document.createElement( "provider" );
+    provider.setAttribute( "encoding", mDataProvider->encoding() );
+    QDomText providerText = document.createTextNode( providerType() );
+    provider.appendChild( providerText );
+    layer_node.appendChild( provider );
+  }
 
   // renderer specific settings
 

Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -85,7 +85,7 @@
   setScene( mScene );
   setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
   setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
-  mLastExtentIndex=-1;
+  mLastExtentIndex = -1;
   mCurrentLayer = NULL;
   mMapOverview = NULL;
   mMapTool = NULL;
@@ -436,7 +436,7 @@
   // allow dotted names
   QString myWorldFileName = myInfo.absolutePath() + QDir::separator() + myInfo.completeBaseName() + "." + theFormat + "w";
   QFile myWorldFile( myWorldFileName );
-  if ( !myWorldFile.open( QIODevice::WriteOnly ) )	//don't use QIODevice::Text
+  if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
   {
     return;
   }
@@ -495,17 +495,17 @@
   updateScale();
   if ( mMapOverview )
     mMapOverview->drawExtentRect();
-  if (mLastExtent.size()>20) mLastExtent.removeAt(0);
+  if ( mLastExtent.size() > 20 ) mLastExtent.removeAt( 0 );
 
   //clear all extent items after current index
-  for (int i=mLastExtent.size()-1; i>mLastExtentIndex; i--)
+  for ( int i = mLastExtent.size() - 1; i > mLastExtentIndex; i-- )
   {
-	  mLastExtent.removeAt(i);
+    mLastExtent.removeAt( i );
   }
 
 
-  mLastExtent.append(extent()) ;
-  mLastExtentIndex=mLastExtent.size()-1;
+  mLastExtent.append( extent() ) ;
+  mLastExtentIndex = mLastExtent.size() - 1;
   // notify canvas items of change
   updateCanvasItemPositions();
 
@@ -552,40 +552,40 @@
 
 void QgsMapCanvas::zoomToPreviousExtent()
 {
-	 if ( mDrawing )
-	 {
-    	return;
-	 }
+  if ( mDrawing )
+  {
+    return;
+  }
 
-	if (mLastExtentIndex>1)
-	{
-		mLastExtentIndex--;
-		mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
-		emit extentsChanged();
-		updateScale();
-		if ( mMapOverview )
-			 mMapOverview->drawExtentRect();
-	}
+  if ( mLastExtentIndex > 1 )
+  {
+    mLastExtentIndex--;
+    mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
+    emit extentsChanged();
+    updateScale();
+    if ( mMapOverview )
+      mMapOverview->drawExtentRect();
+  }
 
   refresh();
 } // zoomToPreviousExtent
 
 void QgsMapCanvas::zoomToNextExtent()
 {
-	if ( mDrawing )
-	{
-	    return;
-	}
-	if (mLastExtentIndex<mLastExtent.size()-1)
-	{
-		mLastExtentIndex++;
-		mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
-		emit extentsChanged();
-		updateScale();
-		  if ( mMapOverview )
-		    mMapOverview->drawExtentRect();
-	}
-	refresh();
+  if ( mDrawing )
+  {
+    return;
+  }
+  if ( mLastExtentIndex < mLastExtent.size() - 1 )
+  {
+    mLastExtentIndex++;
+    mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
+    emit extentsChanged();
+    updateScale();
+    if ( mMapOverview )
+      mMapOverview->drawExtentRect();
+  }
+  refresh();
 }// zoomToNextExtent
 
 

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -315,7 +315,7 @@
   if ( conn->postgisVersion().isNull() )
   {
     showMessageBox( tr( "No PostGIS Support!" ),
-                    tr( "Your database has no working PostGIS support.\n") );
+                    tr( "Your database has no working PostGIS support.\n" ) );
     conn->PQfinish();
     delete conn;
     return NULL;
@@ -1743,7 +1743,7 @@
 QString QgsPostgresProvider::Conn::postgisVersion()
 {
   Result result = PQexec( "select postgis_version()" );
-  if( PQntuples( result ) != 1 ) 
+  if ( PQntuples( result ) != 1 )
   {
     QgsDebugMsg( "Retrieval of postgis version failed" );
     return QString::null;
@@ -1757,7 +1757,7 @@
 
   // Get major and minor version
   QStringList postgisVersionParts = postgisParts[0].split( ".", QString::SkipEmptyParts );
-  if( postgisVersionParts.size() < 2 )
+  if ( postgisVersionParts.size() < 2 )
   {
     QgsDebugMsg( "Could not parse postgis version" );
     return QString::null;

Modified: trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp
===================================================================
--- trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp	2009-04-18 22:47:16 UTC (rev 10594)
+++ trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp	2009-04-19 08:32:36 UTC (rev 10595)
@@ -135,7 +135,7 @@
 
   QString sql = QString( "PRAGMA table_info(%1)" ).arg( quotedValue( mTableName ) );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;
@@ -227,7 +227,7 @@
   }
   sql += QString( " FROM %1 WHERE ROWID = %2" ).arg( quotedValue( mTableName ) ).arg( featureId );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -308,7 +308,7 @@
         if ( mFetchGeom )
         {
           QString geoCol = QString( "AsBinary(%1)" ).arg( geometryColumn );
-          strcpy(geomName, geoCol.toUtf8().constData());
+          strcpy( geomName, geoCol.toUtf8().constData() );
           if ( strcasecmp( geomName, sqlite3_column_name( stmt, ic ) ) == 0 )
           {
             if ( sqlite3_column_type( stmt, ic ) == SQLITE_BLOB )
@@ -433,7 +433,7 @@
         if ( mFetchGeom )
         {
           QString geoCol = QString( "AsBinary(%1)" ).arg( geometryColumn );
-          strcpy(geomName, geoCol.toUtf8().constData());
+          strcpy( geomName, geoCol.toUtf8().constData() );
           if ( strcasecmp( geomName, sqlite3_column_name( sqliteStatement, ic ) ) == 0 )
           {
             if ( sqlite3_column_type( sqliteStatement, ic ) == SQLITE_BLOB )
@@ -553,7 +553,7 @@
 
   mFetchGeom = fetchGeometry;
   mAttributesToFetch = fetchAttributes;
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &sqliteStatement, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -660,7 +660,7 @@
 
   QString sql = QString( "SELECT Min(%1) FROM %2" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;
@@ -715,7 +715,7 @@
 
   QString sql = QString( "SELECT Max(%1) FROM %2" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;
@@ -770,7 +770,7 @@
   sql = QString( "SELECT DISTINCT %1 FROM %2 ORDER BY %1" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
 
   // SQLite prepared statement
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -852,7 +852,7 @@
     return true;
   const QgsAttributeMap & attributevec = flist[0].attributeMap();
 
-  strcpy(xSql, "BEGIN");
+  strcpy( xSql, "BEGIN" );
   int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -892,7 +892,7 @@
   sql += ")";
 
   // SQLite prepared statement
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -952,7 +952,7 @@
         QString txt = it->toString();
         int len = txt.length();
         char *vl = new char [len];
-        strcpy(vl, txt.toUtf8().constData());
+        strcpy( vl, txt.toUtf8().constData() );
         sqlite3_bind_text( stmt, ++ia, vl, len, SQLITE_TRANSIENT );
         delete [] vl;
       }
@@ -980,7 +980,7 @@
   }
   sqlite3_finalize( stmt );
 
-  strcpy(xSql, "COMMIT");
+  strcpy( xSql, "COMMIT" );
   ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1003,7 +1003,7 @@
   if ( toCommit == true )
   {
     // ROLLBACK after some previous error
-    strcpy(xSql, "ROLLBACK");
+    strcpy( xSql, "ROLLBACK" );
     sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
   }
 
@@ -1018,7 +1018,7 @@
   QString sql;
   char xSql[1024];
 
-  strcpy(xSql, "BEGIN");
+  strcpy( xSql, "BEGIN" );
   int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1030,7 +1030,7 @@
   sql = QString( "DELETE FROM %1 WHERE ROWID = ?" ).arg( quotedValue( mTableName ) );
 
   // SQLite prepared statement
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -1065,7 +1065,7 @@
   }
   sqlite3_finalize( stmt );
 
-  strcpy(xSql, "COMMIT");
+  strcpy( xSql, "COMMIT" );
   ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1089,7 +1089,7 @@
   if ( toCommit == true )
   {
     // ROLLBACK after some previous error
-    strcpy(xSql, "ROLLBACK");
+    strcpy( xSql, "ROLLBACK" );
     sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
   }
 
@@ -1103,7 +1103,7 @@
   QString sql;
   char xSql[1024];
 
-  strcpy(xSql, "BEGIN");
+  strcpy( xSql, "BEGIN" );
   int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1115,7 +1115,7 @@
   for ( QgsNewAttributesMap::const_iterator iter = name.begin(); iter != name.end(); ++iter )
   {
     sql = QString( "ALTER TABLE %1 ADD COLUMN %2 %3" ).arg( quotedValue( mTableName ) ).arg( quotedValue( iter.key() ) ).arg( iter.value() );
-    strcpy(xSql, sql.toUtf8().constData());
+    strcpy( xSql, sql.toUtf8().constData() );
     ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
     if ( ret != SQLITE_OK )
     {
@@ -1124,7 +1124,7 @@
     }
   }
 
-  strcpy(xSql, "COMMIT");
+  strcpy( xSql, "COMMIT" );
   ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1148,7 +1148,7 @@
   if ( toCommit == true )
   {
     // ROLLBACK after some previous error
-    strcpy(xSql, "ROLLBACK");
+    strcpy( xSql, "ROLLBACK" );
     sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
   }
 
@@ -1162,7 +1162,7 @@
   QString sql;
   char xSql[1024];
 
-  strcpy(xSql, "BEGIN");
+  strcpy( xSql, "BEGIN" );
   int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1198,7 +1198,7 @@
     }
     sql += QString( " WHERE ROWID=%1" ).arg( fid );
 
-    strcpy(xSql, sql.toUtf8().constData());
+    strcpy( xSql, sql.toUtf8().constData() );
     ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
     if ( ret != SQLITE_OK )
     {
@@ -1207,7 +1207,7 @@
     }
   }
 
-  strcpy(xSql, "COMMIT");
+  strcpy( xSql, "COMMIT" );
   ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1231,7 +1231,7 @@
   if ( toCommit == true )
   {
     // ROLLBACK after some previous error
-    strcpy(xSql, "ROLLBACK");
+    strcpy( xSql, "ROLLBACK" );
     sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
   }
 
@@ -1246,7 +1246,7 @@
   QString sql;
   char xSql[1024];
 
-  strcpy(xSql, "BEGIN");
+  strcpy( xSql, "BEGIN" );
   int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1260,7 +1260,7 @@
     arg( quotedValue( mTableName ) ).arg( quotedValue( geometryColumn ) ).arg( mSrid );
 
   // SQLite prepared statement
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
   {
     // some error occurred
@@ -1303,7 +1303,7 @@
   }
   sqlite3_finalize( stmt );
 
-  strcpy(xSql, "COMMIT");
+  strcpy( xSql, "COMMIT" );
   ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
   if ( ret != SQLITE_OK )
   {
@@ -1326,7 +1326,7 @@
   if ( toCommit == true )
   {
     // ROLLBACK after some previous error
-    strcpy(xSql, "ROLLBACK");
+    strcpy( xSql, "ROLLBACK" );
     sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
   }
 
@@ -1443,7 +1443,7 @@
                          " WHERE f_table_name=%1 and f_geometry_column=%2" ).arg( quotedValue( mTableName ) ).
                 arg( quotedValue( geometryColumn ) );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;
@@ -1500,7 +1500,7 @@
 
   sql = QString( "SELECT proj4text FROM spatial_ref_sys WHERE srid=%1" ).arg( mSrid );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;
@@ -1542,7 +1542,7 @@
   QString sql = QString( "SELECT Min(MbrMinX(%1)), Min(MbrMinY(%1)), "
                          "Max(MbrMaxX(%1)), Max(MbrMaxY(%1)), Count(*) " "FROM %2" ).arg( geometryColumn ).arg( quotedValue( mTableName ) );
 
-  strcpy(xSql, sql.toUtf8().constData());
+  strcpy( xSql, sql.toUtf8().constData() );
   ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
   if ( ret != SQLITE_OK )
     goto error;



More information about the QGIS-commit mailing list