diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
commit | 0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch) | |
tree | 8578dcddfce4191f3f7a142a37769df7add48475 /src/k9updatefactor.cpp | |
download | k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip |
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k9updatefactor.cpp')
-rw-r--r-- | src/k9updatefactor.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/k9updatefactor.cpp b/src/k9updatefactor.cpp new file mode 100644 index 0000000..76a99c5 --- /dev/null +++ b/src/k9updatefactor.cpp @@ -0,0 +1,43 @@ +// +// C++ Implementation: k9updatefactor +// +// Description: +// +// +// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "k9updatefactor.h" + +k9UpdateFactor::k9UpdateFactor(QObject *parent, const char *name) + : QObject(parent, name), QThread() +{ +} + + +k9UpdateFactor::~k9UpdateFactor() +{ + wait(); +} + +void k9UpdateFactor::run(){ + do { + m_restart=false; + emit updateFactor_internal(); + } while (m_restart); +} + +void k9UpdateFactor::updateFactor() { + m_mutex.lock(); + if (running()) { + m_restart=true; + } + else + start(); + m_mutex.unlock(); +} + + +#include "k9updatefactor.moc" |