diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-28 15:25:26 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-28 19:29:51 +0000 |
commit | 4b091251714aa16de912ef8fd9fed0f452ddf1f8 (patch) | |
tree | b31acffd15c6109c93b4b0888de7acb7619c6d68 | |
parent | dcddf43d39edaf992821767e4e3a53ebbfa15292 (diff) |
shiboken2: Fix the tests for enums in removed namespaces
Change the formatting for better readability and use
the "visible" attribute instead of the deprecated "generate".
Task-number: PYSIDE-1075
Change-Id: Ibbb33d2482c1d682f74d2edce2dd7d3bb1a50821
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | sources/shiboken2/tests/libsample/removednamespaces.h | 36 | ||||
-rw-r--r-- | sources/shiboken2/tests/samplebinding/typesystem_sample.xml | 6 |
2 files changed, 18 insertions, 24 deletions
diff --git a/sources/shiboken2/tests/libsample/removednamespaces.h b/sources/shiboken2/tests/libsample/removednamespaces.h index 1de028d38..c9732f8a6 100644 --- a/sources/shiboken2/tests/libsample/removednamespaces.h +++ b/sources/shiboken2/tests/libsample/removednamespaces.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of Qt for Python. @@ -34,35 +34,29 @@ namespace RemovedNamespace1 { -enum RemovedNamespace1_Enum { - RemovedNamespace1_Enum_Value0 -}; +enum RemovedNamespace1_Enum { RemovedNamespace1_Enum_Value0 }; -enum { - RemovedNamespace1_AnonymousEnum_Value0 -}; +enum { RemovedNamespace1_AnonymousEnum_Value0 }; -namespace RemovedNamespace2 { - enum RemovedNamespace2_Enum { - RemovedNamespace2_Enum_Value0 - }; -} +namespace RemovedNamespace2 +{ + +enum RemovedNamespace2_Enum { RemovedNamespace2_Enum_Value0 }; -} +} // namespace RemovedNamespace2 +} // namespace RemovedNamespace1 namespace UnremovedNamespace { + namespace RemovedNamespace3 { - enum RemovedNamespace3_Enum { - RemovedNamespace3_Enum_Value0 - }; + enum RemovedNamespace3_Enum { RemovedNamespace3_Enum_Value0 }; + + enum { RemovedNamespace3_AnonymousEnum_Value0 }; - enum { - RemovedNamespace3_AnonymousEnum_Value0 - }; -} -} +} // namespace RemovedNamespace3 +} // namespace UnremovedNamespace #endif // REMOVEDNAMESPACE_H diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml index 73f8542fc..17d4b11ec 100644 --- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml +++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml @@ -623,16 +623,16 @@ </add-function> </namespace-type> - <namespace-type name="RemovedNamespace1" generate='no'> + <namespace-type name="RemovedNamespace1" visible='false'> <enum-type name="RemovedNamespace1_Enum" /> - <namespace-type name="RemovedNamespace2" generate='no'> + <namespace-type name="RemovedNamespace2" visible='false'> <enum-type name="RemovedNamespace2_Enum" /> </namespace-type> <enum-type identified-by-value="RemovedNamespace1_AnonymousEnum_Value0" /> </namespace-type> <namespace-type name="UnremovedNamespace"> - <namespace-type name="RemovedNamespace3" generate='no'> + <namespace-type name="RemovedNamespace3" visible='false'> <enum-type name="RemovedNamespace3_Enum" /> <enum-type identified-by-value="RemovedNamespace3_AnonymousEnum_Value0" /> </namespace-type> |