diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-22 08:52:16 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-26 10:12:44 +0200 |
commit | 42b6ca327a4a30671ab8c031d33c5e31e503cf21 (patch) | |
tree | 603a8bcc2f5e86e782adce6f496c5f9e21ced82f /sources/shiboken6/ApiExtractor/parser/codemodel.cpp | |
parent | e4a9c6caea4b19d1b0bfd03bc5500bf48c9c44d5 (diff) |
Migrate from QLatin1Char to UTF-16 char literals
Preparing for the deprecation of QLatin1Char in 6.4.
Task-number: QTBUG-98434
Change-Id: I8bc92aa9f4e6dbfcb12d2025c5a1e760ab4f0d7f
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 42666b5bab09a80a65ae8f61961985f4923b7d65)
Diffstat (limited to 'sources/shiboken6/ApiExtractor/parser/codemodel.cpp')
-rw-r--r-- | sources/shiboken6/ApiExtractor/parser/codemodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken6/ApiExtractor/parser/codemodel.cpp b/sources/shiboken6/ApiExtractor/parser/codemodel.cpp index 957ea303d..ba5b9022b 100644 --- a/sources/shiboken6/ApiExtractor/parser/codemodel.cpp +++ b/sources/shiboken6/ApiExtractor/parser/codemodel.cpp @@ -586,7 +586,7 @@ void _ScopeModelItem::purgeClassDeclarations() // For an empty class, check if there is a matching template // definition, and remove it if this is the case. if (!klass->isTemplate() && klass->isEmpty()) { - const QString definitionPrefix = klass->name() + QLatin1Char('<'); + const QString definitionPrefix = klass->name() + u'<'; const bool definitionFound = std::any_of(m_classes.cbegin(), m_classes.cend(), [definitionPrefix] (const ClassModelItem &c) { @@ -663,7 +663,7 @@ public: const QString &itemName = item->name(); if (!itemName.startsWith(m_name)) return false; - return itemName.size() == m_name.size() || itemName.at(m_name.size()) == QLatin1Char('<'); + return itemName.size() == m_name.size() || itemName.at(m_name.size()) == u'<'; } private: @@ -674,7 +674,7 @@ private: ClassModelItem _ScopeModelItem::findClass(const QString &name) const { // A fully qualified template is matched by name only - const ClassList::const_iterator it = name.contains(QLatin1Char('<')) + const ClassList::const_iterator it = name.contains(u'<') ? std::find_if(m_classes.begin(), m_classes.end(), ModelItemNamePredicate<_ClassModelItem>(name)) : std::find_if(m_classes.begin(), m_classes.end(), ClassNamePredicate(name)); return it != m_classes.end() ? *it : ClassModelItem(); |