mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 14:03:17 +02:00
The "Clear Disk Caches" command also clears the KTX cache (on the next restart)
This commit is contained in:
parent
7e91fe9e8b
commit
dbd9299e85
2 changed files with 11 additions and 3 deletions
|
@ -632,8 +632,16 @@ Menu::Menu() {
|
|||
QString("hifi/tablet/TabletNetworkingPreferences.qml"), "NetworkingPreferencesDialog");
|
||||
});
|
||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ReloadContent, 0, qApp, SLOT(reloadResourceCaches()));
|
||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCache, 0,
|
||||
DependencyManager::get<AssetClient>().data(), SLOT(clearCache()));
|
||||
|
||||
action = addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCaches);
|
||||
connect(action, &QAction::triggered, [] {
|
||||
// This cache is cleared immediately
|
||||
DependencyManager::get<AssetClient>()->clearCache();
|
||||
|
||||
// Clear the KTX cache on the next restart. It can't be cleared immediately because its files might be in use.
|
||||
Setting::Handle<int>(KTXCache::SETTING_VERSION_NAME, KTXCache::INVALID_VERSION).set(KTXCache::INVALID_VERSION);
|
||||
});
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(networkMenu,
|
||||
MenuOption::DisableActivityLogger,
|
||||
0,
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace MenuOption {
|
|||
const QString CalibrateCamera = "Calibrate Camera";
|
||||
const QString CenterPlayerInView = "Center Player In View";
|
||||
const QString Chat = "Chat...";
|
||||
const QString ClearDiskCache = "Clear Disk Cache";
|
||||
const QString ClearDiskCaches = "Clear Disk Caches (requires restart)";
|
||||
const QString Collisions = "Collisions";
|
||||
const QString Connexion = "Activate 3D Connexion Devices";
|
||||
const QString Console = "Console...";
|
||||
|
|
Loading…
Reference in a new issue