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/clangparser/clangbuilder.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/clangparser/clangbuilder.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp index 7aee6ed67..44f3e97c4 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp @@ -33,6 +33,8 @@ #include <codemodel.h> #include <reporthandler.h> +#include "qtcompat.h" + #include <QtCore/QDebug> #include <QtCore/QDir> #include <QtCore/QHash> @@ -44,6 +46,8 @@ #include <cstring> #include <ctype.h> +using namespace Qt::StringLiterals; + namespace clang { static inline QString colonColon() { return QStringLiteral("::"); } @@ -289,8 +293,7 @@ static QString msgCannotDetermineException(const std::string_view &snippetV) if (truncate) snippet += QStringLiteral("..."); - return QLatin1String("Cannot determine exception specification: \"") - + snippet + u'"'; + return u"Cannot determine exception specification: \""_s + snippet + u'"'; } // Return whether noexcept(<value>) throws. noexcept() takes a constexpr value. @@ -891,8 +894,8 @@ FileModelItem Builder::dom() const static QString msgOutOfOrder(const CXCursor &cursor, const char *expectedScope) { return getCursorKindName(cursor.kind) + u' ' - + getCursorSpelling(cursor) + QLatin1String(" encountered outside ") - + QLatin1String(expectedScope) + u'.'; + + getCursorSpelling(cursor) + u" encountered outside "_s + + QLatin1StringView(expectedScope) + u'.'; } static CodeModel::ClassType codeModelClassTypeFromCursor(CXCursorKind kind) @@ -1080,7 +1083,7 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor) const NamespaceModelItem parentNamespaceItem = qSharedPointerDynamicCast<_NamespaceModelItem>(d->m_scopeStack.back()); if (parentNamespaceItem.isNull()) { const QString message = msgOutOfOrder(cursor, "namespace") - + QLatin1String(" (current scope: ") + d->m_scopeStack.back()->name() + u')'; + + u" (current scope: "_s + d->m_scopeStack.back()->name() + u')'; const Diagnostic d(message, cursor, CXDiagnostic_Error); qWarning() << d; appendDiagnostic(d); |
