summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-20 18:55:02 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-21 17:28:20 -0300
commit04ac69ce5277ead02965ba42a99299dcc4994906 (patch)
tree9bf802525654e59cbc89039e5c2566faed174046 /plugins
parentab19244c225daf295929bab0abc036aa299c536a (diff)
downloadpyside-04ac69ce5277ead02965ba42a99299dcc4994906.tar.gz
pyside-04ac69ce5277ead02965ba42a99299dcc4994906.tar.xz
pyside-04ac69ce5277ead02965ba42a99299dcc4994906.zip
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 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
diff --git a/plugins/customwidget.h b/plugins/customwidget.h
index e4eb76d..00393a1 100644
--- a/plugins/customwidget.h
+++ b/plugins/customwidget.h
@@ -52,7 +52,7 @@ public:
private:
QScopedPointer<PyCustomWidgetPrivate> m_data;
-
+ QString m_name;
};
#endif