diff --git a/sigil-gt6.8-qchar-778.patch b/sigil-gt6.8-qchar-778.patch new file mode 100644 index 0000000..b5f432f --- /dev/null +++ b/sigil-gt6.8-qchar-778.patch @@ -0,0 +1,61 @@ +From 08ed327cf220eca9c814ea2a65adace24a4cf3d9 Mon Sep 17 00:00:00 2001 +From: Echo J +Date: Sat, 19 Oct 2024 19:43:17 +0300 +Subject: [PATCH] Parsers: Make QChar conversions explicit + +This is required without the QT_IMPLICIT_QCHAR_CONSTRUCTION macro +--- + src/Parsers/qCSSParser.cpp | 2 +- + src/Parsers/qCSSUtils.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: Sigil-2.3.1/src/Parsers/qCSSParser.cpp +=================================================================== +--- Sigil-2.3.1.orig/src/Parsers/qCSSParser.cpp ++++ Sigil-2.3.1/src/Parsers/qCSSParser.cpp +@@ -250,7 +250,7 @@ QString CSSParser::unicode(QString& istr + (CSSUtils::hexdec(add) > 96 && CSSUtils::hexdec(add) < 123)) + { + QString msg = "Replaced unicode notation: Changed \\" + CSSUtils::rtrim(add) + " to "; +- add = static_cast(CSSUtils::hexdec(add)); ++ add = QChar(static_cast(CSSUtils::hexdec(add))); + msg += add; + log(msg,Information); + replaced = true; +Index: Sigil-2.3.1/src/Parsers/qCSSUtils.cpp +=================================================================== +--- Sigil-2.3.1.orig/src/Parsers/qCSSUtils.cpp ++++ Sigil-2.3.1/src/Parsers/qCSSUtils.cpp +@@ -98,7 +98,7 @@ QChar CSSUtils::s_at(const QString &istr + { + if(pos > (istring.length()-1) || pos < 0) + { +- return 0; ++ return QChar(0); + } + else + { +@@ -168,7 +168,7 @@ QString CSSUtils::build_value(const QVec + + bool CSSUtils::ctype_space(const QChar c) + { +- return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == 11); ++ return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == QChar(11)); + } + + +Index: Sigil-2.3.1/src/qt6sigil.cmake +=================================================================== +--- Sigil-2.3.1.orig/src/qt6sigil.cmake ++++ Sigil-2.3.1/src/qt6sigil.cmake +@@ -2,10 +2,6 @@ + # Build Sigil against Qt6 - requires cmake 3.16+ and a C++17 compiler + ############################################################################# + +-# quiet Qt 6 deprecat4ed warnings +-# add_definitions(-DQT_NO_DEPRECATED_WARNINGS) +-add_definitions(-DQT_IMPLICIT_QCHAR_CONSTRUCTION) +- + if (CMAKE_VERSION VERSION_GREATER "3.27.9") + cmake_policy(SET CMP0153 OLD) + endif() diff --git a/sigil.changes b/sigil.changes index 915801e..4f240dc 100644 --- a/sigil.changes +++ b/sigil.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 17 14:24:42 UTC 2024 - ecsos + +- Add sigil-gt6.8-qchar-778.patch to fix build error under + Tumbleweed with Qt 6.8. + ------------------------------------------------------------------- Sat Sep 7 14:43:25 UTC 2024 - ecsos diff --git a/sigil.spec b/sigil.spec index 8a67950..ef8af5d 100644 --- a/sigil.spec +++ b/sigil.spec @@ -30,11 +30,13 @@ Source1: https://github.com/Sigil-Ebook/sigil-user-guide/releases/downloa Source2: %{name}.desktop # PATCH-FIX-OPENSUSE Disabled __DATE__ and __TIME__ which is replaced later in pre section Patch0: %{name}-gt-0.9.0-Dialogs-About.cpp.patch +# PATCH-FIX-UPSTREAM Remove implicit QChar conversions #778 +Patch1: sigil-gt6.8-qchar-778.patch BuildRequires: boost-devel BuildRequires: cmake >= 3.0 BuildRequires: dos2unix BuildRequires: fdupes -%if 0%{?suse_version} <= 1600 +%if 0%{?suse_version} < 1600 BuildRequires: gcc12 BuildRequires: gcc12-c++ %else