aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/docparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-22 11:04:37 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-25 18:45:26 +0200
commita3e882b06eda8f9a63cf3834a99640034775269b (patch)
tree3598dfbfdfcbd5e345eaa2c6ea86a8445d0feb5d /sources/shiboken6/ApiExtractor/docparser.cpp
parent3d8431182e97c9c87220e8d8ddfcd3abde22e31d (diff)
shiboken6: Remove deprecated QLatin1String
Introduce a compatibility header to provide the 6.4 API to 6.3 to reduce merge conflicts. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: Iab3f9f894019b4135afa96b930325966348210d0 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/docparser.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/docparser.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/sources/shiboken6/ApiExtractor/docparser.cpp b/sources/shiboken6/ApiExtractor/docparser.cpp
index f543e2eda..9a7fdd866 100644
--- a/sources/shiboken6/ApiExtractor/docparser.cpp
+++ b/sources/shiboken6/ApiExtractor/docparser.cpp
@@ -42,6 +42,8 @@
#include <QtCore/QDir>
#include <QtCore/QTextStream>
+#include "qtcompat.h"
+
#include <cstdlib>
#ifdef HAVE_LIBXSLT
# include <libxslt/xsltutils.h>
@@ -50,6 +52,8 @@
#include <algorithm>
+using namespace Qt::StringLiterals;
+
DocParser::DocParser()
{
#ifdef HAVE_LIBXSLT
@@ -139,14 +143,14 @@ R"(<xsl:template match="/">
return xml;
}
- QString xsl = QLatin1String(xslPrefix);
+ QString xsl = QLatin1StringView(xslPrefix);
for (const DocModification &mod : mods) {
if (isXpathDocModification(mod)) {
QString xpath = mod.xpath();
- xpath.replace(u'"', QLatin1String("&quot;"));
- xsl += QLatin1String("<xsl:template match=\"")
- + xpath + QLatin1String("\">")
- + mod.code() + QLatin1String("</xsl:template>\n");
+ xpath.replace(u'"', u"&quot;"_s);
+ xsl += u"<xsl:template match=\""_s
+ + xpath + u"\">"_s
+ + mod.code() + u"</xsl:template>\n"_s;
}
}
@@ -156,7 +160,7 @@ R"(<xsl:template match="/">
qCWarning(lcShibokenDoc, "%s",
qPrintable(msgXpathDocModificationError(mods, errorMessage)));
if (result == xml) {
- const QString message = QLatin1String("Query did not result in any modifications to \"")
+ const QString message = u"Query did not result in any modifications to \""_s
+ xml + u'"';
qCWarning(lcShibokenDoc, "%s",
qPrintable(msgXpathDocModificationError(mods, message)));