Bug 92665

Summary: Review: utilities/cameragui/cameraui.cpp has duplicate parts of code
Product: [Applications] digikam Reporter: lan
Component: Import-MainViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Remove duplicate code

Description lan 2004-11-04 07:05:14 UTC
Version:           0.7 (using KDE 3.2.1, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.111-default

slots slotDownload(All|Selected) and slotDelete(All|Selected) have almost all part of function the same except for selection check.

I have created two new functions with boolean argument use all images or just selected and call these functions from slots.

This makes easier to change dlownload/delete logic.
Patch will be attached.
Comment 1 lan 2004-11-04 07:06:50 UTC
Created attachment 8159 [details]
Remove duplicate code

Original files were taken from CVS 2-3 hours ago.
Comment 2 Renchi Raju 2004-11-18 03:51:13 UTC
CVS commit by pahlibar: 


BUG: 92665
BUG: 92312
* Auto-album patch applied (with modifications) to automatically create 
sub-albums in destination album based on exif date of the camera.
 - while downloading each file, the corresponding directory is "stat ed"
   to see if it exists. if not, get albummanager to create the album
   and write out to database, the date of the album
 - if any of these steps fails, the whole process bails out
* merged the two download (selected/all) into one functio
* thanks to lan at ac-sw com for original patches


  M +93 -82    cameraui.cpp   1.27
  M +8 -0      cameraui.h   1.14



Comment 3 lan 2004-11-18 06:51:40 UTC
Thanks for appling !