Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kf6-ksvg for openSUSE:Factory checked in at 2025-09-15 19:49:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kf6-ksvg (Old) and /work/SRC/openSUSE:Factory/.kf6-ksvg.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-ksvg" Mon Sep 15 19:49:55 2025 rev:21 rq:1304426 version:6.18.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kf6-ksvg/kf6-ksvg.changes 2025-08-09 20:03:48.208209123 +0200 +++ /work/SRC/openSUSE:Factory/.kf6-ksvg.new.1977/kf6-ksvg.changes 2025-09-15 19:53:38.428953216 +0200 @@ -1,0 +2,14 @@ +Mon Sep 8 13:33:12 UTC 2025 - Christophe Marin <[email protected]> + +- Update to 6.18.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/6/6.18.0 +- Changes since 6.17.0: + * Update dependency version to 6.18.0 + * Drop unneeded expl. addition of build dir to libs' build includes interface + * Workaround plasmashell crashing due to new Svg::colorOverridesChanged() signal + * Fix FrameSvg not refreshing when color scheme changes (kde#503671) + * Update version to 6.18.0 + +------------------------------------------------------------------- Old: ---- ksvg-6.17.0.tar.xz ksvg-6.17.0.tar.xz.sig New: ---- ksvg-6.18.0.tar.xz ksvg-6.18.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kf6-ksvg.spec ++++++ --- /var/tmp/diff_new_pack.rs5ROp/_old 2025-09-15 19:53:39.160984016 +0200 +++ /var/tmp/diff_new_pack.rs5ROp/_new 2025-09-15 19:53:39.160984016 +0200 @@ -19,11 +19,11 @@ %define qt6_version 6.8.0 %define rname ksvg -# Full KF6 version (e.g. 6.17.0) +# Full KF6 version (e.g. 6.18.0) %{!?_kf6_version: %global _kf6_version %{version}} %bcond_without released Name: kf6-ksvg -Version: 6.17.0 +Version: 6.18.0 Release: 0 Summary: Components for handling SVGs License: GPL-2.0-or-later ++++++ 0001-Revert-Support-for-fractional-scaling.patch ++++++ --- /var/tmp/diff_new_pack.rs5ROp/_old 2025-09-15 19:53:39.188985194 +0200 +++ /var/tmp/diff_new_pack.rs5ROp/_new 2025-09-15 19:53:39.192985362 +0200 @@ -14,11 +14,11 @@ src/ksvg/svg.cpp | 27 ++++--- 7 files changed, 115 insertions(+), 120 deletions(-) -diff --git a/src/declarativeimports/framesvgitem.cpp b/src/declarativeimports/framesvgitem.cpp -index 56c2b3a8..678bdcbe 100644 ---- a/src/declarativeimports/framesvgitem.cpp -+++ b/src/declarativeimports/framesvgitem.cpp -@@ -122,7 +122,7 @@ public: +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/declarativeimports/framesvgitem.cpp +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/declarativeimports/framesvgitem.cpp 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/declarativeimports/framesvgitem.cpp 2025-08-12 08:15:29.067807321 +0200 +@@ -122,7 +122,7 @@ void reposition(const QRect &frameGeometry, QSize &fullSize) { @@ -27,7 +27,7 @@ // ensure we're not passing a weird rectangle to updateTexturedRectGeometry if (!nodeRect.isValid() || nodeRect.isEmpty()) { -@@ -152,7 +152,7 @@ public: +@@ -152,7 +152,7 @@ QString elementId = prefix + FrameSvgHelpers::borderToElementId(m_border); // re-render the SVG at new size @@ -36,7 +36,7 @@ textureRect = texture()->normalizedTextureSubRect(); } else if (texture()) { // for fast stretch. textureRect = texture()->normalizedTextureSubRect(); -@@ -726,7 +726,10 @@ void FrameSvgItem::componentComplete() +@@ -728,7 +728,10 @@ void FrameSvgItem::updateDevicePixelRatio() { @@ -48,10 +48,10 @@ if (newDevicePixelRatio != m_frameSvg->devicePixelRatio()) { m_frameSvg->setDevicePixelRatio(newDevicePixelRatio); m_textureChanged = true; -diff --git a/src/declarativeimports/svgitem.cpp b/src/declarativeimports/svgitem.cpp -index c1e6e9e5..9dec8535 100644 ---- a/src/declarativeimports/svgitem.cpp -+++ b/src/declarativeimports/svgitem.cpp +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/declarativeimports/svgitem.cpp +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/declarativeimports/svgitem.cpp 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/declarativeimports/svgitem.cpp 2025-08-12 08:15:29.067881892 +0200 @@ -16,6 +16,8 @@ #include "managedtexturenode.h" @@ -61,7 +61,7 @@ #include <Kirigami/Platform/PlatformTheme> #include <debug_p.h> -@@ -269,7 +271,10 @@ void SvgItem::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometr +@@ -271,7 +273,10 @@ void SvgItem::updateDevicePixelRatio() { @@ -73,10 +73,10 @@ if (newDevicePixelRatio != m_svg->devicePixelRatio()) { m_svg->setDevicePixelRatio(newDevicePixelRatio); m_textureChanged = true; -diff --git a/src/ksvg/framesvg.cpp b/src/ksvg/framesvg.cpp -index b80e4ae9..3feb6585 100644 ---- a/src/ksvg/framesvg.cpp -+++ b/src/ksvg/framesvg.cpp +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/framesvg.cpp +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/ksvg/framesvg.cpp 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/framesvg.cpp 2025-08-12 08:16:47.526164788 +0200 @@ -15,7 +15,7 @@ #include <QCryptographicHash> #include <QPainter> @@ -86,7 +86,7 @@ #include <QStringBuilder> #include <QTimer> -@@ -188,7 +188,7 @@ void FrameSvg::resizeFrame(const QSizeF &size) +@@ -196,7 +196,7 @@ QSizeF FrameSvg::frameSize() const { if (!d->frame) { @@ -95,7 +95,7 @@ } else { return d->frameSize(d->frame.data()); } -@@ -484,6 +484,9 @@ QPixmap FrameSvgPrivate::alphaMask() +@@ -492,6 +492,9 @@ if (maskFrame->cachedBackground.isNull()) { generateBackground(maskFrame); @@ -105,7 +105,7 @@ } return maskFrame->cachedBackground; -@@ -548,8 +551,8 @@ void FrameSvgPrivate::generateBackground(const QSharedPointer<FrameData> &frame) +@@ -556,8 +559,8 @@ } // Overlays @@ -116,7 +116,7 @@ if (overlayAvailable && !overlayCached) { overlaySize = q->elementSize(frame->prefix % QLatin1String("overlay")).toSize(); -@@ -575,13 +578,13 @@ void FrameSvgPrivate::generateBackground(const QSharedPointer<FrameData> &frame) +@@ -583,13 +586,13 @@ // Tiling? if (q->hasElement(frame->prefix % QLatin1String("hint-overlay-tile-horizontal")) || q->hasElement(frame->prefix % QLatin1String("hint-overlay-tile-vertical"))) { @@ -133,7 +133,7 @@ } overlayPainter.end(); -@@ -594,14 +597,14 @@ void FrameSvgPrivate::generateBackground(const QSharedPointer<FrameData> &frame) +@@ -602,14 +605,14 @@ if (!overlay.isNull()) { QPainter p(&frame->cachedBackground); p.setCompositionMode(QPainter::CompositionMode_SourceOver); @@ -150,7 +150,7 @@ if (!size.isValid()) { #ifndef NDEBUG -@@ -614,14 +617,13 @@ void FrameSvgPrivate::generateFrameBackground(const QSharedPointer<FrameData> &f +@@ -622,14 +625,13 @@ return; } @@ -167,7 +167,7 @@ paintCenter(p, frame, contentRect, size); paintCorner(p, frame, FrameSvg::LeftBorder | FrameSvg::TopBorder, contentRect); -@@ -630,26 +632,25 @@ void FrameSvgPrivate::generateFrameBackground(const QSharedPointer<FrameData> &f +@@ -638,26 +640,25 @@ paintCorner(p, frame, FrameSvg::RightBorder | FrameSvg::BottomBorder, contentRect); // Sides @@ -199,24 +199,23 @@ +QRect FrameSvgPrivate::contentGeometry(const QSharedPointer<FrameData> &frame, const QSize &size) const { - const QSizeF contentSize(size.width() - frame->leftWidth * q->devicePixelRatio() - frame->rightWidth * q->devicePixelRatio(), -- size.height() - frame->topHeight * q->devicePixelRatio() - frame->bottomHeight * q->devicePixelRatio()); -- QRectF contentRect(QPointF(0, 0), contentSize); + const QSize contentSize(size.width() - frame->leftWidth * q->devicePixelRatio() - frame->rightWidth * q->devicePixelRatio(), -+ size.height() - frame->topHeight * q->devicePixelRatio() - frame->bottomHeight * q->devicePixelRatio()); + size.height() - frame->topHeight * q->devicePixelRatio() - frame->bottomHeight * q->devicePixelRatio()); +- QRectF contentRect(QPointF(0, 0), contentSize); + QRect contentRect(QPoint(0, 0), contentSize); if (frame->enabledBorders & FrameSvg::LeftBorder && q->hasElement(frame->prefix % QLatin1String("left"))) { contentRect.translate(frame->leftWidth * q->devicePixelRatio(), 0); } -@@ -671,7 +672,7 @@ void FrameSvgPrivate::updateFrameData(uint lastModified, UpdateType updateType) +@@ -679,7 +680,7 @@ const QString oldPath = fd->imagePath; const FrameSvg::EnabledBorders oldBorders = fd->enabledBorders; - const QSizeF currentSize = fd->frameSize; + const QSize currentSize = fd->frameSize; + const int oldColorSet = fd->colorSet; + const auto oldColors = fd->colorOverrides; - fd->enabledBorders = enabledBorders; - fd->frameSize = pendingFrameSize; -@@ -728,28 +729,27 @@ void FrameSvgPrivate::updateFrameData(uint lastModified, UpdateType updateType) +@@ -744,28 +745,27 @@ } } @@ -251,7 +250,7 @@ } else { q->paint(&p, FrameSvgHelpers::sectionRect(FrameSvg::NoBorder, contentRect, fullSize * q->devicePixelRatio()), centerElementId); } -@@ -758,7 +758,7 @@ void FrameSvgPrivate::paintCenter(QPainter &p, const QSharedPointer<FrameData> & +@@ -774,7 +774,7 @@ if (frame->composeOverBorder) { p.setCompositionMode(QPainter::CompositionMode_DestinationIn); @@ -260,7 +259,7 @@ p.setCompositionMode(QPainter::CompositionMode_SourceOver); } } -@@ -766,51 +766,35 @@ void FrameSvgPrivate::paintCenter(QPainter &p, const QSharedPointer<FrameData> & +@@ -782,51 +782,35 @@ void FrameSvgPrivate::paintBorder(QPainter &p, const QSharedPointer<FrameData> &frame, const FrameSvg::EnabledBorders borders, @@ -319,7 +318,7 @@ } } -@@ -858,7 +842,7 @@ void FrameSvgPrivate::updateSizes(FrameData *frame) const +@@ -884,7 +868,7 @@ // qCDebug(LOG_KSVG) << "!!!!!!!!!!!!!!!!!!!!!! updating sizes" << prefix; Q_ASSERT(frame); @@ -328,11 +327,11 @@ q->resize(); if (!frame->cachedBackground.isNull()) { frame->cachedBackground = QPixmap(); -diff --git a/src/ksvg/private/framesvg_helpers.h b/src/ksvg/private/framesvg_helpers.h -index f8e536ef..670f4ecb 100644 ---- a/src/ksvg/private/framesvg_helpers.h -+++ b/src/ksvg/private/framesvg_helpers.h -@@ -45,7 +45,7 @@ QString borderToElementId(FrameSvg::EnabledBorders borders) +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/framesvg_helpers.h +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/ksvg/private/framesvg_helpers.h 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/framesvg_helpers.h 2025-08-12 08:15:29.068089004 +0200 +@@ -45,7 +45,7 @@ /* * Returns the suggested geometry for the borders given a fullSize frame size and a contentRect */ @@ -341,7 +340,7 @@ { // don't use QRect corner methods here, they have semantics that might come as unexpected. // prefer constructing the points explicitly. e.g. from QRect::topRight docs: -@@ -54,26 +54,26 @@ QRectF sectionRect(KSvg::FrameSvg::EnabledBorders borders, const QRectF &content +@@ -54,26 +54,26 @@ if (borders == FrameSvg::NoBorder) { return contentRect; } else if (borders == FrameSvg::TopBorder) { @@ -378,11 +377,11 @@ } } -diff --git a/src/ksvg/private/framesvg_p.h b/src/ksvg/private/framesvg_p.h -index 463b2ee4..2b9e881d 100644 ---- a/src/ksvg/private/framesvg_p.h -+++ b/src/ksvg/private/framesvg_p.h -@@ -78,39 +78,38 @@ public: +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/framesvg_p.h +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/ksvg/private/framesvg_p.h 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/framesvg_p.h 2025-08-12 08:15:29.068123304 +0200 +@@ -80,39 +80,38 @@ static const int MAX_CACHED_MASKS = 10; uint lastModified = 0; @@ -426,16 +425,17 @@ - qreal fixedLeftMargin; - qreal fixedRightMargin; - qreal fixedBottomMargin; -+ int fixedTopMargin; -+ int fixedLeftMargin; -+ int fixedRightMargin; -+ int fixedBottomMargin; - +- - // margins, we only have the hqreal for insets - qreal insetTopMargin; - qreal insetLeftMargin; - qreal insetRightMargin; - qreal insetBottomMargin; ++ int fixedTopMargin; ++ int fixedLeftMargin; ++ int fixedRightMargin; ++ int fixedBottomMargin; ++ + // margins, we only have the hint for insets + int insetTopMargin; + int insetLeftMargin; @@ -444,7 +444,7 @@ // size of the svg where the size of the "center" // element is contentWidth x contentHeight -@@ -159,17 +158,14 @@ public: +@@ -161,17 +160,14 @@ return frameSize(frame.data()); } QSizeF frameSize(FrameData *frame) const; @@ -467,7 +467,7 @@ void updateFrameData(uint lastModified, UpdateType updateType = UpdateFrameAndMargins); QSharedPointer<FrameData> lookupOrCreateMaskFrame(const QSharedPointer<FrameData> &frame, const QString &maskPrefix, const QString &maskRequestedPrefix); -@@ -181,7 +177,7 @@ public: +@@ -183,7 +179,7 @@ FrameSvg *const q; @@ -476,7 +476,7 @@ QSharedPointer<FrameData> frame; QSharedPointer<FrameData> maskFrame; -@@ -189,7 +185,7 @@ public: +@@ -191,7 +187,7 @@ // those can differ from frame->enabledBorders if we are in a transition FrameSvg::EnabledBorders enabledBorders; // this can differ from frame->frameSize if we are in a transition @@ -485,11 +485,11 @@ static QHash<ImageSetPrivate *, QHash<uint, QWeakPointer<FrameData>>> s_sharedFrames; -diff --git a/src/ksvg/private/svg_p.h b/src/ksvg/private/svg_p.h -index 3b81fd52..d287802c 100644 ---- a/src/ksvg/private/svg_p.h -+++ b/src/ksvg/private/svg_p.h -@@ -141,8 +141,8 @@ public: +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/svg_p.h +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/ksvg/private/svg_p.h 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/private/svg_p.h 2025-08-12 08:15:29.068192265 +0200 +@@ -140,8 +140,8 @@ void setNaturalSize(const QString &path, const QSizeF &size); QSizeF naturalSize(const QString &path); @@ -500,7 +500,7 @@ QString iconThemePath(); void setIconThemePath(const QString &path); -@@ -169,7 +169,7 @@ private: +@@ -168,7 +168,7 @@ */ QHash<size_t, QRectF> m_localRectCache; QHash<QString, QSet<unsigned int>> m_invalidElements; @@ -509,11 +509,11 @@ QHash<QString, unsigned int> m_lastModifiedTimes; }; } -diff --git a/src/ksvg/svg.cpp b/src/ksvg/svg.cpp -index 6781f6a9..b9c0802e 100644 ---- a/src/ksvg/svg.cpp -+++ b/src/ksvg/svg.cpp -@@ -273,7 +273,7 @@ void SvgRectsCache::dropImageFromCache(const QString &path) +Index: ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/svg.cpp +=================================================================== +--- ksvg-6.11.0git.20250811T093804~2c80c729.orig/src/ksvg/svg.cpp 2025-08-11 09:38:04.000000000 +0200 ++++ ksvg-6.11.0git.20250811T093804~2c80c729/src/ksvg/svg.cpp 2025-08-12 08:15:29.068274376 +0200 +@@ -273,7 +273,7 @@ QMetaObject::invokeMethod(m_configSyncTimer, qOverload<>(&QTimer::start)); } @@ -522,7 +522,7 @@ { const QString pathId = path % id; -@@ -281,7 +281,7 @@ QList<QSizeF> SvgRectsCache::sizeHintsForId(const QString &path, const QString & +@@ -281,7 +281,7 @@ if (it == m_sizeHintsForId.constEnd()) { KConfigGroup imageGroup(m_svgElementsCache, path); const QStringList &encoded = imageGroup.readEntry(id, QStringList()); @@ -531,7 +531,7 @@ for (const auto &token : encoded) { const auto &parts = token.split(QLatin1Char('x')); if (parts.size() != 2) { -@@ -299,10 +299,10 @@ QList<QSizeF> SvgRectsCache::sizeHintsForId(const QString &path, const QString & +@@ -299,10 +299,10 @@ return *it; } @@ -544,7 +544,7 @@ QString ret; for (const auto &s : list) { ret += QString::number(s.width()) % QLatin1Char('x') % QString::number(s.height()) % QLatin1Char(','); -@@ -563,7 +563,7 @@ QPixmap SvgPrivate::findInCache(const QString &elementId, qreal ratio, const QSi +@@ -563,7 +563,7 @@ // Look at the size hinted elements and try to find the smallest one with an // identical aspect ratio. if (s.isValid() && !elementId.isEmpty()) { @@ -553,7 +553,7 @@ if (!elementSizeHints.isEmpty()) { QSizeF bestFit(-1, -1); -@@ -886,11 +886,18 @@ Svg::~Svg() +@@ -878,11 +878,18 @@ void Svg::setDevicePixelRatio(qreal ratio) { @@ -573,7 +573,7 @@ Q_EMIT repaintNeeded(); } -@@ -918,7 +925,7 @@ QImage Svg::image(const QSize &size, const QString &elementID) +@@ -910,7 +917,7 @@ void Svg::paint(QPainter *painter, const QPointF &point, const QString &elementID) { Q_ASSERT(painter->device()); @@ -582,7 +582,7 @@ QPixmap pix((elementID.isNull() || d->multipleImages) ? d->findInCache(elementID, ratio, size()) : d->findInCache(elementID, ratio)); if (pix.isNull()) { -@@ -936,16 +943,16 @@ void Svg::paint(QPainter *painter, int x, int y, const QString &elementID) +@@ -928,16 +935,16 @@ void Svg::paint(QPainter *painter, const QRectF &rect, const QString &elementID) { Q_ASSERT(painter->device()); @@ -602,7 +602,4 @@ QPixmap pix(d->findInCache(elementID, ratio, QSizeF(width, height))); painter->drawPixmap(x, y, pix, 0, 0, pix.size().width(), pix.size().height()); } --- -2.49.0 - ++++++ ksvg-6.17.0.tar.xz -> ksvg-6.18.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/CMakeLists.txt new/ksvg-6.18.0/CMakeLists.txt --- old/ksvg-6.17.0/CMakeLists.txt 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/CMakeLists.txt 2025-09-08 10:14:36.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "6.17.0") # handled by release scripts -set(KF_DEP_VERSION "6.17.0") # handled by release scripts +set(KF_VERSION "6.18.0") # handled by release scripts +set(KF_DEP_VERSION "6.18.0") # handled by release scripts project(KSvg VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 6.17.0 NO_MODULE) +find_package(ECM 6.18.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -55,7 +55,7 @@ ecm_set_disabled_deprecation_versions( QT 6.10.0 - KF 6.16.0 + KF 6.17.0 ) #add_definitions(-Wno-deprecated) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/declarativeimports/framesvgitem.cpp new/ksvg-6.18.0/src/declarativeimports/framesvgitem.cpp --- old/ksvg-6.17.0/src/declarativeimports/framesvgitem.cpp 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/declarativeimports/framesvgitem.cpp 2025-09-08 10:14:36.000000000 +0200 @@ -701,13 +701,15 @@ return; } - m_frameSvg->setColor(Svg::Text, m_kirigamiTheme->textColor()); - m_frameSvg->setColor(Svg::Background, m_kirigamiTheme->backgroundColor()); - m_frameSvg->setColor(Svg::Highlight, m_kirigamiTheme->highlightColor()); - m_frameSvg->setColor(Svg::HighlightedText, m_kirigamiTheme->highlightedTextColor()); - m_frameSvg->setColor(Svg::PositiveText, m_kirigamiTheme->positiveTextColor()); - m_frameSvg->setColor(Svg::NeutralText, m_kirigamiTheme->neutralTextColor()); - m_frameSvg->setColor(Svg::NegativeText, m_kirigamiTheme->negativeTextColor()); + m_frameSvg->setColors({ + {Svg::Text, m_kirigamiTheme->textColor()}, + {Svg::Background, m_kirigamiTheme->backgroundColor()}, + {Svg::Highlight, m_kirigamiTheme->highlightColor()}, + {Svg::HighlightedText, m_kirigamiTheme->highlightedTextColor()}, + {Svg::PositiveText, m_kirigamiTheme->positiveTextColor()}, + {Svg::NeutralText, m_kirigamiTheme->neutralTextColor()}, + {Svg::NegativeText, m_kirigamiTheme->negativeTextColor()}, + }); }; applyTheme(); connect(m_kirigamiTheme, &Kirigami::Platform::PlatformTheme::colorsChanged, this, applyTheme); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/declarativeimports/svgitem.cpp new/ksvg-6.18.0/src/declarativeimports/svgitem.cpp --- old/ksvg-6.17.0/src/declarativeimports/svgitem.cpp 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/declarativeimports/svgitem.cpp 2025-09-08 10:14:36.000000000 +0200 @@ -64,13 +64,15 @@ m_svg->clearColorOverrides(); return; } - m_svg->setColor(Svg::Text, m_kirigamiTheme->textColor()); - m_svg->setColor(Svg::Background, m_kirigamiTheme->backgroundColor()); - m_svg->setColor(Svg::Highlight, m_kirigamiTheme->highlightColor()); - m_svg->setColor(Svg::HighlightedText, m_kirigamiTheme->highlightedTextColor()); - m_svg->setColor(Svg::PositiveText, m_kirigamiTheme->positiveTextColor()); - m_svg->setColor(Svg::NeutralText, m_kirigamiTheme->neutralTextColor()); - m_svg->setColor(Svg::NegativeText, m_kirigamiTheme->negativeTextColor()); + m_svg->setColors({ + {Svg::Text, m_kirigamiTheme->textColor()}, + {Svg::Background, m_kirigamiTheme->backgroundColor()}, + {Svg::Highlight, m_kirigamiTheme->highlightColor()}, + {Svg::HighlightedText, m_kirigamiTheme->highlightedTextColor()}, + {Svg::PositiveText, m_kirigamiTheme->positiveTextColor()}, + {Svg::NeutralText, m_kirigamiTheme->neutralTextColor()}, + {Svg::NegativeText, m_kirigamiTheme->negativeTextColor()}, + }); }; applyTheme(); connect(m_kirigamiTheme, &Kirigami::Platform::PlatformTheme::colorsChanged, this, applyTheme); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/CMakeLists.txt new/ksvg-6.18.0/src/ksvg/CMakeLists.txt --- old/ksvg-6.17.0/src/ksvg/CMakeLists.txt 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/CMakeLists.txt 2025-09-08 10:14:36.000000000 +0200 @@ -57,7 +57,6 @@ set(KSvg_BUILD_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/KSvg ) target_include_directories(KF6Svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/framesvg.cpp new/ksvg-6.18.0/src/ksvg/framesvg.cpp --- old/ksvg-6.17.0/src/ksvg/framesvg.cpp 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/framesvg.cpp 2025-09-08 10:14:36.000000000 +0200 @@ -44,6 +44,12 @@ : Svg(parent) , d(new FrameSvgPrivate(this)) { + connect(this, &FrameSvg::colorSetChanged, this, [this]() { + if (!d->repaintBlocked) { + d->updateFrameData(Svg::d->lastModified); + } + }); + connect(this, &FrameSvg::repaintNeeded, this, std::bind(&FrameSvgPrivate::updateNeeded, d)); } @@ -672,10 +678,14 @@ const QString oldPath = fd->imagePath; const FrameSvg::EnabledBorders oldBorders = fd->enabledBorders; const QSizeF currentSize = fd->frameSize; + const int oldColorSet = fd->colorSet; + const auto oldColors = fd->colorOverrides; fd->enabledBorders = enabledBorders; fd->frameSize = pendingFrameSize; fd->imagePath = q->imagePath(); + fd->colorSet = q->colorSet(); + fd->colorOverrides = q->colorOverrides(); newKey = qHash(cacheId(fd.data(), prefix)); @@ -683,6 +693,8 @@ fd->enabledBorders = oldBorders; fd->frameSize = currentSize; fd->imagePath = oldPath; + fd->colorSet = oldColorSet; + fd->colorOverrides = oldColors; // FIXME: something more efficient than string comparison? if (oldKey == newKey) { @@ -711,6 +723,8 @@ fd->enabledBorders = enabledBorders; fd->frameSize = pendingFrameSize; fd->imagePath = q->imagePath(); + fd->colorSet = q->colorSet(); + fd->colorOverrides = q->colorOverrides(); fd->lastModified = lastModified; // was fd just created empty now? if (newKey == 0) { @@ -816,6 +830,16 @@ SvgPrivate::CacheId FrameSvgPrivate::cacheId(FrameData *frame, const QString &prefixToSave) const { + std::vector<size_t> parts; + const auto colors = frame->colorOverrides.values(); + for (const QColor &c : std::as_const(colors)) { + parts.push_back(::qHash(c.red())); + parts.push_back(::qHash(c.green())); + parts.push_back(::qHash(c.blue())); + parts.push_back(::qHash(c.alpha())); + } + const size_t colorsHash = qHashRange(parts.begin(), parts.end(), SvgRectsCache::s_seed); + const QSize size = frameSize(frame).toSize(); return SvgPrivate::CacheId{double(size.width()), double(size.height()), @@ -823,9 +847,9 @@ prefixToSave, q->status(), q->devicePixelRatio(), - q->colorSet(), + frame->colorSet, + colorsHash, (uint)frame->enabledBorders, - 0, q->Svg::d->lastModified}; } @@ -1037,6 +1061,13 @@ d->updateFrameData(Svg::d->lastModified); } } + +void FrameSvg::colorOverridesChange() +{ + if (!d->repaintBlocked) { + d->updateFrameData(Svg::d->lastModified); + } +} } // KSvg namespace diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/framesvg.h new/ksvg-6.18.0/src/ksvg/framesvg.h --- old/ksvg-6.17.0/src/ksvg/framesvg.h 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/framesvg.h 2025-09-08 10:14:36.000000000 +0200 @@ -457,8 +457,12 @@ Q_INVOKABLE int minimumDrawingWidth(); private: + // Never call this from an inline function + void colorOverridesChange(); + FrameSvgPrivate *const d; friend class FrameData; + friend class Svg; }; Q_DECLARE_OPERATORS_FOR_FLAGS(FrameSvg::EnabledBorders) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/private/framesvg_p.h new/ksvg-6.18.0/src/ksvg/private/framesvg_p.h --- old/ksvg-6.17.0/src/ksvg/private/framesvg_p.h 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/private/framesvg_p.h 2025-09-08 10:14:36.000000000 +0200 @@ -72,6 +72,8 @@ QString imagePath; QString prefix; QString requestedPrefix; + int colorSet = 0; + QMap<Svg::StyleSheetColor, QColor> colorOverrides; FrameSvg::EnabledBorders enabledBorders; QPixmap cachedBackground; QCache<uint, QRegion> cachedMasks; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/svg.cpp new/ksvg-6.18.0/src/ksvg/svg.cpp --- old/ksvg-6.17.0/src/ksvg/svg.cpp 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/svg.cpp 2025-09-08 10:14:36.000000000 +0200 @@ -1143,26 +1143,55 @@ void Svg::setColor(StyleSheetColor colorName, const QColor &color) { - if (d->colorOverrides.value(colorName) == color) { - return; + setColors({ + {colorName, color}, + }); +} + +void Svg::setColors(const QMap<StyleSheetColor, QColor> &colors) +{ + bool changed = false; + for (const auto &[colorName, color] : colors.asKeyValueRange()) { + if (d->colorOverrides.value(colorName) != color) { + changed = true; + + if (color.isValid()) { + d->colorOverrides[colorName] = color; + } else { + d->colorOverrides.remove(colorName); + } + } } - if (color.isValid()) { - d->colorOverrides[colorName] = color; - } else { - d->colorOverrides.remove(colorName); + if (!changed) { + return; } + d->stylesheetOverride.clear(); d->eraseRenderer(); + + // Ideally, there should be a signal but adding a new signal can make ksvg users crash in QML cache code. + if (auto frameSvg = qobject_cast<FrameSvg *>(this)) { + frameSvg->colorOverridesChange(); + } + Q_EMIT repaintNeeded(); } +QMap<Svg::StyleSheetColor, QColor> Svg::colorOverrides() const +{ + return d->colorOverrides; +} + void Svg::clearColorOverrides() { d->colorOverrides.clear(); d->stylesheetOverride.clear(); d->eraseRenderer(); + if (auto frameSvg = qobject_cast<FrameSvg *>(this)) { + frameSvg->colorOverridesChange(); + } Q_EMIT repaintNeeded(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.17.0/src/ksvg/svg.h new/ksvg-6.18.0/src/ksvg/svg.h --- old/ksvg-6.17.0/src/ksvg/svg.h 2025-08-01 12:39:05.000000000 +0200 +++ new/ksvg-6.18.0/src/ksvg/svg.h 2025-09-08 10:14:36.000000000 +0200 @@ -624,6 +624,21 @@ void setColor(StyleSheetColor colorName, const QColor &color); /*! + * Sets the specified stylesheet \a colors. + * + * \sa color(), colorOverrides(), clearColorOverrides() + * \since 6.18 + */ + void setColors(const QMap<StyleSheetColor, QColor> &colors); + + /*! + * Returns the color overrides. + * + * \since 6.18 + */ + QMap<StyleSheetColor, QColor> colorOverrides() const; + + /*! * */ void clearColorOverrides();
