aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-20 18:55:02 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:01 -0300
commited10989ff23d95d20f361944a6deffbeced63a0d (patch)
tree2106db3380189ac199f0f39942b02c95b472de06 /plugins
parent0d0cb0753edea1e209742c5777ca024b7a58b83a (diff)
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>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/customwidget.cpp7
-rw-r--r--plugins/customwidget.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/plugins/customwidget.cpp b/plugins/customwidget.cpp
index 74b07dcc9..9a3e6f2fc 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
diff --git a/plugins/customwidget.h b/plugins/customwidget.h
index e4eb76d7a..00393a1d5 100644
--- a/plugins/customwidget.h
+++ b/plugins/customwidget.h
@@ -52,7 +52,7 @@ public:
private:
QScopedPointer<PyCustomWidgetPrivate> m_data;
-
+ QString m_name;
};
#endif