Summary: | Adjusting time and date of exif does not take effect until properties are seen | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Cedric Pradalier <cedric.pradalier> |
Component: | Metadata-Date | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 0.7.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: |
Description
Cedric Pradalier
2005-01-30 11:30:24 UTC
CVS commit by pahlibar: hold the file dates separately from the kfileitems and on refresh, reread the file dates and resort the items. BUG: 98189 M +29 -0 albumiconview.cpp 1.107 M +4 -0 kipiinterface.cpp 1.19 --- kdeextragear-3/digikam/digikam/albumiconview.cpp #1.106:1.107 @@ -40,4 +40,5 @@ #include <qdatetime.h> #include <qfileinfo.h> +#include <qfile.h> #include <qguardedptr.h> #include <qdragobject.h> @@ -82,4 +83,11 @@ #include <libkexif/kexifdata.h> +extern "C" +{ +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +} + // Local includes. @@ -1494,4 +1502,22 @@ void AlbumIconView::refreshItems(const K return; + // we do two things here: + // 1. refresh the timestamp + // 2. refresh the thumbnails + + for (KURL::List::const_iterator it = urlList.begin(); + it != urlList.end(); ++it) + { + AlbumIconItem* iconItem = findItem((*it).url()); + if (!iconItem) + continue; + + struct stat st; + if (::stat(QFile::encodeName((*it).path()), &st) == 0) + { + iconItem->time_ = st.st_mtime; + } + } + if (d->thumbJob.isNull()) { @@ -1516,4 +1542,7 @@ void AlbumIconView::refreshItems(const K d->thumbJob->addItems(urlList); } + + // trigger a delayed update, in case we need to resort items + triggerUpdate(); } --- kdeextragear-3/digikam/digikam/kipiinterface.cpp #1.18:1.19 @@ -175,4 +175,8 @@ void DigikamImageInfo::setTime(const QDa << endl; } + else + { + AlbumManager::instance()->refreshItemHandler( _url ); + } } |