Skip to content

Commit 091ce7c

Browse files
committed
fix indentation and some translation strings
1 parent faf1c60 commit 091ce7c

File tree

6 files changed

+146
-145
lines changed

6 files changed

+146
-145
lines changed

python/plugins/sextante/modeler/ModelerDialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def saveModel(self):
301301
f.close()
302302
self.help = None
303303
QMessageBox.information(self,
304-
self.tr("Model saving"),
304+
self.tr("Model saved"),
305305
self.tr("Model was correctly saved.")
306306
)
307307

src/providers/spatialite/qgsspatialiteconnection.cpp

+36-36
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ QgsSpatiaLiteConnection::Error QgsSpatiaLiteConnection::fetchTables( bool loadGe
8787
if ( ret == LayoutCurrent && recentVersion == false )
8888
{
8989
// obsolete library version
90-
mErrorMsg = tr( "obsolete libspatialite: connecting to this DB requires using v.4.0 (or any subsequent)" );
91-
return FailedToCheckMetadata;
90+
mErrorMsg = tr( "obsolete libspatialite: connecting to this DB requires using v.4.0 (or any subsequent)" );
91+
return FailedToCheckMetadata;
9292
}
9393

9494
#ifdef SPATIALITE_RECENT_VERSION
9595
// only if libspatialite version is >= 4.0.0
96-
// using v.4.0 Abstract Interface
97-
if (!getTableInfoAbstractInterface( handle, loadGeometrylessTables ) )
98-
{
99-
return FailedToGetTables;
100-
}
101-
closeSpatiaLiteDb( handle );
102-
return NoError;
96+
// using v.4.0 Abstract Interface
97+
if ( !getTableInfoAbstractInterface( handle, loadGeometrylessTables ) )
98+
{
99+
return FailedToGetTables;
100+
}
101+
closeSpatiaLiteDb( handle );
102+
return NoError;
103103
#endif
104104

105105
// obsolete library: still using the traditional approach
@@ -129,10 +129,10 @@ bool QgsSpatiaLiteConnection::updateStatistics()
129129
// checking the library version
130130
bool recentVersion = false;
131131
const char *version = spatialite_version();
132-
if ( isdigit(*version) && *version >= '4' )
133-
recentVersion = true;
132+
if ( isdigit( *version ) && *version >= '4' )
133+
recentVersion = true;
134134

135-
bool ret = update_layer_statistics ( handle, NULL, NULL );
135+
bool ret = update_layer_statistics( handle, NULL, NULL );
136136

137137
closeSpatiaLiteDb( handle );
138138

@@ -144,7 +144,7 @@ sqlite3 *QgsSpatiaLiteConnection::openSpatiaLiteDb( QString path )
144144
sqlite3 *handle = NULL;
145145
int ret;
146146
// activating the SpatiaLite library
147-
spatialite_init(0);
147+
spatialite_init( 0 );
148148

149149
// trying to open the SQLite DB
150150
ret = sqlite3_open_v2( path.toUtf8().constData(), &handle, SQLITE_OPEN_READWRITE, NULL );
@@ -275,7 +275,7 @@ int QgsSpatiaLiteConnection::checkHasMetadataTables( sqlite3* handle )
275275
}
276276

