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

refactoring 'enum' to 'enum class'

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • C/C++/Obj-C++ Support

    Description

      This week I've gone through some old C/C++ code. The code has used some old enums together with int-typed variables. To improve the stuff I've changed the enums to 'enum class' and inserted the enum type before each usage of one of the enum literals.

      I.e.

      enum Foo {
        Val1, Val2, Val3 
      };
      

      together with e.g.

      int bar = Val1;
      

      got changed to

      enum class Foo {
        Val1, Val2, Val3
      };
      

      and

      int bar = Foo::Val1;
      

      Since I talk about quite a lot of enum literals it would have been helpful if QtC is able to do the refactoring by itself.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            frechdachs69 Heiko Nardmann
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes