mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01: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:
parent
69bbca32ce
commit
e9b3442ef9
|
@ -70,6 +70,10 @@
|
||||||
#define NO_SYSTEM_DATAPATH
|
#define NO_SYSTEM_DATAPATH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
#include "qwebkitversion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
MainApplication::MainApplication(int &argc, char** argv)
|
MainApplication::MainApplication(int &argc, char** argv)
|
||||||
: QtSingleApplication(argc, argv)
|
: QtSingleApplication(argc, argv)
|
||||||
, m_cookiemanager(0)
|
, m_cookiemanager(0)
|
||||||
|
@ -790,8 +794,9 @@ SearchEnginesManager* MainApplication::searchEnginesManager()
|
||||||
QNetworkDiskCache* MainApplication::networkCache()
|
QNetworkDiskCache* MainApplication::networkCache()
|
||||||
{
|
{
|
||||||
if (!m_networkCache) {
|
if (!m_networkCache) {
|
||||||
|
const QString &cachePath = "networkcache/" + qWebKitVersion() + "/";
|
||||||
m_networkCache = new QNetworkDiskCache(this);
|
m_networkCache = new QNetworkDiskCache(this);
|
||||||
m_networkCache->setCacheDirectory(m_activeProfil + "/networkcache");
|
m_networkCache->setCacheDirectory(m_activeProfil + cachePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_networkCache;
|
return m_networkCache;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user