Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24176

auto creation of switch statement not working for scoped enums

XMLWordPrintable

      The auto creation of switch statement does not work with scoped enums.

      For example :

       

      enum T2

      {     T2_A,     T2_B,     T2_C }

      ;
       ...
      T2 val2;
      switch (val2) // works correctly, option appears in refactor menu

       

      but

      enum class T1 {
          A,
          B,
          C
      };
      ...
      T1 val;
      switch (val) // does not work, option does not show up in refactor menu

      It would be nice if the auto creation of switch statement also worked with scoped enums.

       

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

            Unassigned Unassigned
            julienblanc-sprinte Julien Blanc
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes