mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:37:58 +02:00
Using QStandardPaths for cache directory
This commit is contained in:
parent
5ac125fdd8
commit
4f1ff5b566
1 changed files with 3 additions and 1 deletions
|
@ -218,9 +218,11 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
connect(silentNodeTimer, SIGNAL(timeout()), nodeList, SLOT(removeSilentNodes()));
|
connect(silentNodeTimer, SIGNAL(timeout()), nodeList, SLOT(removeSilentNodes()));
|
||||||
silentNodeTimer->start(NODE_SILENCE_THRESHOLD_USECS / 1000);
|
silentNodeTimer->start(NODE_SILENCE_THRESHOLD_USECS / 1000);
|
||||||
|
|
||||||
|
QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||||
|
|
||||||
_networkAccessManager = new QNetworkAccessManager(this);
|
_networkAccessManager = new QNetworkAccessManager(this);
|
||||||
QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager);
|
QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager);
|
||||||
cache->setCacheDirectory("interfaceCache");
|
cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache");
|
||||||
_networkAccessManager->setCache(cache);
|
_networkAccessManager->setCache(cache);
|
||||||
|
|
||||||
_window->setCentralWidget(_glWidget);
|
_window->setCentralWidget(_glWidget);
|
||||||
|
|
Loading…
Reference in a new issue