summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qfileiconprovider_p.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-09 21:44:37 +0100
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-11 17:04:55 +0000
commita4c2e95ce16b3c4f9e0c9c983fb1ce9e70b5ce5a (patch)
tree8a652e75e5f384ebf490bf8de75ec869a4a6a788 /src/widgets/itemviews/qfileiconprovider_p.h
parent6ef8387e42790d29ea8218f6c43514b2372e9ec6 (diff)
Use own QIconEngine in QFileIconProvider
This allows us to lazily load icons from the platform theme by reimplementing the pixmap(). Otherwise, we would instantiate pixmaps in several sizes even though we would not need them right away. Since, at least on OS X, icon sizes can go up to 128x128 pixels, we can end up saving an order of magnitude of memory on icon pixmaps alone if we only use the smallest sizes in our application. Two side modifications are included. The first allows sub- classing QPixmapIconEngine by exporting this class. The second fixes the q_ptr in QFileIconProviderPrivate which was never set. Change-Id: I91af322ded2823e475703871e607773177ae25d3 Task-number: QTBUG-41796 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/widgets/itemviews/qfileiconprovider_p.h')
-rw-r--r--src/widgets/itemviews/qfileiconprovider_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qfileiconprovider_p.h b/src/widgets/itemviews/qfileiconprovider_p.h
index 213535616c..a1fb4acbea 100644
--- a/src/widgets/itemviews/qfileiconprovider_p.h
+++ b/src/widgets/itemviews/qfileiconprovider_p.h
@@ -60,7 +60,7 @@ class QFileIconProviderPrivate
Q_DECLARE_PUBLIC(QFileIconProvider)
public:
- QFileIconProviderPrivate();
+ QFileIconProviderPrivate(QFileIconProvider *q);
QIcon getIcon(QStyle::StandardPixmap name) const;
QIcon getIcon(const QFileInfo &fi) const;