aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-22 09:57:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-25 12:13:45 +0200
commitda43cf70a9d125576f3795d7088e0100a4035ce5 (patch)
tree214954e777b54eb9483df3939dbb26a08eb0fc2a /sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
parent42666b5bab09a80a65ae8f61961985f4923b7d65 (diff)
Migrate from QLatin1String to UTF-16 string literals
Use the QStringView overloads of the comparison functions in order to minimize merge conflicts after the deprecation of QLatin1String in 6.4. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: Ia0df398ab8f3e61a0b629971ccbec2273a78499b Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index ac5843cac..7aee6ed67 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -347,7 +347,7 @@ FunctionModelItem BuilderPrivate::createFunction(const CXCursor &cursor,
{
QString name = getCursorSpelling(cursor);
// Apply type fixes to "operator X &" -> "operator X&"
- if (name.startsWith(QLatin1String("operator ")))
+ if (name.startsWith(u"operator "))
name = fixTypeName(name);
FunctionModelItem result(new _FunctionModelItem(m_model, name));
setFileName(cursor, result.data());
@@ -588,7 +588,7 @@ TypeInfo BuilderPrivate::createTypeInfoUncached(const CXType &type,
// the typedef source is named "type-parameter-0-0". Convert it back to the
// template parameter name. The CXTypes are the same for all templates and
// must not be cached.
- if (!m_currentClass.isNull() && typeName.startsWith(QLatin1String("type-parameter-0-"))) {
+ if (!m_currentClass.isNull() && typeName.startsWith(u"type-parameter-0-")) {
if (cacheable != nullptr)
*cacheable = false;
bool ok;
@@ -939,9 +939,9 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
break;
case CXCursor_AnnotateAttr: {
const QString annotation = getCursorSpelling(cursor);
- if (annotation == QLatin1String("qt_slot"))
+ if (annotation == u"qt_slot")
d->m_currentFunctionType = CodeModel::Slot;
- else if (annotation == QLatin1String("qt_signal"))
+ else if (annotation == u"qt_signal")
d->m_currentFunctionType = CodeModel::Signal;
else
d->m_currentFunctionType = CodeModel::Normal;