File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ QString QgsGdalProvider::metadata()
372
372
myMetadata += tr ( " Dataset Description" );
373
373
myMetadata += " </p>\n " ;
374
374
myMetadata += " <p>" ;
375
- myMetadata += QFile::decodeName ( GDALGetDescription ( mGdalDataset ) );
375
+ myMetadata += FROM8 ( GDALGetDescription ( mGdalDataset ) );
376
376
myMetadata += " </p>\n " ;
377
377
378
378
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ class QgsRasterPyramid;
38
38
#define CPL_SUPRESS_CPLUSPLUS
39
39
#include < gdal.h>
40
40
41
+ #if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
42
+ #define TO8F (x ) (x).toUtf8().constData()
43
+ #define FROM8 (x ) QString::fromUtf8(x)
44
+ #else
45
+ #define TO8F (x ) QFile::encodeName( x ).constData()
46
+ #define FROM8 (x ) QString::fromLocal8Bit(x)
47
+ #endif
48
+
41
49
/* * \ingroup core
42
50
* A call back function for showing progress of gdal operations.
43
51
*/
You can’t perform that action at this time.
0 commit comments