Skip to content

Commit

Permalink
[BACKPORT] fix Query builder from layer properties when layer name in
Browse files Browse the repository at this point in the history
cyrrilic (fix #2435)
  • Loading branch information
alexbruy committed Dec 21, 2011
1 parent 62d03ed commit c00a529
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -351,7 +351,7 @@ bool QgsOgrProvider::setSubsetString( QString theSQL, bool updateFeatureCount )
if ( !mSubsetString.isEmpty() )
{
QString sql = QString( "SELECT * FROM %1 WHERE %2" )
.arg( quotedIdentifier( OGR_FD_GetName( OGR_L_GetLayerDefn( ogrOrigLayer ) ) ) )
.arg( quotedIdentifier( FROM8( OGR_FD_GetName( OGR_L_GetLayerDefn( ogrOrigLayer ) ) ) ) )
.arg( mSubsetString );
QgsDebugMsg( QString( "SQL: %1" ).arg( sql ) );
ogrLayer = OGR_DS_ExecuteSQL( ogrDataSource, TO8( sql ), NULL, NULL );
Expand Down Expand Up @@ -2106,7 +2106,7 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int
return; //not a provider field
}

QString theLayerName = OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) );
QString theLayerName = FROM8( OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) ) );

QString sql = QString( "SELECT DISTINCT %1 FROM %2" )
.arg( quotedIdentifier( fld.name() ) )
Expand Down

0 comments on commit c00a529

Please sign in to comment.