From c6494823c8b79a33bf333a1e3a2c58ac6d74dcea Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 5 Jun 2013 23:18:26 +0200 Subject: Reduce KFileItemModel memory usage by making use of implicit sharing The idea is based on http://milianw.de/blog/katekdevelop-sprint-vienna-2012-take-1 REVIEW: 110686 --- src/kitemviews/kfileitemmodel.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/kitemviews/kfileitemmodel.h') diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 1d837cb2a..1d2d8c172 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -429,6 +429,12 @@ private: */ static void determineMimeTypes(const KFileItemList& items, int timeout); + /** + * @return Returns a copy of \a value that is implicitly shared + * with other users to save memory. + */ + static QByteArray sharedValue(const QByteArray& value); + /** * Checks if the model's internal data structures are consistent. */ -- cgit v1.3.1