File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,9 @@ void GlobePlugin::run()
342
342
}
343
343
else
344
344
{
345
- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
345
+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
346
+ if ( cacheDirectory.isEmpty () )
347
+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
346
348
osgEarth::Drivers::FileSystemCacheOptions cacheOptions;
347
349
cacheOptions.rootPath () = cacheDirectory.toStdString ();
348
350
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ int QgsWFSUtils::gmCounter = 0;
37
37
QString QgsWFSUtils::getBaseCacheDirectory ( bool createIfNotExisting )
38
38
{
39
39
QSettings settings;
40
- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
40
+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
41
+ if ( cacheDirectory.isEmpty () )
42
+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
41
43
if ( createIfNotExisting )
42
44
{
43
45
QMutexLocker locker ( &gmMutex );
Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ void QgsServer::setupNetworkAccessManager()
115
115
QSettings settings;
116
116
QgsNetworkAccessManager *nam = QgsNetworkAccessManager::instance ();
117
117
QNetworkDiskCache *cache = new QNetworkDiskCache ( nullptr );
118
- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
118
+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
119
+ if ( cacheDirectory.isEmpty () )
120
+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
119
121
qint64 cacheSize = settings.value ( " cache/size" , 50 * 1024 * 1024 ).toULongLong ();
120
122
QgsMessageLog::logMessage ( QString ( " setCacheDirectory: %1" ).arg ( cacheDirectory ), " Server" , QgsMessageLog::INFO );
121
123
QgsMessageLog::logMessage ( QString ( " setMaximumCacheSize: %1" ).arg ( cacheSize ), " Server" , QgsMessageLog::INFO );
You can’t perform that action at this time.
0 commit comments