aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetafield.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetafield.h2
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetalang.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetalang.h2
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testtemplates.cpp4
5 files changed, 6 insertions, 6 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetafield.cpp b/sources/shiboken6/ApiExtractor/abstractmetafield.cpp
index 45ea5601a..35306d5a0 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetafield.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetafield.cpp
@@ -64,7 +64,7 @@ AbstractMetaField::~AbstractMetaField() = default;
std::optional<AbstractMetaField>
AbstractMetaField::find(const AbstractMetaFieldList &haystack,
- const QString &needle)
+ QStringView needle)
{
for (const auto &f : haystack) {
if (f.name() == needle)
diff --git a/sources/shiboken6/ApiExtractor/abstractmetafield.h b/sources/shiboken6/ApiExtractor/abstractmetafield.h
index 794cce462..e36f4c30e 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetafield.h
+++ b/sources/shiboken6/ApiExtractor/abstractmetafield.h
@@ -95,7 +95,7 @@ public:
TypeSystem::SnakeCase snakeCase() const;
static std::optional<AbstractMetaField>
- find(const AbstractMetaFieldList &haystack, const QString &needle);
+ find(const AbstractMetaFieldList &haystack, QStringView needle);
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const;
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
index 9e6b3d44e..79a071de6 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
@@ -1230,7 +1230,7 @@ AbstractMetaFunctionCList AbstractMetaClass::cppSignalFunctions() const
}
std::optional<AbstractMetaField>
- AbstractMetaClass::findField(const QString &name) const
+ AbstractMetaClass::findField(QStringView name) const
{
return AbstractMetaField::find(d->m_fields, name);
}
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h
index cc7fd7cec..555b7158f 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h
@@ -182,7 +182,7 @@ public:
void addField(const AbstractMetaField &field);
bool hasStaticFields() const;
- std::optional<AbstractMetaField> findField(const QString &name) const;
+ std::optional<AbstractMetaField> findField(QStringView name) const;
const AbstractMetaEnumList &enums() const;
AbstractMetaEnumList &enums();
diff --git a/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp b/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
index aa1d0414c..53cefaa49 100644
--- a/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
@@ -584,13 +584,13 @@ void TestTemplates::testTemplateTypeDefs()
QCOMPARE(xmlValueMethod->type().cppSignature(), QLatin1String("int"));
// Check whether the m_value field is of type 'int'
- const auto valueField = optionalInt->findField(QLatin1String("m_value"));
+ const auto valueField = optionalInt->findField(u"m_value");
QVERIFY(valueField.has_value());
QCOMPARE(valueField->type().cppSignature(), QLatin1String("int"));
// ditto for typesystem XML
const auto xmlValueField =
- xmlOptionalInt->findField(QLatin1String("m_value"));
+ xmlOptionalInt->findField(u"m_value");
QVERIFY(xmlValueField.has_value());
QCOMPARE(xmlValueField->type().cppSignature(), QLatin1String("int"));
}