aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/xmlutils.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/xmlutils.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/xmlutils.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/xmlutils.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/sources/shiboken6/ApiExtractor/xmlutils.cpp b/sources/shiboken6/ApiExtractor/xmlutils.cpp
index 2cd2e3b81..98f990e02 100644
--- a/sources/shiboken6/ApiExtractor/xmlutils.cpp
+++ b/sources/shiboken6/ApiExtractor/xmlutils.cpp
@@ -30,6 +30,10 @@
#include "xmlutils_libxslt.h"
+#include "qtcompat.h"
+
+using namespace Qt::StringLiterals;
+
XQuery::XQuery() = default;
XQuery::~XQuery() = default;
@@ -37,8 +41,8 @@ XQuery::~XQuery() = default;
QString XQuery::evaluate(QString xPathExpression, QString *errorMessage)
{
// XQuery can't have invalid XML characters
- xPathExpression.replace(u'&', QLatin1String("&amp;"));
- xPathExpression.replace(u'<', QLatin1String("&lt;"));
+ xPathExpression.replace(u'&', u"&amp;"_s);
+ xPathExpression.replace(u'<', u"&lt;"_s);
return doEvaluate(xPathExpression, errorMessage);
}
@@ -47,7 +51,7 @@ QSharedPointer<XQuery> XQuery::create(const QString &focus, QString *errorMessag
#if defined(HAVE_LIBXSLT)
return libXml_createXQuery(focus, errorMessage);
#else
- *errorMessage = QLatin1String(__FUNCTION__) + QLatin1String(" is not implemented.");
+ *errorMessage = QLatin1StringView(__FUNCTION__) + u" is not implemented."_s;
return QSharedPointer<XQuery>();
#endif
}
@@ -57,7 +61,7 @@ QString xsl_transform(const QString &xml, const QString &xsl, QString *errorMess
#if defined(HAVE_LIBXSLT)
return libXslt_transform(xml, xsl, errorMessage);
#else
- *errorMessage = QLatin1String(__FUNCTION__) + QLatin1String(" is not implemented.");
+ *errorMessage = QLatin1StringView(__FUNCTION__) + u" is not implemented."_s;
return xml;
#endif
}