Hi,

I tried compiling PyQt-2.5pre3 version of Windows 2000. Sip compiled with no
problems but PyQt failed almost immediately. I used 'nmake -f
Makefile.win32-msvc' with Visual C++ 6.0.

cl -c -nologo -W3 -O1 -I. -Ic:\qt-2.3.1\include -DSIP_USE_DLL
-FosipqtQVariant.obj sipqtQVariant.cpp
sipqtQVariant.cpp
sipqtQVariant.cpp(242) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QString')
sipqtQVariant.cpp(272) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QCString')
sipqtQVariant.cpp(302) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QStringList')
sipqtQVariant.cpp(332) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QFont')
sipqtQVariant.cpp(362) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QPixmap')
sipqtQVariant.cpp(392) : error C2468: 'new' : cannot allocate
'const'/'volatile' objects (type is 'const class QImage')

Commenting out the 'const' in sipqtQVariant.cpp fixed the first error.

static PyObject *sipDo_QVariant_toString(PyObject *sipThisObj,PyObject *sipArgs)
{
        sipThisType *sipThis;
        int sipArgsParsed = 0;

if ((sipThis = sipGetThis(sipThisObj,&sipArgs,sipClass_QVariant)) ==
NULL)
                return NULL;

        {
                if (sipParseArgs(&sipArgsParsed,sipArgs,""))
                {
                        QString *res;
                        QVariant *ptr;

if ((ptr = (QVariant
*)sipGetCppPtr(sipThis,sipClass_QVariant)) == NULL)
                                return NULL;

res = (QString *)new /*const*/ QString(ptr ->
QVariant::toString()); // commented out const

return sipNewCppToSelf(res,sipClass_QString,SIP_SIMPLE
| SIP_PY_OWNED);
                }
        }

        // Report an error if the arguments couldn't be parsed.

        sipNoMethod(sipArgsParsed,sipName_qt_QVariant,sipName_qt_toString);

        return NULL;
}


-- 

Greg Green
Advanced Design Systems
Math & Computing Technology
Boeing
(425) 865-2790


_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to