@@ -76,14 +76,14 @@ QgsOfflineEditing::QgsOfflineEditing()
76
76
* - remove remote layers
77
77
* - mark as offline project
78
78
*/
79
- bool QgsOfflineEditing::convertToOfflineProject ( const QString &offlineDataPath, const QString &offlineDbFile, const QStringList &layerIds, bool onlySelected, ContainerType dbContainerType )
79
+ bool QgsOfflineEditing::convertToOfflineProject ( const QString &offlineDataPath, const QString &offlineDbFile, const QStringList &layerIds, bool onlySelected, ContainerType containerType )
80
80
{
81
81
if ( layerIds.isEmpty () )
82
82
{
83
83
return false ;
84
84
}
85
85
QString dbPath = QDir ( offlineDataPath ).absoluteFilePath ( offlineDbFile );
86
- if ( createOfflineDb ( dbPath, dbContainerType ) )
86
+ if ( createOfflineDb ( dbPath, containerType ) )
87
87
{
88
88
spatialite_database_unique_ptr database;
89
89
int rc = database.open ( dbPath );
@@ -138,7 +138,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString &offlineDataPath,
138
138
if ( vl )
139
139
{
140
140
QString origLayerId = vl->id ();
141
- QgsVectorLayer *newLayer = copyVectorLayer ( vl, database.get (), dbPath, onlySelected, dbContainerType );
141
+ QgsVectorLayer *newLayer = copyVectorLayer ( vl, database.get (), dbPath, onlySelected, containerType );
142
142
if ( newLayer )
143
143
{
144
144
layerIdMapping.insert ( origLayerId, newLayer );
@@ -385,7 +385,7 @@ void QgsOfflineEditing::initializeSpatialMetadata( sqlite3 *sqlite_handle )
385
385
spatial_ref_sys_init ( sqlite_handle, 0 );
386
386
}
387
387
388
- bool QgsOfflineEditing::createOfflineDb ( const QString &offlineDbPath, ContainerType dbContainerType )
388
+ bool QgsOfflineEditing::createOfflineDb ( const QString &offlineDbPath, ContainerType containerType )
389
389
{
390
390
int ret;
391
391
char *errMsg = nullptr ;
@@ -407,7 +407,7 @@ bool QgsOfflineEditing::createOfflineDb( const QString &offlineDbPath, Container
407
407
QString dbPath = newDb.fileName ();
408
408
409
409
// creating geopackage
410
- if ( dbContainerType == GPKG )
410
+ if ( containerType == GPKG )
411
411
{
412
412
OGRSFDriverH hGpkgDriver = OGRGetDriverByName ( " GPKG" );
413
413
if ( !hGpkgDriver )
@@ -492,7 +492,7 @@ void QgsOfflineEditing::createLoggingTables( sqlite3 *db )
492
492
*/
493
493
}
494
494
495
- QgsVectorLayer *QgsOfflineEditing::copyVectorLayer ( QgsVectorLayer *layer, sqlite3 *db, const QString &offlineDbPath, bool onlySelected, ContainerType dbContainerType )
495
+ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer ( QgsVectorLayer *layer, sqlite3 *db, const QString &offlineDbPath, bool onlySelected, ContainerType containerType )
496
496
{
497
497
if ( !layer )
498
498
return nullptr ;
@@ -503,7 +503,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
503
503
// new layer
504
504
QgsVectorLayer *newLayer = nullptr ;
505
505
506
- if ( dbContainerType != GPKG )
506
+ if ( containerType != GPKG )
507
507
{
508
508
// create table
509
509
QString sql = QStringLiteral ( " CREATE TABLE '%1' (" ).arg ( tableName );
0 commit comments