[vlmc-devel] [PATCH] Fix QTimer running with its interval of 0

Yikai Lu luyikei.qmltu at gmail.com
Sat Mar 5 14:08:47 CET 2016


The title says all. I fix it by setting a default interval value of 5 * 1000* 60 msec.
---
 src/Project/AutomaticBackup.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Project/AutomaticBackup.cpp b/src/Project/AutomaticBackup.cpp
index 5018a91..036f948 100644
--- a/src/Project/AutomaticBackup.cpp
+++ b/src/Project/AutomaticBackup.cpp
@@ -31,6 +31,7 @@ AutomaticBackup::AutomaticBackup( Settings* vlmcSettings, QObject *parent )
     , m_vlmcSettings( vlmcSettings )
 {
     m_timer = new QTimer( this );
+    m_timer->setInterval( 5 * 1000 * 60 );
 	SettingValue* autoBackup = m_vlmcSettings->createVar( SettingValue::Bool, "vlmc/AutomaticBackup", false,
 									 QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save" ),
 									 QT_TRANSLATE_NOOP( "PreferenceWidget", "When this option is activated,"
-- 
1.9.1



More information about the Vlmc-devel mailing list