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

Protected enum in namespace can cause compilation issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.x, dev
    • Fix Version/s: dev
    • Component/s: Shiboken
    • Environment:
      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

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

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes