Update src/providers/ogr/qgsogrprovider.cpp

Co-Authored-By: elpaso <elpaso@itopen.it>
This commit is contained in:
Matthias Kuhn 2019-02-19 15:33:07 +01:00 committed by GitHub
parent f454827397
commit adba08c8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3622,7 +3622,7 @@ QSet<QVariant> QgsOgrProvider::uniqueValues( int index, int limit ) const
QByteArray sql = "SELECT DISTINCT " + quotedIdentifier( textEncoding()->fromUnicode( fld.name() ) ); QByteArray sql = "SELECT DISTINCT " + quotedIdentifier( textEncoding()->fromUnicode( fld.name() ) );
// GPKG/SQLite fid // GPKG/SQLite fid
// For GPKG an SQLITE drivers PK fields are not exposed as real fields, (and OGR_F_GetFID only // For GPKG and SQLITE drivers PK fields are not exposed as real fields, (and OGR_F_GetFID only
// works with GPKG), so we are adding an extra column that will become index 0 // works with GPKG), so we are adding an extra column that will become index 0
// See https://issues.qgis.org/issues/21311 // See https://issues.qgis.org/issues/21311
if ( ( mGDALDriverName == QLatin1String( "GPKG" ) || mGDALDriverName == QLatin1String( "SQLite" ) ) if ( ( mGDALDriverName == QLatin1String( "GPKG" ) || mGDALDriverName == QLatin1String( "SQLite" ) )