diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-12-01 15:34:44 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:47:55 -0300 |
commit | ec7b01c24f903925494fe21cc08b5c5111435daa (patch) | |
tree | 770bb9c01772c784e86d1234054d0b119d0ac8e4 /libpyside/dynamicqmetaobject_p.h | |
parent | 52c2a2cd0d2571e5447f3c20c48626b685fc83d0 (diff) |
Fixed dynamic meta object to avoid empty meta method.
Empty meta methods cause a assert failure on QtDeclarative module.
Also removed the scoped pointer to avoid heap allocation when it's not
needed, as QByteArray is already implicity shared.
Diffstat (limited to 'libpyside/dynamicqmetaobject_p.h')
-rw-r--r-- | libpyside/dynamicqmetaobject_p.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libpyside/dynamicqmetaobject_p.h b/libpyside/dynamicqmetaobject_p.h index e69270041..d31e908b8 100644 --- a/libpyside/dynamicqmetaobject_p.h +++ b/libpyside/dynamicqmetaobject_p.h @@ -25,9 +25,9 @@ #include <Python.h> #include <QByteArray> -#include <QSharedPointer> #define PYSIDE_SLOT_LIST_ATTR "_slots" +#define GLOBAL_RECEIVER_CLASS_NAME "__GlobalReceiver__" struct PySideProperty; namespace PySide @@ -35,7 +35,11 @@ namespace PySide class MethodData { public: - MethodData(){} + MethodData(); + /** + * \param signature method signature + * \param type method return type + */ MethodData(const char* signature, const char* type = 0); void clear(); bool isValid() const; @@ -43,11 +47,11 @@ namespace PySide QByteArray type() const; bool operator==(const MethodData& other) const; bool operator==(const char* other) const; - operator const char*() { return m_signature->data(); } private: - QSharedPointer<QByteArray> m_signature; - QSharedPointer<QByteArray> m_type; + QByteArray m_signature; + QByteArray m_type; + static const QByteArray m_emptySig; }; class PropertyData |