summaryrefslogtreecommitdiffstats
path: root/src/gvcore/fileviewbase.h
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-20 20:33:48 +0300
committerAlexander Golubev <[email protected]>2024-02-20 20:33:48 +0300
commit53ce37eeca12badf89ebde563a8ec335e0236a02 (patch)
tree1e28df1ba0a3d9cdaef27d9796f4391856a281b6 /src/gvcore/fileviewbase.h
parent79826b760ff5c65840794d3d2dc4c4a60916996c (diff)
downloadgwenview-53ce37eeca12badf89ebde563a8ec335e0236a02.tar.gz
gwenview-53ce37eeca12badf89ebde563a8ec335e0236a02.zip
Avoid sorting items and creating thumbnails when loading metadata
Otherwice it has a big performance impact: it causes lots of thumbnail reloads and resorts of FileThumbnailView. Signed-off-by: Alexander Golubev <[email protected]>
Diffstat (limited to 'src/gvcore/fileviewbase.h')
-rw-r--r--src/gvcore/fileviewbase.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gvcore/fileviewbase.h b/src/gvcore/fileviewbase.h
index 7b09ac7..8d22182 100644
--- a/src/gvcore/fileviewbase.h
+++ b/src/gvcore/fileviewbase.h
@@ -34,9 +34,15 @@ public:
KFileItem* shownFileItem() const { return mShownFileItem; }
virtual void setShownFileItem(KFileItem* fileItem) { mShownFileItem=fileItem; }
-
+
virtual void updateFromSettings() {}
+ using KFileView::updateView;
+ void updateView(const KFileItem* fileItem) override {
+ updateView(fileItem, false);
+ }
+ virtual void updateView(const KFileItem* fileItem, bool metaDataOnly) = 0;
+
protected:
KFileItem* mShownFileItem;
};