Add missing const_cast

I missed a const_cast and a pointer dereference when inlining the
code from shiboken2
This commit is contained in:
Daniel Rogers
2018-01-24 00:32:50 -08:00
committed by wmayer
parent 6ce8e1a0ae
commit 2b1012f706

View File

@@ -280,7 +280,7 @@ QObject* PythonWrapper::toQObject(const Py::Object& pyobject)
Py::Object PythonWrapper::fromQIcon(const QIcon* icon)
{
#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE)
const char* typeName = typeid(icon).name();
const char* typeName = typeid(*const_cast<QIcon*>(icon)).name();
PyObject* pyobj = Shiboken::Object::newObject(reinterpret_cast<SbkObjectType*>(Shiboken::SbkType<QIcon>()),
const_cast<QIcon*>(icon), true, false, typeName);
if (pyobj)