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

QtCreator Substitute Macro Call and Auto explicit type

    XMLWordPrintable

Details

    • All

    Description

      As a C++ Developer, I would like to be able to right click on the Macro call and generate raw C++ code.

      This saves tons of time and also gives the ability to see how the macro code will be generated.

      Say we have the following macro:

      #define LOG(msg) std::cout << msg << std::endl

      Now have this macro call:

      LOG("Very cool string");

      And then right click on that macro-call and ask to "Substitute macro call" and it will generate the code automatically like this:

      std::cout << "Very cool string" << std::endl;

       

       

      Another example with the Auto keyword:

      auto myMap = std::map<int, int>();

      Right click on the auto keyword and say "Replace 'auto' with explicit type declaration" and it will automatically generate this code:

      std::map<int, int> myMap = std::map<int, int>();

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            gilad.reich Gilad Reich
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes