1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Use different network cache folders for each WebKit version

Fixed crashes when using cache from older QtWebKit in 2.3 version
This commit is contained in:
nowrep 2013-01-30 12:18:07 +01:00
parent 69bbca32ce
commit e9b3442ef9

View File

@ -70,6 +70,10 @@
#define NO_SYSTEM_DATAPATH
#endif
#if QT_VERSION < 0x050000
#include "qwebkitversion.h"
#endif
MainApplication::MainApplication(int &argc, char** argv)
: QtSingleApplication(argc, argv)
, m_cookiemanager(0)
@ -790,8 +794,9 @@ SearchEnginesManager* MainApplication::searchEnginesManager()
QNetworkDiskCache* MainApplication::networkCache()
{
if (!m_networkCache) {
const QString &cachePath = "networkcache/" + qWebKitVersion() + "/";
m_networkCache = new QNetworkDiskCache(this);
m_networkCache->setCacheDirectory(m_activeProfil + "/networkcache");
m_networkCache->setCacheDirectory(m_activeProfil + cachePath);
}
return m_networkCache;