made auto-deleting cache on close an option
Previously we had no disk management whatsoever, so we cleared the cache on every close just to prevent clogging up tester disk space. Now that we are implementing disk management, there are better things to do on close regarding disk cache. However, some users may still wish for the app to delete the cache on close, so it's provided as an option.
This commit is contained in:
@@ -143,20 +143,11 @@ void MainWindow::ProjectOpen(Project* p)
|
||||
SetDefaultLayout();
|
||||
}
|
||||
|
||||
// FIXME: Test code
|
||||
#include <QDir>
|
||||
#include "common/filefunctions.h"
|
||||
// End test code
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
PanelManager::instance()->DeleteAllPanels();
|
||||
|
||||
// FIXME: Test code - We have no cache management and the cache is very much testing only, so we delete it on close
|
||||
// as to not clog up HDD space
|
||||
QDir(GetMediaCacheLocation()).removeRecursively();
|
||||
//QDir(GetMediaIndexLocation()).removeRecursively();
|
||||
// End test code
|
||||
|
||||
|
||||
QMainWindow::closeEvent(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user