aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/libsample
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/libsample')
-rw-r--r--sources/shiboken2/tests/libsample/samplenamespace.cpp7
-rw-r--r--sources/shiboken2/tests/libsample/samplenamespace.h6
2 files changed, 12 insertions, 1 deletions
diff --git a/sources/shiboken2/tests/libsample/samplenamespace.cpp b/sources/shiboken2/tests/libsample/samplenamespace.cpp
index ec3da3dbf..e066869d2 100644
--- a/sources/shiboken2/tests/libsample/samplenamespace.cpp
+++ b/sources/shiboken2/tests/libsample/samplenamespace.cpp
@@ -36,6 +36,13 @@ using namespace std;
namespace SampleNamespace
{
+// PYSIDE-817, scoped enums must not be converted to int in the wrappers generated
+// for the protected hacks
+SomeClass::PublicScopedEnum SomeClass::protectedMethodReturningPublicScopedEnum() const
+{
+ return PublicScopedEnum::v1;
+}
+
OutValue
enumInEnumOut(InValue in)
{
diff --git a/sources/shiboken2/tests/libsample/samplenamespace.h b/sources/shiboken2/tests/libsample/samplenamespace.h
index 37a445e51..27fa11290 100644
--- a/sources/shiboken2/tests/libsample/samplenamespace.h
+++ b/sources/shiboken2/tests/libsample/samplenamespace.h
@@ -96,9 +96,11 @@ LIBSAMPLE_API void doSomethingWithArray(const unsigned char* data, unsigned int
LIBSAMPLE_API int enumItemAsDefaultValueToIntArgument(int value = ZeroIn);
-class SomeClass
+class LIBSAMPLE_API SomeClass
{
public:
+ enum class PublicScopedEnum { v1, v2 };
+
class SomeInnerClass
{
public:
@@ -131,6 +133,8 @@ protected:
ProtectedItem0,
ProtectedItem1
};
+
+ PublicScopedEnum protectedMethodReturningPublicScopedEnum() const;
};
class DerivedFromNamespace : public SomeClass::SomeInnerClass::OkThisIsRecursiveEnough