diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-03-01 12:21:40 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-03-10 18:51:23 +0000 |
commit | b7c2759118f4cc76a9cdded1e7626ac3342267e8 (patch) | |
tree | 964376cadf61edb014a034ed5093bdd0ab0a1535 | |
parent | 628cf98e820f552f228d6f71c770c293fce83a79 (diff) | |
download | qtlocation-b7c2759118f4cc76a9cdded1e7626ac3342267e8.tar.gz |
Print warning when QGeoFileTileCache::init fails creating the directory
Change-Id: I4369e71bbef0c218b35ef3449c5a1615fbf2cb4d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/location/maps/qgeofiletilecache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/location/maps/qgeofiletilecache.cpp b/src/location/maps/qgeofiletilecache.cpp index df89c889..559fc013 100644 --- a/src/location/maps/qgeofiletilecache.cpp +++ b/src/location/maps/qgeofiletilecache.cpp @@ -118,7 +118,9 @@ void QGeoFileTileCache::init() qWarning() << "Plugin uses uninitialized QGeoFileTileCache directory which was deleted during startup"; } - QDir::root().mkpath(directory_); + const bool directoryCreated = QDir::root().mkpath(directory_); + if (!directoryCreated) + qWarning() << "Failed to create cache directory " << directory_; // default values if (!isDiskCostSet_) { // If setMaxDiskUsage has not been called yet |