From 8b992364c40ef4e72178e4d0a42c9ddaf7054ba4 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 22 Jan 2017 09:22:22 +0100 Subject: [PATCH] Fix setting cache maximum size --- src/lib/app/mainapplication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index b254de4c9..266c972cc 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -899,6 +899,9 @@ void MainApplication::loadSettings() const bool allowCache = settings.value(QSL("Web-Browser-Settings/AllowLocalCache"), true).toBool(); profile->setHttpCacheType(allowCache ? QWebEngineProfile::DiskHttpCache : QWebEngineProfile::MemoryHttpCache); + const int cacheSize = settings.value(QSL("Web-Browser-Settings/LocalCacheSize"), 50).toInt() * 1000 * 1000; + profile->setHttpCacheMaximumSize(cacheSize); + #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) settings.beginGroup(QSL("SpellCheck")); profile->setSpellCheckEnabled(settings.value(QSL("Enabled"), false).toBool());