Skip to content

Commit 6779465

Browse files
author
jef
committedApr 19, 2009
automatic indentation update (r10488-r10594)
git-svn-id: http://svn.osgeo.org/qgis/trunk@10595 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 54306fb commit 6779465

File tree

10 files changed

+113
-113
lines changed

10 files changed

+113
-113
lines changed
 

‎src/app/qgsabout.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ void QgsAbout::init()
164164
if ( translatorFile.open( QIODevice::ReadOnly ) )
165165
{
166166
QString translatorHTML = ""
167-
+ tr( "<p>The following have contributed to QGIS"
168-
" by translating the user interface or documentation</p>" )
169-
+ "<hr>"
170-
"<table width='100%'>"
171-
"<tr><th>" + tr( "Language" ) + "</th>"
172-
"<th>" + tr( "Names" ) + "</th></tr>";
167+
+ tr( "<p>The following have contributed to QGIS"
168+
" by translating the user interface or documentation</p>" )
169+
+ "<hr>"
170+
"<table width='100%'>"
171+
"<tr><th>" + tr( "Language" ) + "</th>"
172+
"<th>" + tr( "Names" ) + "</th></tr>";
173173
QString website;
174174
QTextStream translatorStream( &translatorFile );
175175
// Always use UTF-8

‎src/app/qgsattributeactiondialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ void QgsAttributeActionDialog::insert( int pos )
184184

185185
if ( actionName->text().isEmpty() || actionAction->text().isEmpty() )
186186
{
187-
QMessageBox::warning( this, tr( "Missing Information" ),
188-
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
187+
QMessageBox::warning( this, tr( "Missing Information" ),
188+
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
189189

190190
}
191191
else
@@ -216,7 +216,7 @@ void QgsAttributeActionDialog::insert( int pos )
216216
attributeActionTable->item( pos, 0 )->setText( name );
217217
attributeActionTable->item( pos, 1 )->setText( actionAction->text() );
218218
attributeActionTable->item( pos, 2 )->setCheckState(
219-
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
219+
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
220220
}
221221
}
222222
}

‎src/app/qgsmaptooladdvertex.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
9999
//ignore the snapping results that are on features / segments already considered in mRecentSnappingResults
100100
QList<QgsSnappingResult> filteredSnapResults = snapResults;
101101
QList<QgsSnappingResult>::iterator recentIt = mRecentSnappingResults.begin();
102-
for(; recentIt != mRecentSnappingResults.end(); ++recentIt)
102+
for ( ; recentIt != mRecentSnappingResults.end(); ++recentIt )
103103
{
104-
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
105-
for(; filterIt != filteredSnapResults.end(); ++filterIt)
104+
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
105+
for ( ; filterIt != filteredSnapResults.end(); ++filterIt )
106+
{
107+
if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
108+
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
109+
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
106110
{
107-
if(filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
108-
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
109-
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
110-
{
111-
filteredSnapResults.erase(filterIt);
112-
continue;
113-
}
114-
111+
filteredSnapResults.erase( filterIt );
112+
continue;
115113
}
114+
115+
}
116116
}
117117
insertSegmentVerticesForSnap( filteredSnapResults, vlayer );
118118
}

‎src/core/qgsdatasourceuri.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CORE_EXPORT QgsDataSourceURI
4949
QString quotedTablename() const;
5050

5151
//! Set all connection related members at once
52-
//! \note This optional sslmode parameter has been added in version 1.1
52+
//! \note This optional sslmode parameter has been added in version 1.1
5353
void setConnection( const QString& aHost,
5454
const QString& aPort,
5555
const QString& aDatabase,

‎src/core/qgsmaprenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void QgsMapRenderer::render( QPainter* painter )
471471
overlayManager->removeLayers();
472472
}
473473

474-
delete overlayManager;
474+
delete overlayManager;
475475
// make sure progress bar arrives at 100%!
476476
emit drawingProgress( 1, 1 );
477477

‎src/core/qgstolerance.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ double QgsTolerance::computeMapUnitPerPixel( QgsMapLayer* layer, QgsMapRenderer*
6060
// the layer is projected. Find out how many pixels are in one map unit - either horizontal and vertical direction
6161
// this check might not work correctly in some cases
6262
// (on a large area the pixels projected around "0,0" can have different properties from the actual point)
63-
QgsPoint p1 = toLayerCoordinates(layer, renderer, QPoint(0,1));
64-
QgsPoint p2 = toLayerCoordinates(layer, renderer, QPoint(0,2));
65-
QgsPoint p3 = toLayerCoordinates(layer, renderer, QPoint(1,0));
66-
QgsPoint p4 = toLayerCoordinates(layer, renderer, QPoint(2,0));
67-
double x = p1.sqrDist(p2);
68-
double y = p3.sqrDist(p4);
69-
if (x > y)
63+
QgsPoint p1 = toLayerCoordinates( layer, renderer, QPoint( 0, 1 ) );
64+
QgsPoint p2 = toLayerCoordinates( layer, renderer, QPoint( 0, 2 ) );
65+
QgsPoint p3 = toLayerCoordinates( layer, renderer, QPoint( 1, 0 ) );
66+
QgsPoint p4 = toLayerCoordinates( layer, renderer, QPoint( 2, 0 ) );
67+
double x = p1.sqrDist( p2 );
68+
double y = p3.sqrDist( p4 );
69+
if ( x > y )
7070
{
71-
return sqrt(x);
71+
return sqrt( x );
7272
}
7373
else
7474
{
75-
return sqrt(y);
75+
return sqrt( y );
7676
}
7777
}
7878

‎src/core/qgsvectorlayer.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,12 +2117,12 @@ bool QgsVectorLayer::readXml( QDomNode & layer_node )
21172117
}
21182118

