Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 68b1852

Browse files
committedJun 4, 2019
Fix cache dir in options
1 parent 3957a31 commit 68b1852

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/app/qgsoptions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
373373

374374
// cache settings
375375
mCacheDirectory->setText( mSettings->value( QStringLiteral( "cache/directory" ) ).toString() );
376-
mCacheDirectory->setPlaceholderText( QDir( QgsApplication::qgisSettingsDirPath() ).canonicalPath() + QDir::separator() + QStringLiteral( "cache" ) );
376+
mCacheDirectory->setPlaceholderText( QStandardPaths::writableLocation( QStandardPaths::CacheLocation ) );
377377
mCacheSize->setMinimum( 0 );
378378
mCacheSize->setMaximum( std::numeric_limits<int>::max() );
379379
mCacheSize->setSingleStep( 1024 );
380-
qint64 cacheSize = mSettings->value( QStringLiteral( "cache/size" ), 50 * 1024 * 1024 ).toULongLong();
381-
mCacheSize->setValue( ( int )( cacheSize / 1024 ) );
380+
qint64 cacheSize = mSettings->value( QStringLiteral( "cache/size" ), 50 * 1024 * 1024 ).toLongLong();
381+
mCacheSize->setValue( static_cast<int>( cacheSize / 1024 ) );
382382
connect( mBrowseCacheDirectory, &QAbstractButton::clicked, this, &QgsOptions::browseCacheDirectory );
383383
connect( mClearCache, &QAbstractButton::clicked, this, &QgsOptions::clearCache );
384384

0 commit comments

Comments
 (0)
Please sign in to comment.