aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystemparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-18 10:09:16 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-18 15:04:46 +0200
commitd1fb46645309780437743052159468f743e28d68 (patch)
tree465ca79619068b82d099bed2c3c5d5332428ba89 /sources/shiboken2/ApiExtractor/typesystemparser.cpp
parentdc7acd1f2dc750c3c8602203ae1558b0e60a3c17 (diff)
shiboken2: Add attribute for generating "using namespace"
Make it possible to turn off the generation of using namespace. This is required in Qt 6 to avoid a clash between Qt3DCore::QBuffer and QBuffer used in __repr__. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Iaaf3e67f0ffaae86e2de82b9a1b8fe7d00c74e6b Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystemparser.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystemparser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystemparser.cpp b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
index 207c99c7a..a56c5c698 100644
--- a/sources/shiboken2/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
@@ -67,6 +67,7 @@ static inline QString flagsAttribute() { return QStringLiteral("flags"); }
static inline QString forceAbstractAttribute() { return QStringLiteral("force-abstract"); }
static inline QString forceIntegerAttribute() { return QStringLiteral("force-integer"); }
static inline QString formatAttribute() { return QStringLiteral("format"); }
+static inline QString generateUsingAttribute() { return QStringLiteral("generate-using"); }
static inline QString classAttribute() { return QStringLiteral("class"); }
static inline QString generateAttribute() { return QStringLiteral("generate"); }
static inline QString genericClassAttribute() { return QStringLiteral("generic-class"); }
@@ -1374,6 +1375,8 @@ NamespaceTypeEntry *
} else if (attributeName == generateAttribute()) {
if (!convertBoolean(attributes->takeAt(i).value(), generateAttribute(), true))
visibility = TypeSystem::Visibility::Invisible;
+ } else if (attributeName == generateUsingAttribute()) {
+ result->setGenerateUsing(convertBoolean(attributes->takeAt(i).value(), generateUsingAttribute(), true));
}
}