aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-20 17:36:27 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-24 13:56:12 +0100
commite1c45ef7c0e453a6df4e83932317b48dbaad3c6f (patch)
tree4f2a0fd016241b7c352deeed3f56c7283ae3fa35 /sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp
parent0427a1ef134210064e6cdde6fcf8cf40804df13c (diff)
shiboken: Introduce "until" version attribute as opposite of "since"
Prototypically use it for QMessageLogContext, allowing to elegantly build for Qt from version 5.12..now using a single type system file. Fixes: PYSIDE-1191 Change-Id: Iaa7bdc10c7129d84c54e85a09a1c802a409708f9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp b/sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp
index a7e88e437..10bf35d59 100644
--- a/sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testtyperevision.cpp
@@ -77,6 +77,7 @@ void TestTypeRevision::testVersion_data()
QTest::newRow("none") << QString() << 2;
QTest::newRow("1.0") << QString::fromLatin1("1.0") << 1; // Bar20 excluded
QTest::newRow("2.0") << QString::fromLatin1("2.0") << 2;
+ QTest::newRow("3.0") << QString::fromLatin1("3.0") << 1; // Bar excluded by "until"
}
void TestTypeRevision::testVersion()
@@ -90,7 +91,7 @@ class Bar20 {};
)CPP";
const char xmlCode[] = R"XML(
<typesystem package="Foo">
- <value-type name="Bar"/>
+ <value-type name="Bar" until="2.0"/>
<value-type name="Bar20" since="2.0"/>
</typesystem>
)XML";