277277
#ifdef SPATIALITE_RECENT_VERSION
278-
// only if libspatialite version is >= 4.0.0
278+
// only if libspatialite version is >= 4.0.0
279279
bool QgsSpatiaLiteConnection::getTableInfoAbstractInterface( sqlite3 * handle, bool loadGeometrylessTables )
280280
{
281281
int ret;
@@ -289,7 +289,7 @@ bool QgsSpatiaLiteConnection::getTableInfoAbstractInterface( sqlite3 * handle, b
289289
gaiaVectorLayersListPtr list;
290290

291291
const char *version = spatialite_version();
292-
if ( isdigit(*version) && *version >= '4' )
292+
if ( isdigit( *version ) && *version >= '4' )
293293
; // OK, linked against libspatialite v.4.0 (or any subsequent)
294294
else
295295
{
@@ -298,14 +298,14 @@ bool QgsSpatiaLiteConnection::getTableInfoAbstractInterface( sqlite3 * handle, b
298298
}
299299

300300
// attempting to load the VectorLayersList
301-
list = gaiaGetVectorLayersList (handle, NULL, NULL, GAIA_VECTORS_LIST_FAST);
302-
if (list != NULL)
301+
list = gaiaGetVectorLayersList( handle, NULL, NULL, GAIA_VECTORS_LIST_FAST );
302+
if ( list != NULL )
303303
{
304304
gaiaVectorLayerPtr lyr = list->First;
305305
while ( lyr != NULL )
306306
{
307307
// populating the QGIS own Layers List
308-
if (lyr->AuthInfos)
308+
if ( lyr->AuthInfos )
309309
{
310310
if ( lyr->AuthInfos->IsHidden )
311311
{
@@ -318,39 +318,39 @@ bool QgsSpatiaLiteConnection::getTableInfoAbstractInterface( sqlite3 * handle, b
318318
QString tableName = QString::fromUtf8( lyr->TableName );
319319
QString column = QString::fromUtf8( lyr->GeometryName );
320320
QString type = tr( "UNKNOWN" );
321-
switch (lyr->GeometryType)
321+
switch ( lyr->GeometryType )
322322
{
323323
case GAIA_VECTOR_GEOMETRY:
324-
type = tr( "GEOMETRY" );
325-
break;
324+
type = tr( "GEOMETRY" );
325+
break;
326326
case GAIA_VECTOR_POINT:
327-
type = tr( "POINT" );
328-
break;
327+
type = tr( "POINT" );
328+
break;
329329
case GAIA_VECTOR_LINESTRING:
330-
type = tr( "LINESTRING" );
331-
break;
330+
type = tr( "LINESTRING" );
331+
break;
332332
case GAIA_VECTOR_POLYGON:
333-
type = tr( "POLYGON" );
334-
break;
333+
type = tr( "POLYGON" );
334+
break;
335335
case GAIA_VECTOR_MULTIPOINT:
336-
type = tr( "MULTIPOINT" );
337-
break;
336+
type = tr( "MULTIPOINT" );
337+
break;
338338
case GAIA_VECTOR_MULTILINESTRING:
339-
type = tr( "MULTILINESTRING" );
340-
break;
339+
type = tr( "MULTILINESTRING" );
340+
break;
341341
case GAIA_VECTOR_MULTIPOLYGON:
342-
type = tr( "MULTIPOLYGON" );
343-
break;
342+
type = tr( "MULTIPOLYGON" );
343+
break;
344344
case GAIA_VECTOR_GEOMETRYCOLLECTION:
345-
type = tr( "GEOMETRYCOLLECTION" );
346-
break;
345+
type = tr( "GEOMETRYCOLLECTION" );
346+
break;
347347
};
348348
mTables.append( TableEntry( tableName, column, type ) );
349349
ok = true;
350350

351351
lyr = lyr->Next;
352352
}
353-
gaiaFreeVectorLayersList (list);
353+
gaiaFreeVectorLayersList( list );
354354
}
355355

356356
if ( loadGeometrylessTables )

src/providers/spatialite/qgsspatialiteconnection.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class QgsSpatiaLiteConnection : public QObject
8686
bool getTableInfo( sqlite3 * handle, bool loadGeometrylessTables );
8787

8888
#ifdef SPATIALITE_RECENT_VERSION
89-
// only if libspatialite version is >= 4.0.0
89+
// only if libspatialite version is >= 4.0.0
9090
/**
9191
Inserts information about the spatial tables into mTables
9292
please note: this method is fully based on the Abstract Interface

0 commit comments

Comments
 (0)