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 )
settingsMan->setValue( part,
"VLMCWorkspace",
QDir::homePath() );
settingsMan->setValue( part, "AutomaticBackup", true );
settingsMan->setValue( part, "AutomaticBackup", false );
settingsMan->setValue( part, "AutomaticBackupInterval", 5 );
return ;
......
......@@ -74,7 +74,7 @@
<string/>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
......
......@@ -329,7 +329,7 @@ void ProjectManager::automaticSaveEnabledChanged( const QVariant& val )
if ( enabled == true )
{
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
m_timer->stop();
......@@ -341,10 +341,12 @@ void ProjectManager::automaticSaveIntervalChanged( const QVariant& val )
if ( enabled->get().toBool() == false )
return ;
m_timer->start( val.toInt() * 1000 /** 60*/ );
m_timer->start( val.toInt() * 1000 * 60 );
}
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