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

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.0
    • 1.2.2, 1.2.3, 1.2.x
    • Shiboken
    • Linux, Python 2.7.3, PySide 1.2.2
    • 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

              kleint Friedemann Kleint
              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