[Kst] [Bug 85601] kst needs an "i'm busy" indicator

George Staikos staikos at kde.org
Tue Oct 26 02:42:45 CEST 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=85601        




------- Additional Comments From staikos kde org  2004-10-26 02:42 -------
Re: [Kst] kdeextragear-2/kst/kst


From: George Staikos <staikos kde org>
To: kst kde org
Date: 08/11/04 15:38
On Wednesday 11 August 2004 14:50, Andrew Walker wrote:
> CVS commit by arwalker:
>
> Added a progress bar and progress string indicator to the status bar.
> Use the aforementioned to display the progress of the data wizard.

  This is exactly why we shouldn't include this code in CVS yet.  
processEvents() is going to cause us huge nightmares because we will receive 
update events from the threads, among other things.  I spent lots of time 
removing these because of the crashes and bugs they introduced in the past.

+void KstApp::slotUpdateProgress(int iTotal, int iStep, const QString &msg) {
+  if (iStep > 0) {
+    if (!_progressBar->percentageVisible()) {
+      _progressBar->setPercentageVisible(true);
+    }
+    if (iTotal != _progressBar->totalSteps()) {
+      _progressBar->setTotalSteps(iTotal);
+    }
+    _progressMsg->setText(QString::null);
+    _progressBar->setProgress(iStep);
+    _progressMsg->setText(msg);
+  } else {
+    _progressBar->setPercentageVisible(false);
+    _progressMsg->setText(msg);
+    _progressBar->reset();
+  }
+
+  while (kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput));
+}
+
+



More information about the Kst mailing list