-rw-r--r-- | core/apps/textedit/textedit.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 1e8ce7f..f571511 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -1219,7 +1219,5 @@ int TextEdit::savePrompt() void TextEdit::timerCrank() { - if(featureAutoSave) - { - if( edited1 ) + if(featureAutoSave && edited1) { if(currentFileName.isEmpty()) @@ -1230,5 +1228,5 @@ void TextEdit::timerCrank() else { - qDebug("autosave"); +// qDebug("autosave"); save(); } @@ -1236,5 +1234,4 @@ void TextEdit::timerCrank() } } -} void TextEdit::doTimer(bool b) @@ -1247,9 +1244,9 @@ void TextEdit::doTimer(bool b) if(b) { - qDebug("doTimer true"); +// qDebug("doTimer true"); setTimer(); } - else - qDebug("doTimer false"); +// else +// qDebug("doTimer false"); } @@ -1258,8 +1255,8 @@ void TextEdit::setTimer() if(featureAutoSave) { - qDebug("setting autosave"); +// qDebug("setting autosave"); QTimer *timer = new QTimer(this ); connect( timer, SIGNAL(timeout()), this, SLOT(timerCrank()) ); - timer->start( 30000/*0*/, true); //5 minutes + timer->start( 300000, true); //5 minutes } } |