aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-02 10:35:13 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-02 10:27:30 +0000
commit844f76cf8e01377fa3de6ac8c61eb8342c0c31f1 (patch)
tree386a3cccc9226590e526cd64e0332a128c264146 /sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
parentaf294cd6e1a55ee50ccb1dee66a401386bc351db (diff)
shiboken6: Remove deprecated typesystem tags
<remove> and <access> were deprecated in favor of attributes on the functions in PySide2. Similarly for <rename>, but it is still used as a child of <modify-argument>. Leave this usage in place, but add parsing of the rename attribute to <modify-argument>. Change-Id: I8e80ba13a3e4af1df0448bd0de034d242a9fdeb4 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp b/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
index 7a52b9b33..0d05dfb30 100644
--- a/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
@@ -421,20 +421,20 @@ void TestAddFunction::testAddFunctionWithApiVersion()
void TestAddFunction::testModifyAddedFunction()
{
const char cppCode[] = "class Foo { };\n";
- const char xmlCode[] = "\
- <typesystem package='Package'>\n\
- <primitive-type name='float'/>\n\
- <primitive-type name='int'/>\n\
- <value-type name='Foo'>\n\
- <add-function signature='method(float, int)'>\n\
- <inject-code class='target' position='beginning'>custom_code();</inject-code>\n\
- <modify-argument index='2'>\n\
- <replace-default-expression with='0'/>\n\
- <rename to='varName'/>\n\
- </modify-argument>\n\
- </add-function>\n\
- </value-type>\n\
- </typesystem>\n";
+ const char xmlCode[] = R"(
+<typesystem package='Package'>
+ <primitive-type name='float'/>
+ <primitive-type name='int'/>
+ <value-type name='Foo'>
+ <add-function signature='method(float, int)'>
+ <inject-code class='target' position='beginning'>custom_code();</inject-code>
+ <modify-argument index='2' rename='varName'>
+ <replace-default-expression with='0'/>
+ </modify-argument>
+ </add-function>
+ </value-type>
+</typesystem>
+)";
QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode));
QVERIFY(!builder.isNull());
AbstractMetaClassList classes = builder->classes();