┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemliststyleoption.h
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2018-03-29 09:21:17 +0200
committerKai Uwe Broulik <[email protected]>2018-03-29 09:21:17 +0200
commit40f9cfd519a3244929190146a3215ae12b98270b (patch)
treeb7c7e06c515db296312650b515af83320e0f29b7 /src/kitemviews/kitemliststyleoption.h
parent49e0315584e8fca507cb4fb397bfd5e46e67c164 (diff)
[KItemListView] Check if KItemListStyleOption actually changed before emitting a change
This avoids work being done when it doesn't need to be. For instance, the preview generator waits for everything to have settled using a 200ms timer before generating a preview. This timer fired also in response to onStyleOptionChanged and needlessly delayed preview generation when navigating between folders despite the style option (e.g. icon size, view mode) not having changed. Differential Revision: https://phabricator.kde.org/D11481
Diffstat (limited to 'src/kitemviews/kitemliststyleoption.h')
-rw-r--r--src/kitemviews/kitemliststyleoption.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h
index 09b787c27..93aafac1f 100644
--- a/src/kitemviews/kitemliststyleoption.h
+++ b/src/kitemviews/kitemliststyleoption.h
@@ -45,6 +45,11 @@ public:
bool extendedSelectionRegion;
int maxTextLines;
int maxTextWidth;
+
+ bool operator==(const KItemListStyleOption& other) const;
+ bool operator!=(const KItemListStyleOption& other) const;
+
+
};
#endif