Skip to content

Commit

Permalink
fix symbol conflict when building with static libraries (fixes #37134)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 12, 2020
1 parent c75aad0 commit 18e220a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -2516,7 +2516,7 @@ bool QgsOgrProvider::createSpatialIndex()
return false;
}

QString createIndexName( QString tableName, QString field )
QString QgsOgrProvider::createIndexName( QString tableName, QString field )
{
QRegularExpression safeExp( QStringLiteral( "[^a-zA-Z0-9]" ) );
tableName.replace( safeExp, QStringLiteral( "_" ) );
Expand Down
1 change: 1 addition & 0 deletions src/core/providers/ogr/qgsogrprovider.h
Expand Up @@ -202,6 +202,7 @@ class QgsOgrProvider final: public QgsVectorDataProvider
private:
unsigned char *getGeometryPointer( OGRFeatureH fet );
QString ogrWkbGeometryTypeName( OGRwkbGeometryType type ) const;
static QString createIndexName( QString tableName, QString field );

//! Starts a transaction if possible and return true in that case
bool startTransaction();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -4341,7 +4341,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList &flist, Flags flags )
return ret == SQLITE_OK;
}

QString createIndexName( QString tableName, QString field )
QString QgsSpatiaLiteProvider::createIndexName( QString tableName, QString field )
{
QRegularExpression safeExp( QStringLiteral( "[^a-zA-Z0-9]" ) );
tableName.replace( safeExp, QStringLiteral( "_" ) );
Expand Down
2 changes: 2 additions & 0 deletions src/providers/spatialite/qgsspatialiteprovider.h
Expand Up @@ -406,6 +406,8 @@ class QgsSpatiaLiteProvider final: public QgsVectorDataProvider
*/
sqlite3 *sqliteHandle( ) const;

static QString createIndexName( QString tableName, QString field );

friend class QgsSpatiaLiteFeatureSource;

// QgsVectorDataProvider interface
Expand Down

0 comments on commit 18e220a

Please sign in to comment.