summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-08-13 21:12:00 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-08-13 21:12:00 +0900
commitd3119bb794953d2c8c85a2c805fbe0a0bc8fcbaa (patch)
tree7d3849191a11dbc2c89bb6db66f81d731236ea23
parent038c996bec50007829807a09bd1eeaea19516897 (diff)
downloadtdelibs-d3119bb794953d2c8c85a2c805fbe0a0bc8fcbaa.tar.gz
tdelibs-d3119bb794953d2c8c85a2c805fbe0a0bc8fcbaa.zip
Fixed missing update of mime comment in refreshed KFileItem. This
resolves issue #35. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--tdeio/tdeio/kdirlister.h4
-rw-r--r--tdeio/tdeio/tdefileitem.cpp9
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;