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

Class QtCore.QCborValue has no method .tag() and enum class CborTag missing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.15.2, 6.2.0
    • PySide
    • None
    • Kubuntu 21.10, Python 3.9.7, PySide2 5.12.2 (pip), PySide6 6.2.0 (pip), both installed in a virtual environment.
    • Linux/X11
    • 0432c7358dc38a5e78464feccd11d7ce4fc4b1a1 (pyside/pyside-setup/dev) bbe91cf3b0f2cef64ae71f71669e6462988e6c00 (pyside/pyside-setup/6.2)

    Description

      Issue 1. In PySide2 (5.12.2 installed via pip) and PySide6 (6.2.0 installed via pip), class QtCore.QCborValue has no method .tag() but it should as documented here:

      https://doc.qt.io/qt-5/qcborvalue.html#tag

      and here:

      https://doc.qt.io/qt-6/qcborvalue.html#tag

      As a result, the tag (well-known or arbitrary integer) cannot be extracted from a CBorValue, Consequently, the tagged value cannot be interpreted.

      Note, that the methods .isTag() and .taggedValue() exist and work as expected. Only the method .tag() is missing.

      Closely related to Issue 1 is

      Issue 2. The C++ enum class QtCore.QCborTag has no equivalence in PySide2 and PySide6, so a CBOR value cannot be tagged with an arbitrary integer like this: QCborValue(QCborTag(1234), QCborValue('tagged string')).

      The enumeration class QCborKnownTags exists, so  well-known tags are accessible.

      See here

      https://doc.qt.io/qt-5/qtcborcommon.html#QCborTag-enum

      and here

      https://doc.qt.io/qt-6/qtcborcommon.html#QCborTag-enum

      I have attached a Python program that demonstrates issue 1 in context.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            biteater Dirk Mattes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes