aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-02 18:52:33 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-04 17:17:31 -0300
commit6f19bc36d75249c32a0b30e55460ed3e0348bc23 (patch)
treee8520b76be7ee0ab0077443b9fb290617b7f0bc0
parent77bb1220b4bc7d538d1e57cf6011d7b3fbe42925 (diff)
Fix compilation of QtCore when using -DAVOID_PROTECTED_HACK.
-rw-r--r--CMakeLists.txt6
-rw-r--r--PySide/QtCore/glue/qobject_connect.cpp2
-rw-r--r--PySide/QtCore/typesystem_core.xml3
3 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42f308f64..d7bfd8b23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,12 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
+option(AVOID_PROTECTED_HACK "Avoid protected hack on generated bindings." FALSE)
+if (AVOID_PROTECTED_HACK OR WIN32)
+ add_definitions(-DAVOID_PROTECTED_HACK)
+ message(STATUS "Avoiding protected hack!")
+endif()
+
find_package(PythonLibs REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(Shiboken REQUIRED)
diff --git a/PySide/QtCore/glue/qobject_connect.cpp b/PySide/QtCore/glue/qobject_connect.cpp
index b813be9a6..16842a0a3 100644
--- a/PySide/QtCore/glue/qobject_connect.cpp
+++ b/PySide/QtCore/glue/qobject_connect.cpp
@@ -78,7 +78,7 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
#ifndef AVOID_PROTECTED_HACK
source->connectNotify(signal);
#else
- reinterpret_cast<QObjectWrapper*>(source)->connectNotify_protected(source, signal);
+ reinterpret_cast<QObjectWrapper*>(source)->connectNotify_protected(signal);
#endif
if (usingGlobalReceiver)
signalManager.globalReceiverConnectNotify(source, slotIndex);
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 2c43617ff..0a391e928 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -74,6 +74,9 @@
<rejection class="QRunnable"/>
<rejection class="QSharedPointer"/>
<rejection class="QWeakPointer"/>
+ <rejection class="QChildEvent" field-name="c"/>
+ <rejection class="QTimerEvent" field-name="id"/>
+ <rejection class="QEvent" field-name="t"/>
<rejection class="*" function-name="tr" />
<rejection class="*" function-name="trUtf8" />
<rejection class="*" function-name="qt_metacast" />