diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-03-28 15:53:26 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-03-28 15:53:26 +0100 |
commit | a934072cf9695e46e793898102590322f43c0733 (patch) | |
tree | 6f04f558aec622c4b044fccbe1481db933f8901e /src/autosaver.cpp | |
parent | scripts (diff) | |
download | rekonq-a934072cf9695e46e793898102590322f43c0733.tar.xz |
astyle. First round..
Diffstat (limited to 'src/autosaver.cpp')
-rw-r--r-- | src/autosaver.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/autosaver.cpp b/src/autosaver.cpp index a2ec7be5..b09f35e9 100644 --- a/src/autosaver.cpp +++ b/src/autosaver.cpp @@ -52,9 +52,12 @@ void AutoSaver::changeOccurred() if (m_firstChange.isNull()) m_firstChange.start(); - if (m_firstChange.elapsed() > MAXWAIT) { + if (m_firstChange.elapsed() > MAXWAIT) + { saveIfNeccessary(); - } else { + } + else + { m_timer.start(AUTOSAVE_IN, this); } } @@ -62,9 +65,12 @@ void AutoSaver::changeOccurred() void AutoSaver::timerEvent(QTimerEvent *event) { - if (event->timerId() == m_timer.timerId()) { + if (event->timerId() == m_timer.timerId()) + { saveIfNeccessary(); - } else { + } + else + { QObject::timerEvent(event); } } @@ -76,7 +82,7 @@ void AutoSaver::saveIfNeccessary() return; m_timer.stop(); m_firstChange = QTime(); - if (!QMetaObject::invokeMethod(parent(), "save", Qt::DirectConnection)) + if (!QMetaObject::invokeMethod(parent(), "save", Qt::DirectConnection)) { kWarning() << "AutoSaver: error invoking slot save() on parent"; } |