diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-08-13 21:12:00 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-08-14 14:50:01 +0900 |
commit | eeb7d0f646a2d375b960bf89182bda504c6d895b (patch) | |
tree | 34dde19c609006d4fa00a5d17ed38d9ea7529e5b /tdeio | |
parent | 5551f81376dd52fc16c0712a4747a00c069777a4 (diff) | |
download | tdelibs-eeb7d0f646a2d375b960bf89182bda504c6d895b.tar.gz tdelibs-eeb7d0f646a2d375b960bf89182bda504c6d895b.zip |
Fixed missing update of mime comment in refreshed KFileItem. This
resolves issue #35.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d3119bb794953d2c8c85a2c805fbe0a0bc8fcbaa)
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/tdeio/kdirlister.h | 4 | ||||
-rw-r--r-- | tdeio/tdeio/tdefileitem.cpp | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tdeio/tdeio/kdirlister.h b/tdeio/tdeio/kdirlister.h index bc1acbb39..a48709b19 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 @@ namespace TDEIO { class Job; class LocalURLJob; class ListJob; } * 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@kde.org> */ class TDEIO_EXPORT KDirLister : public TQObject diff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index b852fa35d..7b4c7ccd3 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -1034,10 +1034,11 @@ bool KFileItem::cmp( const KFileItem & item ) && 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 @@ void KFileItem::assign( const KFileItem & item ) d = new KFileItemPrivate; } d->iconName = item.d->iconName; + d->comment = item.d->comment; + d->commentCached = item.d->commentCached; } else { delete d; d = 0; |