Menu

Bug in operators?

Help
Igors
2013-11-05
2013-11-05
  • Igors

    Igors - 2013-11-05

    Hi

    I think it's a bug (PythonQtClassWrapper.cpp)

    if (typeSlots & PythonQt::Type_InplaceAdd) {
    

    //II wrap->_base.as_number.nb_add = (binaryfunc)PythonQtInstanceWrapper_iadd;
    wrap->_base.as_number.nb_inplace_add = (binaryfunc)PythonQtInstanceWrapper_iadd;
    }
    if (typeSlots & PythonQt::Type_InplaceSubtract) {
    //II wrap->_base.as_number.nb_subtract = (binaryfunc)PythonQtInstanceWrapper_isub;
    wrap->_base.as_number.nb_inplace_subtract = (binaryfunc)PythonQtInstanceWrapper_isub;
    }
    if (typeSlots & PythonQt::Type_InplaceMultiply) {
    //II wrap->_base.as_number.nb_multiply = (binaryfunc)PythonQtInstanceWrapper_imul;
    wrap->_base.as_number.nb_inplace_multiply = (binaryfunc)PythonQtInstanceWrapper_imul;
    }

    Thx

     
  • Florian Link

    Florian Link - 2013-11-05

    Yes, looks like a copy and paste bug, I will fix it on SVN trunk.

    The following Qt classes seem to be affected by this bug (they are the only ones with inline add/subtract/multiply):

    QWebElementCollection
    QItemSelection
    QMatrix4x4
    QPainterPath
    QQuaternion
    QTransform
    QVector2D
    QVector3D
    QVector4D

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.