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 d3119bb794)
r14.0.x
Michele Calgaro 5 years ago
parent 5551f81376
commit eeb7d0f646
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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

@ -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;

Loading…
Cancel
Save