Skip to content

Commit 9aab40e

Browse files
committedJul 6, 2018
spatialite provider: fix retrieval of unicode name of spatial index on views
(cherry picked from commit fbb0b46)
1 parent 7db1535 commit 9aab40e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/providers/spatialite/qgsspatialiteprovider.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -4782,8 +4782,8 @@ void QgsSpatiaLiteProvider::getViewSpatialIndexName()
47824782
{
47834783
for ( i = 1; i <= rows; i++ )
47844784
{
4785-
mIndexTable = results[( i * columns ) + 0];
4786-
mIndexGeometry = results[( i * columns ) + 1];
4785+
mIndexTable = QString::fromUtf8(( const char * ) results[( i * columns ) + 0] );
4786+
mIndexGeometry = QString::fromUtf8(( const char * ) results[( i * columns ) + 1] );
47874787
mSpatialIndexRTree = true;
47884788
}
47894789
}
@@ -4939,8 +4939,8 @@ bool QgsSpatiaLiteProvider::getViewGeometryDetails()
49394939
QString fType = results[( i * columns ) + 0];
49404940
QString xSrid = results[( i * columns ) + 1];
49414941
QString spatialIndex = results[( i * columns ) + 2];
4942-
mIndexTable = results[( i * columns ) + 3];
4943-
mIndexGeometry = results[( i * columns ) + 4];
4942+
mIndexTable = QString::fromUtf8(( const char * ) results[( i * columns ) + 3] );
4943+
mIndexGeometry = QString::fromUtf8(( const char * ) results[( i * columns ) + 4] );
49444944

49454945
if ( fType == QLatin1String( "POINT" ) )
49464946
{

0 commit comments

Comments
 (0)
Please sign in to comment.