diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-07-04 13:25:31 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-06 16:05:36 +0100 |
commit | 3bc59fc8a2a2e36916bd2c4557b8fb48329085f3 (patch) | |
tree | aeebf1f35c4b5e99a808e5c2c4903bf1fa03a10c /sources/shiboken2/ApiExtractor/messages.cpp | |
parent | e4aa9e13ac6e4d38c473fc32ea4ace3777df7a57 (diff) |
shiboken/typedatabase: Match multiple type entries by name
For smart pointer instantiations, type entries from multiple modules
need to be searched, which is currently not implemented.
Extend the type database to return all type entries by name. Split out
the code finding a type entry from
AbstractMetaBuilderPrivate::translateType() and change it return a
list.
Ignore duplicate primitive types for now since that cannot be easily
avoided.
Task-number: PYSIDE-1024
Change-Id: I4a30b9151b472acff5fba221019a2e321807d4a0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/messages.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/messages.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/messages.cpp b/sources/shiboken2/ApiExtractor/messages.cpp index d4cf53efe..fb9dd573a 100644 --- a/sources/shiboken2/ApiExtractor/messages.cpp +++ b/sources/shiboken2/ApiExtractor/messages.cpp @@ -28,6 +28,7 @@ #include "messages.h" #include "abstractmetalang.h" +#include "typedatabase.h" #include "typesystem.h" #include <codemodel.h> @@ -130,6 +131,28 @@ QString msgNoEnumTypeConflict(const EnumModelItem &enumItem, return result; } +QString msgInterfaceTypeFound(const QString &qualifiedName) +{ + return QLatin1String("Interface type found for \"") + qualifiedName + + QLatin1String("\"."); +} + +QString msgAmbiguousVaryingTypesFound(const QString &qualifiedName, const TypeEntries &te) +{ + QString result = QLatin1String("Ambiguous types of varying types found for \"") + qualifiedName + + QLatin1String("\": "); + QDebug(&result) << te; + return result; +} + +QString msgAmbiguousTypesFound(const QString &qualifiedName, const TypeEntries &te) +{ + QString result = QLatin1String("Ambiguous types found for \"") + qualifiedName + + QLatin1String("\": "); + QDebug(&result) << te; + return result; +} + QString msgUnmatchedParameterType(const ArgumentModelItem &arg, int n, const QString &why) { |