summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-02-18 19:29:56 (UTC)
committer llornkcor <llornkcor>2003-02-18 19:29:56 (UTC)
commit9f5098a6da637e81f6525482456394a68524dc61 (patch) (side-by-side diff)
tree85bfd8e545a10d0faa321c174354d0a2302e0591
parent4dd3080c36c96c58564a29f1b3d2cf21bfb1eae2 (diff)
downloadopie-9f5098a6da637e81f6525482456394a68524dc61.zip
opie-9f5098a6da637e81f6525482456394a68524dc61.tar.gz
opie-9f5098a6da637e81f6525482456394a68524dc61.tar.bz2
5 minutes, not 30 seconds
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp37
1 files changed, 17 insertions, 20 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
@@ -988,10 +988,10 @@ bool TextEdit::saveAs() {
QString str;
if( !featureAutoSave)
{
str = OFileDialog::getSaveFileName( 2,
- dire,
- filee, map);
+ dire,
+ filee, map);
}
else
str=currentFileName;
if(!str.isEmpty()) {
@@ -1217,24 +1217,21 @@ int TextEdit::savePrompt()
}
void TextEdit::timerCrank()
{
- if(featureAutoSave)
+ if(featureAutoSave && edited1)
{
- if( edited1 )
+ if(currentFileName.isEmpty())
{
- if(currentFileName.isEmpty())
- {
- currentFileName = QDir::homeDirPath()+"/textedit.tmp";
- saveAs();
- }
- else
- {
- qDebug("autosave");
- save();
- }
- setTimer();
+ currentFileName = QDir::homeDirPath()+"/textedit.tmp";
+ saveAs();
}
+ else
+ {
+// qDebug("autosave");
+ save();
+ }
+ setTimer();
}
}
void TextEdit::doTimer(bool b)
@@ -1245,21 +1242,21 @@ void TextEdit::doTimer(bool b)
featureAutoSave = b;
nAutoSave->setOn(b);
if(b)
{
- qDebug("doTimer true");
+// qDebug("doTimer true");
setTimer();
}
- else
- qDebug("doTimer false");
+// else
+// qDebug("doTimer false");
}
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
}
}