summaryrefslogtreecommitdiff
path: root/fbdaemon
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-11-05 00:02:49 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-11-05 00:02:49 (GMT)
commit59d74196aefa31f3a24969179b1bbfac12138980 (patch)
tree3113b5c80a6609215e6b39eee7323fed7ccedc8d /fbdaemon
parent51ed0b5b899caf806a4429e32a9d78391d49f048 (diff)
downloadkolab-utils-59d74196aefa31f3a24969179b1bbfac12138980.tar.gz
Fixed the progress tracking.
Diffstat (limited to 'fbdaemon')
-rw-r--r--fbdaemon/fbcoordinator.cpp17
-rw-r--r--fbdaemon/fbcoordinator.h1
2 files changed, 12 insertions, 6 deletions
diff --git a/fbdaemon/fbcoordinator.cpp b/fbdaemon/fbcoordinator.cpp
index 86da467..a138d50 100644
--- a/fbdaemon/fbcoordinator.cpp
+++ b/fbdaemon/fbcoordinator.cpp
@@ -84,7 +84,7 @@ void FBCoordinator::onGotUserList(KJob *job)
}
mTotalUsers = mUserQueue.size();
Debug() << "Found " << mUserQueue.size() << " users";
- onGeneratorDone(getUsersJob);
+ continueProcessing();
}
bool FBCoordinator::processQueue()
@@ -98,6 +98,15 @@ bool FBCoordinator::processQueue()
return true;
}
+void FBCoordinator::continueProcessing()
+{
+ if (processQueue()) {
+ return;
+ }
+ Debug() << "All done. Total time elapsed [s]: " << static_cast<double>(mTimer.elapsed())/1000.0;
+ emit quit();
+}
+
void FBCoordinator::generateAllForUser(const QString& user)
{
if (!mTimerIsRunning) {
@@ -143,11 +152,7 @@ void FBCoordinator::onGeneratorDone(KJob */*job*/)
Debug() << "Time elapsed for user [s]: " << static_cast<double>(mUserTimer.elapsed())/1000.0;
Debug() << mProgressCounter << " out of " << mTotalUsers;
}
- if (processQueue()) {
- return;
- }
- Debug() << "All done. Total time elapsed [s]: " << static_cast<double>(mTimer.elapsed())/1000.0;
- emit quit();
+ continueProcessing();
}
diff --git a/fbdaemon/fbcoordinator.h b/fbdaemon/fbcoordinator.h
index f0fcf05..a2bc611 100644
--- a/fbdaemon/fbcoordinator.h
+++ b/fbdaemon/fbcoordinator.h
@@ -59,6 +59,7 @@ private slots:
public slots:
void onGotUserList(KJob*);
private:
+ void continueProcessing();
QTime mTimer;
bool mTimerIsRunning;
QTime mUserTimer;