Commit 46c8161b authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Autosave is now functionnal.

It has been deactivated by default.
parent ef64c99e
...@@ -48,7 +48,7 @@ void VLMCSettingsDefault::loadVLMCDefaults( const QString& part ) ...@@ -48,7 +48,7 @@ void VLMCSettingsDefault::loadVLMCDefaults( const QString& part )
settingsMan->setValue( part, settingsMan->setValue( part,
"VLMCWorkspace", "VLMCWorkspace",
QDir::homePath() ); QDir::homePath() );
settingsMan->setValue( part, "AutomaticBackup", true ); settingsMan->setValue( part, "AutomaticBackup", false );
settingsMan->setValue( part, "AutomaticBackupInterval", 5 ); settingsMan->setValue( part, "AutomaticBackupInterval", 5 );
return ; return ;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<string/> <string/>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -329,7 +329,7 @@ void ProjectManager::automaticSaveEnabledChanged( const QVariant& val ) ...@@ -329,7 +329,7 @@ void ProjectManager::automaticSaveEnabledChanged( const QVariant& val )
if ( enabled == true ) if ( enabled == true )
{ {
const SettingValue* interval = SettingsManager::getInstance()->getValue( "VLMC", "AutomaticBackupInterval" ); const SettingValue* interval = SettingsManager::getInstance()->getValue( "VLMC", "AutomaticBackupInterval" );
m_timer->start( interval->get().toInt() * 1000 /** 60*/ ); m_timer->start( interval->get().toInt() * 1000 * 60 );
} }
else else
m_timer->stop(); m_timer->stop();
...@@ -341,10 +341,12 @@ void ProjectManager::automaticSaveIntervalChanged( const QVariant& val ) ...@@ -341,10 +341,12 @@ void ProjectManager::automaticSaveIntervalChanged( const QVariant& val )
if ( enabled->get().toBool() == false ) if ( enabled->get().toBool() == false )
return ; return ;
m_timer->start( val.toInt() * 1000 /** 60*/ ); m_timer->start( val.toInt() * 1000 * 60 );
} }
void ProjectManager::autoSaveRequired() void ProjectManager::autoSaveRequired()
{ {
qWarning() << "Autosave required"; if ( m_projectFile == NULL )
return ;
saveProject( false );
} }
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