Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-648

shiboken issue converting Python3 int (which might be long integer)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: dev
    • Fix Version/s: 5.9
    • Component/s: PySide, Shiboken
    • Labels:
      None
    • Environment:
      PySide2-5.11.0a1-5.12.0-cp34-cp34m-linux_x86_64.whl
    • Commits:
      8ed37563888f7956da99636c62f18459729d5966

      Description

      Shiboken seems to be confused when Python3 int are actually long.

      item = QGraphicsRectItem()
      item.setData(QGraphicsItem.UserType, 1)

      works correctly, but

      item = QGraphicsRectItem()
      item.setData(QGraphicsItem.UserType, 1<<32)

      raises an exception OverFlowError with the following message in the console:

      RuntimeWarning: libshiboken: Overflow: Value 4294967296 exceeds limits of type  [signed] "i" (4bytes)

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            lriesterer Laurent Riesterer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes