Bug 179298 - digikam scan for new images progress bar starts at 100%
Summary: digikam scan for new images progress bar starts at 100%
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 0.10.0
Platform: Compiled Sources Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-01 17:44 UTC by Roman Fietze
Modified: 2017-07-15 16:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.10.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Fietze 2009-01-01 17:44:17 UTC
Version:           0.10.0-beta8 (rev.: 904148M) (using Devel)
Installed from:    Compiled sources

At the start of the scan the progress bar displays 100% instead of 0% until the "real" scan starts.

Esp. on slow machines (I'm sorry for having one :) ) this is somewhat irritating, esp. when testing beta versions, not knowing if digikam has gone to meet its makers.
Comment 1 caulier.gilles 2009-01-01 18:00:26 UTC
SVN commit 904217 by cgilles:

reset progress bar when dialog is created.
Roman : this patch must be fine, but like i have only fast computers here, i'm not sure if all will be fine for you.
BUG: 179298


 M  +3 -1      dprogressdlg.cpp  
 M  +1 -1      dprogressdlg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=904217
Comment 2 Roman Fietze 2009-01-01 21:13:19 UTC
(In reply to comment #1)

> SVN commit 904217 by cgilles ...

Thanks for that pointer.

> i'm not sure if all will be fine for you

Not really. So I took the time and checked the sources. Instead of adding reset() to DProgressDlg CTOR, changing ScanController::createProgressDialog would probably a better solution. But because I'm new to digikam source code, I cannot know if that would have any side effects. At least it seems to work here.

Index: digikam/libs/dialogs/dprogressdlg.cpp
===================================================================
--- digikam/libs/dialogs/dprogressdlg.cpp       (revision 904225)
+++ digikam/libs/dialogs/dprogressdlg.cpp       (working copy)
@@ -128,8 +128,6 @@
 
     connect(this, SIGNAL(cancelClicked()),
             this, SLOT(slotCancel()));
-
-    reset();
 }
 
 DProgressDlg::~DProgressDlg()
Index: digikam/digikam/scancontroller.cpp
===================================================================
--- digikam/digikam/scancontroller.cpp  (revision 904225)
+++ digikam/digikam/scancontroller.cpp  (working copy)
@@ -268,7 +268,7 @@
                                       "are registered in a database.") );
 
     d->progressDialog->setMaximum(1);
-    d->progressDialog->setValue(1);
+    d->progressDialog->setValue(0);
 
     connect(this, SIGNAL(incrementProgressDialog(int)),
             d->progressDialog, SLOT(incrementMaximum(int)));
Comment 3 caulier.gilles 2009-01-01 21:56:24 UTC
SVN commit 904295 by cgilles:

set progress bar to zero at startup when scancontroller start to work.
Marcel, Andi, do not forget "endl" at end of kDebug and kDwarning else sometimes, kdelibs can crash
CCMAIL: digikam-devel@kde.org
CCBUG: 179298


 M  +37 -37    scancontroller.cpp  
 M  +2 -3      scancontroller.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=904295