File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ QString QgsGdalProvider::metadata()
372372 myMetadata += tr ( " Dataset Description" );
373373 myMetadata += " </p>\n " ;
374374 myMetadata += " <p>" ;
375- myMetadata += QFile::decodeName ( GDALGetDescription ( mGdalDataset ) );
375+ myMetadata += FROM8 ( GDALGetDescription ( mGdalDataset ) );
376376 myMetadata += " </p>\n " ;
377377
378378
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ class QgsRasterPyramid;
3838#define CPL_SUPRESS_CPLUSPLUS
3939#include < gdal.h>
4040
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+
4149/* * \ingroup core
4250 * A call back function for showing progress of gdal operations.
4351 */
You can’t perform that action at this time.
0 commit comments