diff --git a/src/declarativeimports/core/iconitem.h b/src/declarativeimports/core/iconitem.h --- a/src/declarativeimports/core/iconitem.h +++ b/src/declarativeimports/core/iconitem.h @@ -66,12 +66,6 @@ */ Q_PROPERTY(QStringList overlays READ overlays WRITE setOverlays NOTIFY overlaysChanged) - /** - * See QQuickItem::smooth - */ - //KF6 Remove, this just shadows QQuickItem::smooth - Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) - /** * Apply a visual indication that this icon is active. * Typically used to indicate that it is hovered @@ -141,9 +135,6 @@ bool isActive() const; void setActive(bool active); - void setSmooth(const bool smooth); - bool smooth() const; - bool isAnimated() const; void setAnimated(bool animated); diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp --- a/src/declarativeimports/core/iconitem.cpp +++ b/src/declarativeimports/core/iconitem.cpp @@ -39,7 +39,6 @@ : QQuickItem(parent), m_svgIcon(nullptr), m_status(Plasma::Svg::Normal), - m_smooth(true), m_active(false), m_animated(true), m_usesPlasmaTheme(true), @@ -320,20 +319,6 @@ emit activeChanged(); } -void IconItem::setSmooth(const bool smooth) -{ - if (smooth == m_smooth) { - return; - } - m_smooth = smooth; - update(); -} - -bool IconItem::smooth() const -{ - return m_smooth; -} - bool IconItem::isAnimated() const { return m_animated; @@ -492,9 +477,9 @@ delete oldNode; QSGTexture *source = window()->createTextureFromImage(m_oldIconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas); - source->setFiltering(m_smooth ? QSGTexture::Linear : QSGTexture::Nearest); + source->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest); QSGTexture *target = window()->createTextureFromImage(m_iconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas); - target->setFiltering(m_smooth ? QSGTexture::Linear : QSGTexture::Nearest); + target->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest); animatingNode = new FadingNode(source, target); m_sizeChanged = true; m_textureChanged = false; @@ -516,11 +501,11 @@ if (!textureNode || m_textureChanged) { delete oldNode; textureNode = new ManagedTextureNode; - textureNode->setFiltering(m_smooth ? QSGTexture::Linear : QSGTexture::Nearest); textureNode->setTexture(QSharedPointer(window()->createTextureFromImage(m_iconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas))); m_sizeChanged = true; m_textureChanged = false; } + textureNode->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest); if (m_sizeChanged) { const QSize newSize = paintedSize(); diff --git a/src/declarativeimports/core/svgitem.h b/src/declarativeimports/core/svgitem.h --- a/src/declarativeimports/core/svgitem.h +++ b/src/declarativeimports/core/svgitem.h @@ -60,11 +60,6 @@ */ Q_PROPERTY(QSizeF naturalSize READ naturalSize NOTIFY naturalSizeChanged) - /** - * If true enable antialiasing in paint: default off, better quality but less performance. - */ - Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) - public: /// @cond INTERNAL_DOCS @@ -77,9 +72,6 @@ void setSvg(Plasma::Svg *svg); Plasma::Svg *svg() const; - void setSmooth(const bool smooth); - bool smooth() const; - QSizeF naturalSize() const; QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override; @@ -89,7 +81,6 @@ void elementIdChanged(); void svgChanged(); void naturalSizeChanged(); - void smoothChanged(); protected Q_SLOTS: /// @cond INTERNAL_DOCS @@ -104,7 +95,6 @@ QPointer m_svg; QString m_elementID; - bool m_smooth; bool m_textureChanged; QImage m_image; }; diff --git a/src/declarativeimports/core/svgitem.cpp b/src/declarativeimports/core/svgitem.cpp --- a/src/declarativeimports/core/svgitem.cpp +++ b/src/declarativeimports/core/svgitem.cpp @@ -36,7 +36,6 @@ SvgItem::SvgItem(QQuickItem *parent) : QQuickItem(parent), - m_smooth(false), m_textureChanged(false) { setFlag(QQuickItem::ItemHasContents, true); @@ -115,20 +114,6 @@ return m_svg.data(); } -void SvgItem::setSmooth(const bool smooth) -{ - if (smooth == m_smooth) { - return; - } - m_smooth = smooth; - emit smoothChanged(); -} - -bool SvgItem::smooth() const -{ - return m_smooth; -} - QSGNode *SvgItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) { Q_UNUSED(updatePaintNodeData); @@ -146,7 +131,6 @@ ManagedTextureNode *textureNode = static_cast(oldNode); if (!textureNode) { textureNode = new ManagedTextureNode; - textureNode->setFiltering(QSGTexture::Linear); m_textureChanged = true; } @@ -164,15 +148,14 @@ } QSharedPointer texture(window()->createTextureFromImage(m_image, QQuickWindow::TextureCanUseAtlas)); - if (m_smooth) { - texture->setFiltering(QSGTexture::Linear); - } textureNode->setTexture(texture); m_textureChanged = false; textureNode->setRect(0, 0, width(), height()); } + textureNode->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest); + return textureNode; }