Fixed QtUiTools plugin.
Removed use of static QString to store the class name. Fix bug #533. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
0d0cb0753e
commit
ed10989ff2
2 changed files with 3 additions and 6 deletions
|
|
@ -35,6 +35,7 @@ PyCustomWidget::PyCustomWidget(PyObject* objectType)
|
||||||
: m_data(new PyCustomWidgetPrivate())
|
: m_data(new PyCustomWidgetPrivate())
|
||||||
{
|
{
|
||||||
m_data->pyObject = objectType;
|
m_data->pyObject = objectType;
|
||||||
|
m_name = QString(reinterpret_cast<PyTypeObject*>(objectType)->tp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyCustomWidget::~PyCustomWidget()
|
PyCustomWidget::~PyCustomWidget()
|
||||||
|
|
@ -73,11 +74,7 @@ QString PyCustomWidget::includeFile() const
|
||||||
|
|
||||||
QString PyCustomWidget::name() const
|
QString PyCustomWidget::name() const
|
||||||
{
|
{
|
||||||
static QString objectName;
|
return m_name;
|
||||||
if (objectName.isEmpty()) {
|
|
||||||
objectName = QString(reinterpret_cast<PyTypeObject*>(m_data->pyObject)->tp_name);
|
|
||||||
}
|
|
||||||
return objectName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PyCustomWidget::toolTip() const
|
QString PyCustomWidget::toolTip() const
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<PyCustomWidgetPrivate> m_data;
|
QScopedPointer<PyCustomWidgetPrivate> m_data;
|
||||||
|
QString m_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue