aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2017-02-05 22:45:06 +0000
committerStephen Kelly <steveire@gmail.com>2017-02-05 22:45:06 +0000
commit7476b10fda3eee649ca573844de95dc83085120f (patch)
treec7e3d04029f99561a342ab27965efac07abef4a1
parent66a7d95e6d4a5bb742e2077389bd99212ee7642d (diff)
downloadextra-cmake-modules-7476b10fda3eee649ca573844de95dc83085120f.tar.gz
extra-cmake-modules-7476b10fda3eee649ca573844de95dc83085120f.tar.bz2
Revert "Automatically mark classes with pure virtual functions as /Abstract/."
With some combination of PyQt/compiler this breaks the build of kcoreaddons. This reverts commit 2e20aeab6e86670a66ff99a7b79120c4004b4d22.
-rw-r--r--find-modules/sip_generator.py2
-rw-r--r--tests/GenerateSipBindings/cpplib.cpp20
-rw-r--r--tests/GenerateSipBindings/cpplib.h20
-rw-r--r--tests/GenerateSipBindings/testscript.py5
4 files changed, 0 insertions, 47 deletions
diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py
index ab1bac31..58ae1829 100644
--- a/find-modules/sip_generator.py
+++ b/find-modules/sip_generator.py
@@ -221,8 +221,6 @@ class SipGenerator(object):
if member.kind in [CursorKind.CXX_METHOD, CursorKind.FUNCTION_DECL, CursorKind.FUNCTION_TEMPLATE,
CursorKind.CONSTRUCTOR, CursorKind.DESTRUCTOR, CursorKind.CONVERSION_FUNCTION]:
decl = self._fn_get(container, member, level + 1)
- if member.is_pure_virtual_method():
- sip["annotations"].add("Abstract")
elif member.kind == CursorKind.ENUM_DECL:
decl = self._enum_get(container, member, level + 1) + ";\n"
elif member.kind == CursorKind.CXX_ACCESS_SPEC_DECL:
diff --git a/tests/GenerateSipBindings/cpplib.cpp b/tests/GenerateSipBindings/cpplib.cpp
index 8ecedcbc..47370ca0 100644
--- a/tests/GenerateSipBindings/cpplib.cpp
+++ b/tests/GenerateSipBindings/cpplib.cpp
@@ -239,23 +239,3 @@ Shared::Shared(const Shared& other)
{
}
-
-int Abstract::callableMultiply(int i, int j)
-{
- return i * j;
-}
-
-Abstract::~Abstract()
-{
-
-}
-
-int Concrete::callableAdd(int i, int j)
-{
- return i + j;
-}
-
-void Concrete::virtualInterface()
-{
-
-}
diff --git a/tests/GenerateSipBindings/cpplib.h b/tests/GenerateSipBindings/cpplib.h
index 82e795a1..958b8750 100644
--- a/tests/GenerateSipBindings/cpplib.h
+++ b/tests/GenerateSipBindings/cpplib.h
@@ -219,23 +219,3 @@ class NO_EXPORT Invisible
public:
int someApi() { return 1; }
};
-
-class Abstract
-{
-public:
- virtual ~Abstract();
-
- int callableMultiply(int i, int j);
-
-protected:
- virtual void virtualInterface() = 0;
-};
-
-class Concrete : public Abstract
-{
-public:
- int callableAdd(int i, int j);
-
-protected:
- void virtualInterface() override;
-};
diff --git a/tests/GenerateSipBindings/testscript.py b/tests/GenerateSipBindings/testscript.py
index f1bef91e..b388841f 100644
--- a/tests/GenerateSipBindings/testscript.py
+++ b/tests/GenerateSipBindings/testscript.py
@@ -135,8 +135,3 @@ try:
assert False
except AttributeError as e:
assert str(e) == "module 'PyTest.CppLib' has no attribute 'Invisible'"
-
-concrete = PyTest.CppLib.Concrete()
-
-assert(concrete.callableMultiply(2, 3) == 6)
-assert(concrete.callableAdd(2, 3) == 5)