summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Glebocki <mglb@arccos-1.net>2016-09-10 21:51:41 (GMT)
committerAlexandr Akulich <akulichalexander@gmail.com>2016-09-10 22:15:55 (GMT)
commit6b93b6fdf3bc0d095e4746815623571506f47c77 (patch)
tree3013fe9001551d7d615c0035fdcfe117cf1a7a65
parent4c35e126d176a5dae1b5013e6b3b5a54a96e7194 (diff)
[lib] Disable QWebView's object cache
The cache is disabled only when the "disableStyleCache" option is set. Reviewed-by: Alexandr Akulich <akulichalexander@gmail.com> REVIEW: 128884
-rw-r--r--lib/adium-theme-view.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 26e6d50..d1c93f4 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -77,6 +77,12 @@ AdiumThemeView::AdiumThemeView(QWidget *parent)
connect(jsproxy, SIGNAL(viewReady()), this, SLOT(viewLoadFinished()));
QWebSettings *ws = settings();
ws->setAttribute(QWebSettings::ZoomTextOnly, true);
+
+ KConfigGroup config(KSharedConfig::openConfig(), "KTpStyleDebug");
+ bool disableCache = config.readEntry("disableStyleCache", false);
+ if (disableCache) {
+ ws->setObjectCacheCapacities(0, 0, 0);
+ }
}
void AdiumThemeView::load(ChatType chatType) {