summarylogtreecommitdiffstats
path: root/0003-Fix-compile-error-about-missing-QStringView-overload.patch
diff options
context:
space:
mode:
Diffstat (limited to '0003-Fix-compile-error-about-missing-QStringView-overload.patch')
-rw-r--r--0003-Fix-compile-error-about-missing-QStringView-overload.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/0003-Fix-compile-error-about-missing-QStringView-overload.patch b/0003-Fix-compile-error-about-missing-QStringView-overload.patch
new file mode 100644
index 000000000000..5dff89d21c00
--- /dev/null
+++ b/0003-Fix-compile-error-about-missing-QStringView-overload.patch
@@ -0,0 +1,37 @@
+From e7b3391c2b5f568ad03282ee0f242e42170b22d0 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Mon, 12 Sep 2022 17:38:47 +0200
+Subject: [PATCH 3/3] Fix compile error about missing QStringView overload
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Prevents the following compiler error:
+```
+/build/mingw-w64-qt6-activeqt/src/qtactiveqt-everywhere-src-6.3.2/tools/dumpcpp/main.cpp:599:41: error: no match for ‘operator+’ (operand types are ‘const QString’ and ‘QStringView’)
+ 599 | moCode.insert(startType, ns + QStringView(u"::"));
+ | ~~ ^ ~~~~~~~~~~~~~~~~~~
+ | | |
+ | | QStringView
+ | const QString
+```
+---
+ tools/dumpcpp/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
+index ef44327..997fa24 100644
+--- a/tools/dumpcpp/main.cpp
++++ b/tools/dumpcpp/main.cpp
+@@ -595,7 +595,7 @@ bool generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
+ const auto namespaceForTypeEntry = namespaceForType.constFind(type.toUtf8());
+ if (namespaceForTypeEntry != namespaceForType.constEnd()) {
+ const auto ns = QString::fromUtf8(namespaceForTypeEntry.value());
+- moCode.insert(startType, ns + QStringView(u"::"));
++ moCode.insert(startType, ns + QStringLiteral("::"));
+ }
+ nextTypeAndForceComplete = startType + lengthType;
+ } while (true);
+--
+2.37.3
+