Skip to content

Commit 75afe3f

Browse files
committed
fix build on trusty & xenial
1 parent 381c8b6 commit 75afe3f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/providers/ogr/qgsogrprovider.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ const QgsFields & QgsOgrProvider::fields() const
11741174
}
11751175

11761176

1177-
//TODO - add sanity check for shape file layers, to include cheking to
1177+
//TODO - add sanity check for shape file layers, to include checking to
11781178
// see if the .shp, .dbf, .shx files are all present and the layer
11791179
// actually has features
11801180
bool QgsOgrProvider::isValid()
@@ -3449,7 +3449,7 @@ OGRLayerH QgsOgrProviderUtils::setSubsetString( OGRLayerH layer, OGRDataSourceH
34493449
QByteArray sql = encoding->fromUnicode( subsetString );
34503450

34513451
QgsDebugMsg( QString( "SQL: %1" ).arg( encoding->toUnicode( sql ) ) );
3452-
subsetLayer = GDALDatasetExecuteSQL( ds, sql.constData(), nullptr, nullptr );
3452+
subsetLayer = OGR_DS_ExecuteSQL( ds, sql.constData(), nullptr, nullptr );
34533453
}
34543454
else
34553455
{
@@ -3468,22 +3468,22 @@ OGRLayerH QgsOgrProviderUtils::setSubsetString( OGRLayerH layer, OGRDataSourceH
34683468

34693469
QByteArray sql = sqlPart1 + ", " + fidColumn + " as orig_ogc_fid" + sqlPart3;
34703470
QgsDebugMsg( QString( "SQL: %1" ).arg( encoding->toUnicode( sql ) ) );
3471-
subsetLayer = GDALDatasetExecuteSQL( ds, sql.constData(), nullptr, nullptr );
3471+
subsetLayer = OGR_DS_ExecuteSQL( ds, sql.constData(), nullptr, nullptr );
34723472

34733473
// See https://lists.osgeo.org/pipermail/qgis-developer/2017-September/049802.html
34743474
// If execute SQL fails because it did not find the fidColumn, retry with hardcoded FID
34753475
if ( !subsetLayer )
34763476
{
34773477
QByteArray sql = sqlPart1 + ", " + "FID as orig_ogc_fid" + sqlPart3;
34783478
QgsDebugMsg( QString( "SQL: %1" ).arg( encoding->toUnicode( sql ) ) );
3479-
subsetLayer = GDALDatasetExecuteSQL( ds, sql.constData(), nullptr, nullptr );
3479+
subsetLayer = OGR_DS_ExecuteSQL( ds, sql.constData(), nullptr, nullptr );
34803480
}
34813481
// If that also fails, just continue without the orig_ogc_fid
34823482
if ( !subsetLayer )
34833483
{
34843484
QByteArray sql = sqlPart1 + sqlPart3;
34853485
QgsDebugMsg( QString( "SQL: %1" ).arg( encoding->toUnicode( sql ) ) );
3486-
subsetLayer = GDALDatasetExecuteSQL( ds, sql.constData(), nullptr, nullptr );
3486+
subsetLayer = OGR_DS_ExecuteSQL( ds, sql.constData(), nullptr, nullptr );
34873487
origFidAddAttempted = false;
34883488
}
34893489
}

0 commit comments

Comments
 (0)