Commit 31d82994 authored by Rohit Yadav's avatar Rohit Yadav

MainWindow: Clears temporary files on exit.

parent 8fcd7e5f
......@@ -577,6 +577,14 @@ MainWindow::checkFolders()
dirUtil.mkdir( VLMC_GET_STRING( "general/TempFolderLocation" ) );
}
void
MainWindow::clearTemporaryFiles()
{
QDir dirUtil;
if( dirUtil.cd( VLMC_GET_STRING( "general/TempFolderLocation" ) ) )
foreach ( const QString &file, dirUtil.entryList( QDir::Files ) )
dirUtil.remove( file );
}
//Private slots definition
......@@ -759,6 +767,7 @@ bool
MainWindow::saveSettings()
{
GUIProjectManager *pm = GUIProjectManager::getInstance();
clearTemporaryFiles();
if ( pm->askForSaveIfModified() )
{
QSettings s;
......
......@@ -68,6 +68,7 @@ private:
void createNotificationZone();
void createGlobalPreferences();
void createProjectPreferences();
void clearTemporaryFiles();
void initVlmcPreferences();
void loadVlmcPreferences( const QString& subPart );
void loadGlobalProxySettings();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment