summaryrefslogtreecommitdiff
path: root/src/history/autosaver.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
commit82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch)
tree03c1f95a2aa60c48822a463cc3812b5c3415991e /src/history/autosaver.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/history/autosaver.cpp')
-rw-r--r--src/history/autosaver.cpp16
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);