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

PySide does not make setters for fields that are a variable pointer to a constant value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.2.2, 1.2.3, 1.2.x, dev
    • Fix Version/s: 5.12.0
    • Component/s: Shiboken
    • Labels:
    • Environment:
      Linux, Python 2.7.3, PySide 1.2.2
    • Commits:
      ba96602c73e28e91fa25282d5ea9c65ce8a0269e (pyside=setup/dev, 30.8.2018, 5.12)

      Description

      The method CppGenerator::generateClass in generator/shiboken/cppgenerator.cpp has the following code:

      foreach (const AbstractMetaField* metaField, metaClass->fields()) {
          if (metaField->isStatic())
              continue;
          writeGetterFunction(s, metaField);
          if (!metaField->type()->isConstant())
              writeSetterFunction(s, metaField);
          s << endl;
      }
      

      Because the setter is only generated if the field's type is not constant, fields declared as const SomeType* will not have setters generated. This is the case for QStyleOptionViewItemV3::widget, and thus further complicates PYSIDE-115, making it impossible to create a proper instance of QStyleOptionViewItemV4.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              chrisburel Chris Burel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes