Bug 342857 - Changed files are not reported to host application [patch]
Summary: Changed files are not reported to host application [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-GeolocationEdit (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 00:03 UTC by Johannes Zarl-Zierl
Modified: 2016-07-07 04:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Zarl-Zierl 2015-01-15 00:03:25 UTC
The GPSSync plugin should call KIPI::interface::refreshFiles() for those files that have been changed on disk. KPhotoAlbum relies on MD5sums to detect file renaming. This can't work properly if the files are changed without its knowledge.

A fix could possibly look like this:

diff --git a/gpssync/kipiimageitem.cpp b/gpssync/kipiimageitem.cpp
index 0f9e029..63ff1e4 100644
--- a/gpssync/kipiimageitem.cpp
+++ b/gpssync/kipiimageitem.cpp
@@ -881,6 +881,12 @@ QString KipiImageItem::saveChanges(const bool toInterface, const bool toFile)
             info.removeGeolocationInfo();
         }
 
+        if (shouldWriteCoordinates | shouldRemoveCoordinates)
+        {
+            // if data was written to the file, the interface must be notified of the changed checksum
+            m_interface->refreshImages(KUrl::List(m_url));
+        }
+
         if (!m_tagList.isEmpty())
         {
             QMap<QString, QVariant> attributes;
Comment 1 caulier.gilles 2015-01-15 09:09:32 UTC
Git commit 087245cc13e10e63a91d0dbb86432fb3982a4026 by Gilles Caulier.
Committed on 15/01/2015 at 09:08.
Pushed by cgilles into branch 'master'.

dispatch GPS info changes from kipi tool to kipi host application when data are processed.
FIXED-IN: 4.7.0

M  +2    -1    NEWS
M  +6    -0    gpssync/kipiimageitem.cpp

http://commits.kde.org/kipi-plugins/087245cc13e10e63a91d0dbb86432fb3982a4026
Comment 2 caulier.gilles 2015-01-15 14:10:18 UTC
Git commit 8e5ae2ecb3b9ae8311fc24a23f16815dda3021d6 by Gilles Caulier.
Committed on 15/01/2015 at 14:09.
Pushed by cgilles into branch 'frameworks'.

backport commit #087245cc13e10e63a91d0dbb86432fb3982a4026 from git/master to frameworks branch

M  +6    -0    PORT.KF5/TODO/gpssync/kipiimageitem.cpp

http://commits.kde.org/kipi-plugins/8e5ae2ecb3b9ae8311fc24a23f16815dda3021d6
Comment 3 Johannes Zarl-Zierl 2015-01-15 17:14:26 UTC
Thanks for the quick fix!


On Thursday 15 January 2015 14:10:18 you wrote:
> https://bugs.kde.org/show_bug.cgi?id=342857
> 
> --- Comment #2 from Gilles Caulier <caulier.gilles@gmail.com> ---
> Git commit 8e5ae2ecb3b9ae8311fc24a23f16815dda3021d6 by Gilles Caulier.
> Committed on 15/01/2015 at 14:09.
> Pushed by cgilles into branch 'frameworks'.
> 
> backport commit #087245cc13e10e63a91d0dbb86432fb3982a4026 from git/master to
> frameworks branch
> 
> M  +6    -0    PORT.KF5/TODO/gpssync/kipiimageitem.cpp
> 
> http://commits.kde.org/kipi-plugins/8e5ae2ecb3b9ae8311fc24a23f16815dda3021d6