aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/xmlutils.cpp
diff options
context:
space:
mode:
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("&"));
- 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
}