d3119bb7 | 2019-08-13 12:12:00 | Michele Calgaro |
Fixed missing update of mime comment in refreshed KFileItem. This resolves issue #35. Signed-off-by: Michele Calgaro <michele.calgaro@...> |
||
M tdeio/tdeio/kdirlister.h M tdeio/tdeio/tdefileitem.cpp |
||
tdeio/tdeio/kdirlister.hdiff --git a/tdeio/tdeio/kdirlister.h b/tdeio/tdeio/kdirlister.h index bc1acbb..a48709b 100644 --- a/tdeio/tdeio/kdirlister.h +++ b/tdeio/tdeio/kdirlister.h @@ -32,7 +32,7 @@ namespace TDEIO { class Job; class LocalURLJob; class ListJob; } /** - * The dir lister deals with the kiojob used to list and update a directory + * The dir lister deals with the tdeiojob used to list and update a directory * and has signals for the user of this class (e.g. konqueror view or * kdesktop) to create/destroy its items when asked. * @@ -49,7 +49,7 @@ * Advanced usage : call openURL with _keep = true to list directories * without forgetting the ones previously read (e.g. for a tree view) * - * @short Helper class for the kiojob used to list and update a directory. + * @short Helper class for the tdeiojob used to list and update a directory. * @author Michael Brade <brade@...> */ class TDEIO_EXPORT KDirLister : public TQObject tdeio/tdeio/tdefileitem.cppdiff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index b852fa3..7b4c7cc 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -1034,10 +1034,11 @@ && m_bLink == item.m_bLink && m_hidden == item.m_hidden && size(hasSize1) == item.size(hasSize2) - && hasSize1 == hasSize2 + && hasSize1 == hasSize2 && time(TDEIO::UDS_MODIFICATION_TIME, hasTime1) == item.time(TDEIO::UDS_MODIFICATION_TIME, hasTime2) - && hasTime1 == hasTime2 - && (!d || !item.d || d->iconName == item.d->iconName) ); + && hasTime1 == hasTime2 + && (!d || !item.d || d->iconName == item.d->iconName) + && (!isMimeTypeKnown() || !item.isMimeTypeKnown() || mimetype() == item.mimetype()) ); // Don't compare the mimetypes here. They might not be known, and we don't want to // do the slow operation of determining them here. @@ -1078,6 +1079,8 @@ d = new KFileItemPrivate; } d->iconName = item.d->iconName; + d->comment = item.d->comment; + d->commentCached = item.d->commentCached; } else { delete d; d = 0; |