diff options
Diffstat (limited to 'src/history/autosaver.cpp')
-rw-r--r-- | src/history/autosaver.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/history/autosaver.cpp b/src/history/autosaver.cpp index 935453d9..c490ac46 100644 --- a/src/history/autosaver.cpp +++ b/src/history/autosaver.cpp @@ -41,16 +41,16 @@ const int MAX_TIME_LIMIT = 1000 * 15; // seconds AutoSaver::AutoSaver(QObject *parent) - : QObject(parent) - , m_timer(new QBasicTimer) - , m_firstChange(new QTime) + : QObject(parent) + , m_timer(new QBasicTimer) + , m_firstChange(new QTime) { } AutoSaver::~AutoSaver() { - if (m_timer->isActive()) + if(m_timer->isActive()) kDebug() << "AutoSaver: still active when destroyed, changes not saved."; delete m_firstChange; @@ -60,17 +60,17 @@ AutoSaver::~AutoSaver() void AutoSaver::saveIfNeccessary() { - if (m_timer->isActive()) + if(m_timer->isActive()) save(); } void AutoSaver::changeOccurred() { - if (m_firstChange->isNull()) + if(m_firstChange->isNull()) m_firstChange->start(); - if (m_firstChange->elapsed() > MAX_TIME_LIMIT) + if(m_firstChange->elapsed() > MAX_TIME_LIMIT) save(); else m_timer->start(AUTOSAVE_TIME, this); @@ -79,7 +79,7 @@ void AutoSaver::changeOccurred() void AutoSaver::timerEvent(QTimerEvent *event) { - if (event->timerId() == m_timer->timerId()) + if(event->timerId() == m_timer->timerId()) save(); else QObject::timerEvent(event); |