Add scaledPixmap() override
QAbstractFileIconEngine implements the QIconEngine interface and creates a new interface where subclasses override the filePixmap() function. QIconEngine subclasses must now also override scaledPixmap(); add implementation which forwards to filePixmap(). (The intermediate implementation in QPixmapIconEngine is not used by QAbstractFileIconEngine.) Pick-to: 6.1 Task-number: QTBUG-91104 Change-Id: I229e3a003ad0c3fff768eac7e75c59fe7145fcaa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
24b07b2b2d
commit
bb110cee5d
@ -85,6 +85,12 @@ QPixmap QAbstractFileIconEngine::pixmap(const QSize &size, QIcon::Mode mode,
|
||||
return result;
|
||||
}
|
||||
|
||||
QPixmap QAbstractFileIconEngine::scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale)
|
||||
{
|
||||
Q_UNUSED(scale); // (size is pre-multiplied by scale)
|
||||
return pixmap(size, mode, state);
|
||||
}
|
||||
|
||||
QSize QAbstractFileIconEngine::actualSize(const QSize &size, QIcon::Mode mode,
|
||||
QIcon::State state)
|
||||
{
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
: QPixmapIconEngine(), m_fileInfo(info), m_options(opts) {}
|
||||
|
||||
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State) override;
|
||||
QPixmap scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State, qreal scale) override;
|
||||
QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
|
||||
|
||||
QFileInfo fileInfo() const { return m_fileInfo; }
|
||||
|
Loading…
Reference in New Issue
Block a user