Skip to content

Commit db7ce40

Browse files
committedApr 6, 2018
Fix map tile cache not working on windows for non ASCII cachefolder
This issue was found using the plugin in Subsurface There cachefolder is configured to use path to current user's AppData In my case the user name contains non ASCII char (é) The call to 'toLatin1' trans-coded the char that was then badly interpreted by QString assignment operator. See http://doc.qt.io/qt-5/qstring.html#operator-eq-5 'The byte array is converted to Unicode using the fromUtf8() function.' It resulted in Qt not being able to create the cached files: 'QIODevice::write (QFile, "C:\Users\J?r?mie\AppData\Roaming\ 'Subsurface\googlemaps\googlemaps_100-2-12-2046-1362.jpeg"): ' 'device not open' Signed-off-by: Jeremie Guichard <[email protected]>
1 parent 79f3511 commit db7ce40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎qgeotiledmappingmanagerenginegooglemaps.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ QGeoTiledMappingManagerEngineGooglemaps::QGeoTiledMappingManagerEngineGooglemaps
6262
setTileFetcher(fetcher);
6363

6464
if (parameters.contains(QStringLiteral("googlemaps.cachefolder")))
65-
m_cacheDirectory = parameters.value(QStringLiteral("googlemaps.cachefolder")).toString().toLatin1();
65+
m_cacheDirectory = parameters.value(QStringLiteral("googlemaps.cachefolder")).toString();
6666

6767
const int szCache = 100 * 1024 * 1024;
6868
#if QT_VERSION < QT_VERSION_CHECK(5,6,0)

0 commit comments

Comments
 (0)
Please sign in to comment.