summarylogtreecommitdiffstats
path: root/0003-Fix-compile-error-about-missing-QStringView-overload.patch
blob: f40f2d9ec5687d590d8fe0c0d5d825a3b2d9a510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 1ca6f1cd39edfd37fe601cdd341d50dbd75b070d 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 435ab1e..3b8c8e9 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -570,7 +570,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.39.0