74 lines
2.6 KiB
Diff
74 lines
2.6 KiB
Diff
From 9b2773e08ba68f3d35c9f58696d8d1b78dd42e26 Mon Sep 17 00:00:00 2001
|
|
From: Echo J <tcg96nougat@gmail.com>
|
|
Date: Sat, 19 Oct 2024 19:39:09 +0300
|
|
Subject: [PATCH 1/2] cmake: Don't set the QT_IMPLICIT_QCHAR_CONSTRUCTION macro
|
|
|
|
Qt 6.8 removed it: https://github.com/qt/qtbase/commit/54f2229714358e742fdc30fc1f1cec8acacb1f29
|
|
(which causes build errors on Arch Linux)
|
|
---
|
|
src/qt6sigil.cmake | 4 ----
|
|
1 file changed, 4 deletions(-)
|
|
|
|
diff --git a/src/qt6sigil.cmake b/src/qt6sigil.cmake
|
|
index 763b0fff14..dada3378a9 100644
|
|
--- a/src/qt6sigil.cmake
|
|
+++ b/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()
|
|
|
|
From 08ed327cf220eca9c814ea2a65adace24a4cf3d9 Mon Sep 17 00:00:00 2001
|
|
From: Echo J <tcg96nougat@gmail.com>
|
|
Date: Sat, 19 Oct 2024 19:43:17 +0300
|
|
Subject: [PATCH 2/2] 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(-)
|
|
|
|
diff --git a/src/Parsers/qCSSParser.cpp b/src/Parsers/qCSSParser.cpp
|
|
index e54c1b1e22..88b42bedb3 100644
|
|
--- a/src/Parsers/qCSSParser.cpp
|
|
+++ b/src/Parsers/qCSSParser.cpp
|
|
@@ -250,7 +250,7 @@ QString CSSParser::unicode(QString& istring, int& i)
|
|
(CSSUtils::hexdec(add) > 96 && CSSUtils::hexdec(add) < 123))
|
|
{
|
|
QString msg = "Replaced unicode notation: Changed \\" + CSSUtils::rtrim(add) + " to ";
|
|
- add = static_cast<int>(CSSUtils::hexdec(add));
|
|
+ add = QChar(static_cast<int>(CSSUtils::hexdec(add)));
|
|
msg += add;
|
|
log(msg,Information);
|
|
replaced = true;
|
|
diff --git a/src/Parsers/qCSSUtils.cpp b/src/Parsers/qCSSUtils.cpp
|
|
index d982510e23..b6c6b49579 100644
|
|
--- a/src/Parsers/qCSSUtils.cpp
|
|
+++ b/src/Parsers/qCSSUtils.cpp
|
|
@@ -98,7 +98,7 @@ QChar CSSUtils::s_at(const QString &istring, const int pos)
|
|
{
|
|
if(pos > (istring.length()-1) || pos < 0)
|
|
{
|
|
- return 0;
|
|
+ return QChar(0);
|
|
}
|
|
else
|
|
{
|
|
@@ -168,7 +168,7 @@ QString CSSUtils::build_value(const QVector<QString> subvalues)
|
|
|
|
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));
|
|
}
|
|
|
|
|