[Digikam-devel] [Bug 238823] WISH: Batch RAW Conversion should copy tags / captions / ratings to the converted file

Gilles Caulier caulier.gilles at gmail.com
Tue Oct 5 14:18:58 BST 2010


https://bugs.kde.org/show_bug.cgi?id=238823





--- Comment #5 from Gilles Caulier <caulier gilles gmail com>  2010-10-05 15:18:57 ---
Marcel, 

i implemented this :

Index: kipiiface/kipiimageinfo.cpp
===================================================================
--- kipiiface/kipiimageinfo.cpp (revision 1182609)
+++ kipiiface/kipiimageinfo.cpp (working copy)
@@ -26,6 +26,10 @@

 #include "kipiimageinfo.h"

+// Qt includes
+
+#include <QDir>
+
 // KDE includes

 #include <kconfig.h>
@@ -43,6 +47,7 @@
 #include "imageattributeswatch.h"
 #include "globals.h"
 #include "tagscache.h"
+#include "scancontroller.h"

 namespace Digikam
 {
@@ -117,9 +122,19 @@
 void KipiImageInfo::cloneData( ImageInfoShared* other )
 #endif
 {
-    setDescription( other->description() );
-    setTime( other->time(KIPI::FromInfo), KIPI::FromInfo );
-    addAttributes( other->attributes() );
+    kDebug();
+
+    KUrl srcDirURL(QDir::cleanPath(path().directory()));
+    PAlbum* srcAlbum = AlbumManager::instance()->findPAlbum(srcDirURL);
+
+    KUrl dstDirURL(QDir::cleanPath(other->path().directory()));
+    PAlbum* dstAlbum = AlbumManager::instance()->findPAlbum(dstDirURL);
+
+    if (dstAlbum && srcAlbum)
+    {
+        ImageInfo oldInfo(path().toLocalFile());
+       
ScanController::instance()->scanFileDirectlyCopyAttributes(other->path().toLocalFile(),
oldInfo.id());
+    }
 }

 QMap<QString, QVariant> KipiImageInfo::attributes()

... and it doesn't work. Sound like KipiImageInfo::cloneData() is never called
!

Gilles Caulier

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list