diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/docparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/docparser.cpp | 16 |
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(""")); - xsl += QLatin1String("<xsl:template match=\"") - + xpath + QLatin1String("\">") - + mod.code() + QLatin1String("</xsl:template>\n"); + xpath.replace(u'"', u"""_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))); |
