From 643c3b04c487f04cb5527a258496bafa265759eb Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sun, 8 Dec 2024 23:24:02 -0600 Subject: [PATCH] Fix FTBFS with Qt 6.9 --- debian/patches/series | 1 + debian/patches/test-qt69-build.patch | 39 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 debian/patches/test-qt69-build.patch diff --git a/debian/patches/series b/debian/patches/series index bfdb363..54d1bef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ ubuntu-gettext-translations.patch +test-qt69-build.patch diff --git a/debian/patches/test-qt69-build.patch b/debian/patches/test-qt69-build.patch new file mode 100644 index 0000000..5f3de44 --- /dev/null +++ b/debian/patches/test-qt69-build.patch @@ -0,0 +1,39 @@ +Description: https://github.com/lxqt/libqtxdg/issues/310 + +diff --git a/src/xdgiconloader/xdgiconloader.cpp b/src/xdgiconloader/xdgiconloader.cpp +index c299cca..2353ba4 100644 +--- a/src/xdgiconloader/xdgiconloader.cpp ++++ b/src/xdgiconloader/xdgiconloader.cpp +@@ -439,7 +439,11 @@ QThemeIconInfo XdgIconLoader::findIconHelper(const QString &themeName, + } else if (gSupportsSvg) { + const QString svgPath = subDir + svgIconName; + if (QFile::exists(svgPath)) { +- std::unique_ptr iconEntry = (followColorScheme() && theme.followsColorScheme()) ? std::make_unique() : std::make_unique(); ++ std::unique_ptr iconEntry; ++ if (followColorScheme() && theme.followsColorScheme()) ++ iconEntry = std::make_unique(); ++ else ++ iconEntry = std::make_unique(); + iconEntry->dir = dirInfo; + iconEntry->filename = svgPath; + info.entries.push_back(std::move(iconEntry)); +diff --git a/src/xdgiconloader/xdgiconloader_p.h b/src/xdgiconloader/xdgiconloader_p.h +index 6c5f17f..cb990a9 100644 +--- a/src/xdgiconloader/xdgiconloader_p.h ++++ b/src/xdgiconloader/xdgiconloader_p.h +@@ -61,13 +61,14 @@ + + class XdgIconLoader; + +-struct ScalableFollowsColorEntry : public ScalableEntry ++struct ScalableFollowsColorEntry : public QIconLoaderEngineEntry + { + #if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override; + #else + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override; + #endif ++ QIcon svgIcon; + }; + + //class QIconLoaderEngine : public QIconEngine