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

Protected enum in namespace can cause compilation issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4: Low P4: Low
    • 6.0
    • 1.2.x
    • Shiboken
    • Windows by default exhibits the issue. Linux does as well when using the avoid-protected-hack option.

      Having a protected enum inside a class within a namespace causes compilation issues when using the avoid-protected-hack option to shiboken. For example, the following code causes compilation issues:

      namespace SampleNamespace {
          class SomeClass {
          protected:
              enum ProtectedEnum {
                  ProtectedItem0,
                  ProtectedItem1
              };
          };
      }
      

      The resulting auto-generated looks something like:

      enum sample_SampleNamespace::SomeClass_ProtectedEnum_Surrogate {};
      

      Obviously, the sample_SampleNamespace namespace does not exist and thereby causes compilation errors.

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

            kleint Friedemann Kleint
            jcummings John Cummings
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes