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

Protected enum in namespace can cause compilation issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • 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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: