Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml8
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp20
-rw-r--r--sources/pyside2/libpyside/pysideproperty.h18
3 files changed, 22 insertions, 24 deletions
diff --git a/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml b/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
index a331b6988..03977fcbf 100644
--- a/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
+++ b/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
@@ -54,12 +54,16 @@
<object-type name="QAxScript">
<enum-type name="FunctionFlags"/>
</object-type>
- <object-type name="QAxScriptEngine"/>
+ <object-type name="QAxScriptEngine">
+ <enum-type name="State"/>
+ </object-type>
<object-type name="QAxScriptManager">
<!-- Ax Servers only -->
<modify-function signature="addObject(QObject*)" remove="all"/>
</object-type>
- <object-type name="QAxSelect"/>
<object-type name="QAxBaseWidget"/>
+ <object-type name="QAxSelect">
+ <enum-type name="SandboxingLevel"/>
+ </object-type>
<object-type name="QAxWidget"/>
</typesystem>
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index f169c63e1..c902afc0c 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -73,7 +73,7 @@ static PyMethodDef PySidePropertyMethods[] = {
};
static PyGetSetDef PySidePropertyType_getset[] = {
- {"__doc__", qPropertyDocGet, nullptr, nullptr, nullptr},
+ {const_cast<char *>("__doc__"), qPropertyDocGet, nullptr, nullptr, nullptr},
{nullptr, nullptr, nullptr, nullptr, nullptr}
};
@@ -158,7 +158,7 @@ static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, Py
return reinterpret_cast<PyObject *>(me);
}
-int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
+static int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *type = nullptr;
auto data = reinterpret_cast<PySideProperty *>(self);
@@ -209,7 +209,7 @@ int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
-void qpropertyDeAlloc(PyObject *self)
+static void qpropertyDeAlloc(PyObject *self)
{
qpropertyClear(self);
if (PepRuntime_38_flag) {
@@ -220,7 +220,7 @@ void qpropertyDeAlloc(PyObject *self)
Py_TYPE(self)->tp_free(self);
}
-PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
+static PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
{
PyObject *callback = PyTuple_GetItem(args, 0);
if (PyFunction_Check(callback)) {
@@ -237,7 +237,7 @@ PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
return nullptr;
}
-PyObject *qPropertySetter(PyObject *self, PyObject *callback)
+static PyObject *qPropertySetter(PyObject *self, PyObject *callback)
{
if (PyFunction_Check(callback)) {
PySideProperty *prop = reinterpret_cast<PySideProperty *>(self);
@@ -253,7 +253,7 @@ PyObject *qPropertySetter(PyObject *self, PyObject *callback)
return nullptr;
}
-PyObject *qPropertyGetter(PyObject *self, PyObject *callback)
+static PyObject *qPropertyGetter(PyObject *self, PyObject *callback)
{
if (PyFunction_Check(callback)) {
PySideProperty *prop = reinterpret_cast<PySideProperty *>(self);
@@ -282,8 +282,7 @@ static PyObject *qPropertyDocGet(PyObject *self, void *)
return PyString_FromString(doc);
#endif
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
@@ -424,11 +423,6 @@ PySideProperty *getObject(PyObject *source, PyObject *name)
{
PyObject *attr = nullptr;
- if (Shiboken::Object::isUserType(source)) {
- if (auto dict = reinterpret_cast<SbkObject *>(source)->ob_dict)
- attr = PyDict_GetItem(dict, name);
- }
-
attr = getFromType(Py_TYPE(source), name);
if (attr && checkType(attr)) {
Py_INCREF(attr);
diff --git a/sources/pyside2/libpyside/pysideproperty.h b/sources/pyside2/libpyside/pysideproperty.h
index a97b2a48f..4a467b186 100644
--- a/sources/pyside2/libpyside/pysideproperty.h
+++ b/sources/pyside2/libpyside/pysideproperty.h
@@ -62,7 +62,7 @@ namespace PySide { namespace Property {
typedef void (*MetaCallHandler)(PySideProperty*,PyObject*,QMetaObject::Call, void**);
-PYSIDE_API bool checkType(PyObject* pyObj);
+PYSIDE_API bool checkType(PyObject *pyObj);
/**
* This function call set property function and pass value as arg
@@ -73,7 +73,7 @@ PYSIDE_API bool checkType(PyObject* pyObj);
* @param value The value to set in property
* @return Return 0 if ok or -1 if this function fail
**/
-PYSIDE_API int setValue(PySideProperty* self, PyObject* source, PyObject* value);
+PYSIDE_API int setValue(PySideProperty *self, PyObject *source, PyObject *value);
/**
* This function call get property function
@@ -83,7 +83,7 @@ PYSIDE_API int setValue(PySideProperty* self, PyObject* source, PyObject* value)
* @param source The QObject witch has the property
* @return Return the result of property get function or 0 if this fail
**/
-PYSIDE_API PyObject* getValue(PySideProperty* self, PyObject* source);
+PYSIDE_API PyObject *getValue(PySideProperty *self, PyObject *source);
/**
* This function return the notify name used on this property
@@ -91,7 +91,7 @@ PYSIDE_API PyObject* getValue(PySideProperty* self, PyObject* source);
* @param self The property object
* @return Return a const char with the notify name used
**/
-PYSIDE_API const char* getNotifyName(PySideProperty* self);
+PYSIDE_API const char *getNotifyName(PySideProperty *self);
/**
@@ -101,14 +101,14 @@ PYSIDE_API const char* getNotifyName(PySideProperty* self);
* @param name The property name
* @return Return a new reference to property object
**/
-PYSIDE_API PySideProperty* getObject(PyObject* source, PyObject* name);
+PYSIDE_API PySideProperty *getObject(PyObject *source, PyObject *name);
-PYSIDE_API void setMetaCallHandler(PySideProperty* self, MetaCallHandler handler);
+PYSIDE_API void setMetaCallHandler(PySideProperty *self, MetaCallHandler handler);
-PYSIDE_API void setTypeName(PySideProperty* self, const char* typeName);
+PYSIDE_API void setTypeName(PySideProperty *self, const char *typeName);
-PYSIDE_API void setUserData(PySideProperty* self, void* data);
-PYSIDE_API void* userData(PySideProperty* self);
+PYSIDE_API void setUserData(PySideProperty *self, void *data);
+PYSIDE_API void* userData(PySideProperty *self);
} //namespace Property
} //namespace PySide