|
|
@ -187,13 +187,13 @@ QGCMapEngine::_wipeOldCaches() |
|
|
|
#ifdef __mobile__ |
|
|
|
#ifdef __mobile__ |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache55"); |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache55"); |
|
|
|
#else |
|
|
|
#else |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/QGCMapCache55"); |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QStringLiteral("/QGCMapCache55"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
_checkWipeDirectory(oldCacheDir); |
|
|
|
_checkWipeDirectory(oldCacheDir); |
|
|
|
#ifdef __mobile__ |
|
|
|
#ifdef __mobile__ |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache100"); |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache100"); |
|
|
|
#else |
|
|
|
#else |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/QGCMapCache100"); |
|
|
|
oldCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QStringLiteral("/QGCMapCache100"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
_checkWipeDirectory(oldCacheDir); |
|
|
|
_checkWipeDirectory(oldCacheDir); |
|
|
|
} |
|
|
|
} |
|
|
@ -208,11 +208,11 @@ QGCMapEngine::init() |
|
|
|
#ifdef __mobile__ |
|
|
|
#ifdef __mobile__ |
|
|
|
QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache" CACHE_PATH_VERSION); |
|
|
|
QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/QGCMapCache" CACHE_PATH_VERSION); |
|
|
|
#else |
|
|
|
#else |
|
|
|
QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/QGCMapCache" CACHE_PATH_VERSION); |
|
|
|
QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QStringLiteral("/QGCMapCache" CACHE_PATH_VERSION); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if(!QDir::root().mkpath(cacheDir)) { |
|
|
|
if(!QDir::root().mkpath(cacheDir)) { |
|
|
|
qWarning() << "Could not create mapping disk cache directory: " << cacheDir; |
|
|
|
qWarning() << "Could not create mapping disk cache directory: " << cacheDir; |
|
|
|
cacheDir = QDir::homePath() + QLatin1String("/.qgcmapscache/"); |
|
|
|
cacheDir = QDir::homePath() + QStringLiteral("/.qgcmapscache/"); |
|
|
|
if(!QDir::root().mkpath(cacheDir)) { |
|
|
|
if(!QDir::root().mkpath(cacheDir)) { |
|
|
|
qWarning() << "Could not create mapping disk cache directory: " << cacheDir; |
|
|
|
qWarning() << "Could not create mapping disk cache directory: " << cacheDir; |
|
|
|
cacheDir.clear(); |
|
|
|
cacheDir.clear(); |
|
|
|