aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/messages.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-02 10:52:18 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-30 08:21:03 +0000
commit0f922f604297a2022527f04a696da121396ddc0a (patch)
tree5a40599046ff6ab940aff6d639530237ce08c4d8 /sources/shiboken2/ApiExtractor/messages.cpp
parent7af97fa4136d66bbad6c7907de6e7bd823de2e43 (diff)
Add QStringView/QByteArrayView
View types as function parameters cannot be converted in the standard way shiboken does it: QStringView cppArg0; pythonToCpp(pyArg, &cppArg0); since they reference some other data. Introduce a new "viewOn" member to type system entry for them. It causes the function arguments to be replaced by their viewed-on types (stringview->string) via metatype. Add a test in libsample and a test for QUuid::fromString(QStringView). Test returning QStringView via QRegularExpressionMatch::capturedView(). Task-number: QTBUG-84319 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: PYSIDE-487 Change-Id: Iddb4ea268a54928d290e29012e2738772fae83f0 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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/messages.cpp b/sources/shiboken2/ApiExtractor/messages.cpp
index 55c51ffa4..a660f7e76 100644
--- a/sources/shiboken2/ApiExtractor/messages.cpp
+++ b/sources/shiboken2/ApiExtractor/messages.cpp
@@ -649,6 +649,12 @@ QString msgIncorrectlyNestedName(const QString &name)
+ name + QLatin1String(").");
}
+QString msgCannotFindView(const QString &viewedName, const QString &name)
+{
+ return QLatin1String("Unable to find viewed type ") + viewedName
+ + QLatin1String(" for ") + name;
+}
+
// qtdocgenerator.cpp
QString msgTagWarning(const QXmlStreamReader &reader, const QString &context,