aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-02-24 16:03:06 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-24 17:41:25 -0300
commit3e100626a5e1676240f374275440d2ec1e191599 (patch)
treeb97dc20c13ab3062307f38a5a24739f5c0a1cd30 /PySide/QtCore
parenteeb50b166bc122cf5326e842528d92b4e0914ff3 (diff)
Fixing usage of tp_name in QVariant converter
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/qvariant_conversions.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h
index f3a7dfa80..4834c08ce 100644
--- a/PySide/QtCore/qvariant_conversions.h
+++ b/PySide/QtCore/qvariant_conversions.h
@@ -41,7 +41,9 @@ inline QVariant Converter<QVariant>::toCpp(PyObject* pyobj)
if (SbkQVariant_Check(pyobj))
return *Converter<QVariant*>::toCpp(pyobj);
// voodoo stuff to avoid linking qtcore bindings with qtgui bindings
- uint typeCode = QMetaType::type(pyobj->ob_type->tp_name);
+ QString className(pyobj->ob_type->tp_name);
+ className = className.mid(className.lastIndexOf(".") + 1);
+ uint typeCode = QMetaType::type(className.toAscii());
if (!typeCode || typeCode > QVariant::UserType) {
// Check the implicit conversion stuff for most python-native types