21192119
QDomElement pkeyElem = pkeyNode.toElement();
2120-
if(!pkeyElem.isNull())
2120+
if ( !pkeyElem.isNull() )
21212121
{
2122-
QString encodingString = pkeyElem.attribute("encoding");
2123-
if(!encodingString.isEmpty())
2122+
QString encodingString = pkeyElem.attribute( "encoding" );
2123+
if ( !encodingString.isEmpty() )
21242124
{
2125-
mDataProvider->setEncoding(encodingString);
2125+
mDataProvider->setEncoding( encodingString );
21262126
}
21272127
}
21282128

@@ -2255,14 +2255,14 @@ bool QgsVectorLayer::writeXml( QDomNode & layer_node,
22552255
mapLayerNode.setAttribute( "geometry", QGis::qgisVectorGeometryType[geometryType()] );
22562256

22572257
// add provider node
2258-
if(mDataProvider)
2259-
{
2260-
QDomElement provider = document.createElement( "provider" );
2261-
provider.setAttribute("encoding", mDataProvider->encoding());
2262-
QDomText providerText = document.createTextNode( providerType() );
2263-
provider.appendChild( providerText );
2264-
layer_node.appendChild( provider );
2265-
}
2258+
if ( mDataProvider )
2259+
{
2260+
QDomElement provider = document.createElement( "provider" );
2261+
provider.setAttribute( "encoding", mDataProvider->encoding() );
2262+
QDomText providerText = document.createTextNode( providerType() );
2263+
provider.appendChild( providerText );
2264+
layer_node.appendChild( provider );
2265+
}
22662266

22672267
// renderer specific settings
22682268

‎src/gui/qgsmapcanvas.cpp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
8585
setScene( mScene );
8686
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
8787
setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
88-
mLastExtentIndex=-1;
88+
mLastExtentIndex = -1;
8989
mCurrentLayer = NULL;
9090
mMapOverview = NULL;
9191
mMapTool = NULL;
@@ -436,7 +436,7 @@ void QgsMapCanvas::saveAsImage( QString theFileName, QPixmap * theQPixmap, QStri
436436
// allow dotted names
437437
QString myWorldFileName = myInfo.absolutePath() + QDir::separator() + myInfo.completeBaseName() + "." + theFormat + "w";
438438
QFile myWorldFile( myWorldFileName );
439-
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
439+
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
440440
{
441441
return;
442442
}
@@ -495,17 +495,17 @@ void QgsMapCanvas::setExtent( QgsRectangle const & r )
495495
updateScale();
496496
if ( mMapOverview )
497497
mMapOverview->drawExtentRect();
498-
if (mLastExtent.size()>20) mLastExtent.removeAt(0);
498+
if ( mLastExtent.size() > 20 ) mLastExtent.removeAt( 0 );
499499

500500
//clear all extent items after current index
501-
for (int i=mLastExtent.size()-1; i>mLastExtentIndex; i--)
501+
for ( int i = mLastExtent.size() - 1; i > mLastExtentIndex; i-- )
502502
{
503-
mLastExtent.removeAt(i);
503+
mLastExtent.removeAt( i );
504504
}
505505

506506

507-
mLastExtent.append(extent()) ;
508-
mLastExtentIndex=mLastExtent.size()-1;
507+
mLastExtent.append( extent() ) ;
508+
mLastExtentIndex = mLastExtent.size() - 1;
509509
// notify canvas items of change
510510
updateCanvasItemPositions();
511511

@@ -552,40 +552,40 @@ void QgsMapCanvas::zoomToFullExtent()
552552

553553
void QgsMapCanvas::zoomToPreviousExtent()
554554
{
555-
if ( mDrawing )
556-
{
557-
return;
558-
}
559-
560-
if (mLastExtentIndex>1)
561-
{
562-
mLastExtentIndex--;
563-
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
564-
emit extentsChanged();
565-
updateScale();
566-
if ( mMapOverview )
567-
mMapOverview->drawExtentRect();
568-
}
555+
if ( mDrawing )
556+
{
557+
return;
558+
}
559+
560+
if ( mLastExtentIndex > 1 )
561+
{
562+
mLastExtentIndex--;
563+
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
564+
emit extentsChanged();
565+
updateScale();
566+
if ( mMapOverview )
567+
mMapOverview->drawExtentRect();
568+
}
569569

570570
refresh();
571571
} // zoomToPreviousExtent
572572

573573
void QgsMapCanvas::zoomToNextExtent()
574574
{
575-
if ( mDrawing )
576-
{
577-
return;
578-
}
579-
if (mLastExtentIndex<mLastExtent.size()-1)
580-
{
581-
mLastExtentIndex++;
582-
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
583-
emit extentsChanged();
584-
updateScale();
585-
if ( mMapOverview )
586-
mMapOverview->drawExtentRect();
587-
}
588-
refresh();
575+
if ( mDrawing )
576+
{
577+
return;
578+
}
579+
if ( mLastExtentIndex < mLastExtent.size() - 1 )
580+
{
581+
mLastExtentIndex++;
582+
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
583+
emit extentsChanged();
584+
updateScale();
585+
if ( mMapOverview )
586+
mMapOverview->drawExtentRect();
587+
}
588+
refresh();
589589
}// zoomToNextExtent
590590

591591

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ QgsPostgresProvider::Conn *QgsPostgresProvider::Conn::connectDb( const QString &
315315
if ( conn->postgisVersion().isNull() )
316316
{
317317
showMessageBox( tr( "No PostGIS Support!" ),
318-
tr( "Your database has no working PostGIS support.\n") );
318+
tr( "Your database has no working PostGIS support.\n" ) );
319319
conn->PQfinish();
320320
delete conn;
321321
return NULL;
@@ -1743,7 +1743,7 @@ bool QgsPostgresProvider::Conn::hasGEOS()
17431743
QString QgsPostgresProvider::Conn::postgisVersion()
17441744
{
17451745
Result result = PQexec( "select postgis_version()" );
1746-
if( PQntuples( result ) != 1 )
1746+
if ( PQntuples( result ) != 1 )
17471747
{
17481748
QgsDebugMsg( "Retrieval of postgis version failed" );
17491749
return QString::null;
@@ -1757,7 +1757,7 @@ QString QgsPostgresProvider::Conn::postgisVersion()
17571757

17581758
// Get major and minor version
17591759
QStringList postgisVersionParts = postgisParts[0].split( ".", QString::SkipEmptyParts );
1760-
if( postgisVersionParts.size() < 2 )
1760+
if ( postgisVersionParts.size() < 2 )
17611761
{
17621762
QgsDebugMsg( "Could not parse postgis version" );
17631763
return QString::null;

‎src/providers/spatialite/qgsspatialiteprovider.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void QgsSpatiaLiteProvider::loadFields()
135135

136136
QString sql = QString( "PRAGMA table_info(%1)" ).arg( quotedValue( mTableName ) );
137137

138-
strcpy(xSql, sql.toUtf8().constData());
138+
strcpy( xSql, sql.toUtf8().constData() );
139139
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
140140
if ( ret != SQLITE_OK )
141141
goto error;
@@ -227,7 +227,7 @@ bool QgsSpatiaLiteProvider::featureAtId( int featureId, QgsFeature & feature, bo
227227
}
228228
sql += QString( " FROM %1 WHERE ROWID = %2" ).arg( quotedValue( mTableName ) ).arg( featureId );
229229

230-
strcpy(xSql, sql.toUtf8().constData());
230+
strcpy( xSql, sql.toUtf8().constData() );
231231
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
232232
{
233233
// some error occurred
@@ -308,7 +308,7 @@ bool QgsSpatiaLiteProvider::featureAtId( int featureId, QgsFeature & feature, bo
308308
if ( mFetchGeom )
309309
{
310310
QString geoCol = QString( "AsBinary(%1)" ).arg( geometryColumn );
311-
strcpy(geomName, geoCol.toUtf8().constData());
311+
strcpy( geomName, geoCol.toUtf8().constData() );
312312
if ( strcasecmp( geomName, sqlite3_column_name( stmt, ic ) ) == 0 )
313313
{
314314
if ( sqlite3_column_type( stmt, ic ) == SQLITE_BLOB )
@@ -433,7 +433,7 @@ bool QgsSpatiaLiteProvider::nextFeature( QgsFeature & feature )
433433
if ( mFetchGeom )
434434
{
435435
QString geoCol = QString( "AsBinary(%1)" ).arg( geometryColumn );
436-
strcpy(geomName, geoCol.toUtf8().constData());
436+
strcpy( geomName, geoCol.toUtf8().constData() );
437437
if ( strcasecmp( geomName, sqlite3_column_name( sqliteStatement, ic ) ) == 0 )
438438
{
439439
if ( sqlite3_column_type( sqliteStatement, ic ) == SQLITE_BLOB )
@@ -553,7 +553,7 @@ void QgsSpatiaLiteProvider::select( QgsAttributeList fetchAttributes, QgsRectang
553553

554554
mFetchGeom = fetchGeometry;
555555
mAttributesToFetch = fetchAttributes;
556-
strcpy(xSql, sql.toUtf8().constData());
556+
strcpy( xSql, sql.toUtf8().constData() );
557557
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &sqliteStatement, NULL ) != SQLITE_OK )
558558
{
559559
// some error occurred
@@ -660,7 +660,7 @@ QVariant QgsSpatiaLiteProvider::minimumValue( int index )
660660

661661
QString sql = QString( "SELECT Min(%1) FROM %2" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
662662

663-
strcpy(xSql, sql.toUtf8().constData());
663+
strcpy( xSql, sql.toUtf8().constData() );
664664
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
665665
if ( ret != SQLITE_OK )
666666
goto error;
@@ -715,7 +715,7 @@ QVariant QgsSpatiaLiteProvider::maximumValue( int index )
715715

716716
QString sql = QString( "SELECT Max(%1) FROM %2" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
717717

718-
strcpy(xSql, sql.toUtf8().constData());
718+
strcpy( xSql, sql.toUtf8().constData() );
719719
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
720720
if ( ret != SQLITE_OK )
721721
goto error;
@@ -770,7 +770,7 @@ void QgsSpatiaLiteProvider::uniqueValues( int index, QList < QVariant > &uniqueV
770770
sql = QString( "SELECT DISTINCT %1 FROM %2 ORDER BY %1" ).arg( fld.name() ).arg( quotedValue( mTableName ) );
771771

772772
// SQLite prepared statement
773-
strcpy(xSql, sql.toUtf8().constData());
773+
strcpy( xSql, sql.toUtf8().constData() );
774774
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
775775
{
776776
// some error occurred
@@ -852,7 +852,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
852852
return true;
853853
const QgsAttributeMap & attributevec = flist[0].attributeMap();
854854

855-
strcpy(xSql, "BEGIN");
855+
strcpy( xSql, "BEGIN" );
856856
int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
857857
if ( ret != SQLITE_OK )
858858
{
@@ -892,7 +892,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
892892
sql += ")";
893893

894894
// SQLite prepared statement
895-
strcpy(xSql, sql.toUtf8().constData());
895+
strcpy( xSql, sql.toUtf8().constData() );
896896
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
897897
{
898898
// some error occurred
@@ -952,7 +952,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
952952
QString txt = it->toString();
953953
int len = txt.length();
954954
char *vl = new char [len];
955-
strcpy(vl, txt.toUtf8().constData());
955+
strcpy( vl, txt.toUtf8().constData() );
956956
sqlite3_bind_text( stmt, ++ia, vl, len, SQLITE_TRANSIENT );
957957
delete [] vl;
958958
}
@@ -980,7 +980,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
980980
}
981981
sqlite3_finalize( stmt );
982982

983-
strcpy(xSql, "COMMIT");
983+
strcpy( xSql, "COMMIT" );
984984
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
985985
if ( ret != SQLITE_OK )
986986
{
@@ -1003,7 +1003,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
10031003
if ( toCommit == true )
10041004
{
10051005
// ROLLBACK after some previous error
1006-
strcpy(xSql, "ROLLBACK");
1006+
strcpy( xSql, "ROLLBACK" );
10071007
sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
10081008
}
10091009

@@ -1018,7 +1018,7 @@ bool QgsSpatiaLiteProvider::deleteFeatures( const QgsFeatureIds & id )
10181018
QString sql;
10191019
char xSql[1024];
10201020

1021-
strcpy(xSql, "BEGIN");
1021+
strcpy( xSql, "BEGIN" );
10221022
int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
10231023
if ( ret != SQLITE_OK )
10241024
{
@@ -1030,7 +1030,7 @@ bool QgsSpatiaLiteProvider::deleteFeatures( const QgsFeatureIds & id )
10301030
sql = QString( "DELETE FROM %1 WHERE ROWID = ?" ).arg( quotedValue( mTableName ) );
10311031

10321032
// SQLite prepared statement
1033-
strcpy(xSql, sql.toUtf8().constData());
1033+
strcpy( xSql, sql.toUtf8().constData() );
10341034
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
10351035
{
10361036
// some error occurred
@@ -1065,7 +1065,7 @@ bool QgsSpatiaLiteProvider::deleteFeatures( const QgsFeatureIds & id )
10651065
}
10661066
sqlite3_finalize( stmt );
10671067

1068-
strcpy(xSql, "COMMIT");
1068+
strcpy( xSql, "COMMIT" );
10691069
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
10701070
if ( ret != SQLITE_OK )
10711071
{
@@ -1089,7 +1089,7 @@ bool QgsSpatiaLiteProvider::deleteFeatures( const QgsFeatureIds & id )
10891089
if ( toCommit == true )
10901090
{
10911091
// ROLLBACK after some previous error
1092-
strcpy(xSql, "ROLLBACK");
1092+
strcpy( xSql, "ROLLBACK" );
10931093
sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
10941094
}
10951095

@@ -1103,7 +1103,7 @@ bool QgsSpatiaLiteProvider::addAttributes( const QgsNewAttributesMap & name )
11031103
QString sql;
11041104
char xSql[1024];
11051105

1106-
strcpy(xSql, "BEGIN");
1106+
strcpy( xSql, "BEGIN" );
11071107
int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
11081108
if ( ret != SQLITE_OK )
11091109
{
@@ -1115,7 +1115,7 @@ bool QgsSpatiaLiteProvider::addAttributes( const QgsNewAttributesMap & name )
11151115
for ( QgsNewAttributesMap::const_iterator iter = name.begin(); iter != name.end(); ++iter )
11161116
{
11171117
sql = QString( "ALTER TABLE %1 ADD COLUMN %2 %3" ).arg( quotedValue( mTableName ) ).arg( quotedValue( iter.key() ) ).arg( iter.value() );
1118-
strcpy(xSql, sql.toUtf8().constData());
1118+
strcpy( xSql, sql.toUtf8().constData() );
11191119
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
11201120
if ( ret != SQLITE_OK )
11211121
{
@@ -1124,7 +1124,7 @@ bool QgsSpatiaLiteProvider::addAttributes( const QgsNewAttributesMap & name )
11241124
}
11251125
}
11261126

1127-
strcpy(xSql, "COMMIT");
1127+
strcpy( xSql, "COMMIT" );
11281128
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
11291129
if ( ret != SQLITE_OK )
11301130
{
@@ -1148,7 +1148,7 @@ bool QgsSpatiaLiteProvider::addAttributes( const QgsNewAttributesMap & name )
11481148
if ( toCommit == true )
11491149
{
11501150
// ROLLBACK after some previous error
1151-
strcpy(xSql, "ROLLBACK");
1151+
strcpy( xSql, "ROLLBACK" );
11521152
sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
11531153
}
11541154

@@ -1162,7 +1162,7 @@ bool QgsSpatiaLiteProvider::changeAttributeValues( const QgsChangedAttributesMap
11621162
QString sql;
11631163
char xSql[1024];
11641164

1165-
strcpy(xSql, "BEGIN");
1165+
strcpy( xSql, "BEGIN" );
11661166
int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
11671167
if ( ret != SQLITE_OK )
11681168
{
@@ -1198,7 +1198,7 @@ bool QgsSpatiaLiteProvider::changeAttributeValues( const QgsChangedAttributesMap
11981198
}
11991199
sql += QString( " WHERE ROWID=%1" ).arg( fid );
12001200

1201-
strcpy(xSql, sql.toUtf8().constData());
1201+
strcpy( xSql, sql.toUtf8().constData() );
12021202
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
12031203
if ( ret != SQLITE_OK )
12041204
{
@@ -1207,7 +1207,7 @@ bool QgsSpatiaLiteProvider::changeAttributeValues( const QgsChangedAttributesMap
12071207
}
12081208
}
12091209

1210-
strcpy(xSql, "COMMIT");
1210+
strcpy( xSql, "COMMIT" );
12111211
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
12121212
if ( ret != SQLITE_OK )
12131213
{
@@ -1231,7 +1231,7 @@ bool QgsSpatiaLiteProvider::changeAttributeValues( const QgsChangedAttributesMap
12311231
if ( toCommit == true )
12321232
{
12331233
// ROLLBACK after some previous error
1234-
strcpy(xSql, "ROLLBACK");
1234+
strcpy( xSql, "ROLLBACK" );
12351235
sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
12361236
}
12371237

@@ -1246,7 +1246,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( QgsGeometryMap & geometry_map
12461246
QString sql;
12471247
char xSql[1024];
12481248

1249-
strcpy(xSql, "BEGIN");
1249+
strcpy( xSql, "BEGIN" );
12501250
int ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
12511251
if ( ret != SQLITE_OK )
12521252
{
@@ -1260,7 +1260,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( QgsGeometryMap & geometry_map
12601260
arg( quotedValue( mTableName ) ).arg( quotedValue( geometryColumn ) ).arg( mSrid );
12611261

12621262
// SQLite prepared statement
1263-
strcpy(xSql, sql.toUtf8().constData());
1263+
strcpy( xSql, sql.toUtf8().constData() );
12641264
if ( sqlite3_prepare_v2( sqliteHandle, xSql, strlen( xSql ), &stmt, NULL ) != SQLITE_OK )
12651265
{
12661266
// some error occurred
@@ -1303,7 +1303,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( QgsGeometryMap & geometry_map
13031303
}
13041304
sqlite3_finalize( stmt );
13051305

1306-
strcpy(xSql, "COMMIT");
1306+
strcpy( xSql, "COMMIT" );
13071307
ret = sqlite3_exec( sqliteHandle, xSql, NULL, NULL, &errMsg );
13081308
if ( ret != SQLITE_OK )
13091309
{
@@ -1326,7 +1326,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( QgsGeometryMap & geometry_map
13261326
if ( toCommit == true )
13271327
{
13281328
// ROLLBACK after some previous error
1329-
strcpy(xSql, "ROLLBACK");
1329+
strcpy( xSql, "ROLLBACK" );
13301330
sqlite3_exec( sqliteHandle, xSql, NULL, NULL, NULL );
13311331
}
13321332

@@ -1443,7 +1443,7 @@ bool QgsSpatiaLiteProvider::getGeometryDetails()
14431443
" WHERE f_table_name=%1 and f_geometry_column=%2" ).arg( quotedValue( mTableName ) ).
14441444
arg( quotedValue( geometryColumn ) );
14451445

1446-
strcpy(xSql, sql.toUtf8().constData());
1446+
strcpy( xSql, sql.toUtf8().constData() );
14471447
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
14481448
if ( ret != SQLITE_OK )
14491449
goto error;
@@ -1500,7 +1500,7 @@ bool QgsSpatiaLiteProvider::getGeometryDetails()
15001500

15011501
sql = QString( "SELECT proj4text FROM spatial_ref_sys WHERE srid=%1" ).arg( mSrid );
15021502

1503-
strcpy(xSql, sql.toUtf8().constData());
1503+
strcpy( xSql, sql.toUtf8().constData() );
15041504
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
15051505
if ( ret != SQLITE_OK )
15061506
goto error;
@@ -1542,7 +1542,7 @@ bool QgsSpatiaLiteProvider::getTableSummary()
15421542
QString sql = QString( "SELECT Min(MbrMinX(%1)), Min(MbrMinY(%1)), "
15431543
"Max(MbrMaxX(%1)), Max(MbrMaxY(%1)), Count(*) " "FROM %2" ).arg( geometryColumn ).arg( quotedValue( mTableName ) );
15441544

1545-
strcpy(xSql, sql.toUtf8().constData());
1545+
strcpy( xSql, sql.toUtf8().constData() );
15461546
ret = sqlite3_get_table( sqliteHandle, xSql, &results, &rows, &columns, &errMsg );
15471547
if ( ret != SQLITE_OK )
15481548
goto error;

0 commit comments

Comments
 (0)
Please sign in to comment.