diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-22 11:04:37 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-25 18:45:26 +0200 |
| commit | a3e882b06eda8f9a63cf3834a99640034775269b (patch) | |
| tree | 3598dfbfdfcbd5e345eaa2c6ea86a8445d0feb5d /sources/shiboken6/ApiExtractor/qtdocparser.cpp | |
| parent | 3d8431182e97c9c87220e8d8ddfcd3abde22e31d (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/qtdocparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/qtdocparser.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sources/shiboken6/ApiExtractor/qtdocparser.cpp b/sources/shiboken6/ApiExtractor/qtdocparser.cpp index 7ac765781..672451e35 100644 --- a/sources/shiboken6/ApiExtractor/qtdocparser.cpp +++ b/sources/shiboken6/ApiExtractor/qtdocparser.cpp @@ -39,10 +39,14 @@ #include "reporthandler.h" #include "typesystem.h" +#include "qtcompat.h" + #include <QtCore/QDir> #include <QtCore/QFile> #include <QtCore/QUrl> +using namespace Qt::StringLiterals; + enum { debugFunctionSearch = 0 }; static inline QString briefStartElement() { return QStringLiteral("<brief>"); } @@ -164,7 +168,7 @@ QString QtDocParser::queryFunctionDocumentation(const QString &sourceFileName, classDocumentation.findFunctionCandidates(func->name(), func->isConstant()); if (candidates.isEmpty()) { *errorMessage = msgCannotFindDocumentation(sourceFileName, func.data()) - + u" (no matches)"_qs; + + u" (no matches)"_s; return {}; } @@ -181,8 +185,8 @@ QString QtDocParser::queryFunctionDocumentation(const QString &sourceFileName, || funcFlags.testFlag(AbstractMetaFunction::Flag::OperatorTrailingClassArgumentRemoved)) { QString classType = metaClass->qualifiedCppName(); if (!funcFlags.testFlag(AbstractMetaFunction::Flag::OperatorClassArgumentByValue)) { - classType.prepend(u"const "_qs); - classType.append(u" &"_qs); + classType.prepend(u"const "_s); + classType.append(u" &"_s); } if (funcFlags.testFlag(AbstractMetaFunction::Flag::OperatorLeadingClassArgumentRemoved)) fq.parameters.prepend(classType); @@ -233,7 +237,7 @@ static QString extractBrief(QString *value) const auto briefLength = briefEnd + briefEndElement().size() - briefStart; QString briefValue = value->mid(briefStart, briefLength); briefValue.insert(briefValue.size() - briefEndElement().size(), - QLatin1String("<rst> More_...</rst>")); + u"<rst> More_...</rst>"_s); value->remove(briefStart, briefLength); return briefValue; } @@ -252,7 +256,7 @@ void QtDocParser::fillDocumentation(AbstractMetaClass* metaClass) QString sourceFileRoot = documentationDataDirectory() + u'/' + metaClass->qualifiedCppName().toLower(); - sourceFileRoot.replace(QLatin1String("::"), QLatin1String("-")); + sourceFileRoot.replace(u"::"_s, u"-"_s); QFileInfo sourceFile(sourceFileRoot + QStringLiteral(".webxml")); if (!sourceFile.exists()) @@ -355,7 +359,7 @@ Documentation QtDocParser::retrieveModuleDocumentation(const QString& name) const QString prefix = documentationDataDirectory() + u'/' + moduleName.toLower(); - const QString sourceFile = prefix + u"-index.webxml"_qs; + const QString sourceFile = prefix + u"-index.webxml"_s; if (!QFile::exists(sourceFile)) { qCWarning(lcShibokenDoc).noquote().nospace() << "Can't find qdoc file for module " << name << ", tried: " @@ -378,7 +382,7 @@ Documentation QtDocParser::retrieveModuleDocumentation(const QString& name) } // If a QML module info file exists, insert a link to the Qt docs. - const QFileInfo qmlModuleFi(prefix + QLatin1String("-qmlmodule.webxml")); + const QFileInfo qmlModuleFi(prefix + u"-qmlmodule.webxml"_s); if (qmlModuleFi.isFile()) { QString docString = doc.detailed(); const int pos = docString.lastIndexOf(u"</description>"); |
