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

QtCreator in CMake project copies to clipboard only .cpp file of the new class created

    XMLWordPrintable

    Details

    • Commits:
      ca430f2a8b2ee7ea106d87bf517f1d4271d29b4b (qt-creator/tqtc-qt-creator/4.15)

      Description

      To reproduce:

      1. Create new Qt Console Project "Foo" for CMake.
      2. Click RMB on "Foo" target, select "Add new..."
      3. Select "C++ Class", enter any name ("Foo")
      4. In the wizard page with "Finish" button, it says (hint: two files):
      Files to be added in
      /home/vincas/code/test/Foo:
      
      Foo.cpp
      Foo.h 
      1. Click Finish, dialog box appears:
      Files are not automatically added to the CMake.... Copy the path to the sorce files to the clipboard? 
      1. Click Yes.
      2. Go to CMakeLists.txt, paste clipboard contents so that we get:
      add_executable(Foo
        main.cpp
        Foo.cpp
      ) 

      Note that we only got .cpp file, without .h. In the result, we don't see .h file in project explorer.

      It would be useful if both .h and .cpp file names would be placed into clipboard, separated with space or newline.

       

       

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              cadam Cristian Adam
              Reporter:
              talkless Vincas Dargis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes