Changed the name of the cache directory of the web browser to reflect the Qt and Webkit version number in order to avoid cahe trouble. 5_3_x

Fri, 31 May 2013 16:55:50 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 31 May 2013 16:55:50 +0200
branch
5_3_x
changeset 2687
33a848c5e46f
parent 2682
a9bbf0326427
child 2688
78c21583101d

Changed the name of the cache directory of the web browser to reflect the Qt and Webkit version number in order to avoid cahe trouble.

Helpviewer/Network/NetworkAccessManager.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/Network/NetworkAccessManager.py	Fri May 31 10:47:48 2013 +0200
+++ b/Helpviewer/Network/NetworkAccessManager.py	Fri May 31 16:55:50 2013 +0200
@@ -12,6 +12,7 @@
 from PyQt4.QtCore import pyqtSignal, QByteArray, qVersion
 from PyQt4.QtGui import QDialog
 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
+from PyQt4.QtWebKit import qWebKitVersion
 try:
     from PyQt4.QtNetwork import QSslCertificate, QSslConfiguration, QSslSocket, \
         QSslError, QSsl
@@ -387,7 +388,8 @@
         if NetworkDiskCache is not None:
             if Preferences.getHelp("DiskCacheEnabled"):
                 diskCache = NetworkDiskCache(self)
-                location = os.path.join(Utilities.getConfigDir(), "browser", 'cache')
+                location = os.path.join(Utilities.getConfigDir(), "browser", 'cache',
+                                        "{0}-Qt{1}".format(qWebKitVersion(), qVersion()))
                 size = Preferences.getHelp("DiskCacheSize") * 1024 * 1024
                 diskCache.setCacheDirectory(location)
                 diskCache.setMaximumCacheSize(size)

eric ide

mercurial