summaryrefslogtreecommitdiffstats
path: root/plugins/customwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customwidget.cpp')
-rw-r--r--plugins/customwidget.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/customwidget.cpp b/plugins/customwidget.cpp
index 74b07dc..9a3e6f2 100644
--- a/plugins/customwidget.cpp
+++ b/plugins/customwidget.cpp
@@ -35,6 +35,7 @@ PyCustomWidget::PyCustomWidget(PyObject* objectType)
: m_data(new PyCustomWidgetPrivate())
{
m_data->pyObject = objectType;
+ m_name = QString(reinterpret_cast<PyTypeObject*>(objectType)->tp_name);
}
PyCustomWidget::~PyCustomWidget()
@@ -73,11 +74,7 @@ QString PyCustomWidget::includeFile() const
QString PyCustomWidget::name() const
{
- static QString objectName;
- if (objectName.isEmpty()) {
- objectName = QString(reinterpret_cast<PyTypeObject*>(m_data->pyObject)->tp_name);
- }
- return objectName;
+ return m_name;
}
QString PyCustomWidget::toolTip() const