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

Opening a CMakeLists.txt file from the current project shouldn't be treated as a brand new project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.13.0
    • None

    Description

      Steps to Reproduce:

      1. # Open a CMake project
      2. Click File > Open File or Project...
      3. Select a CMakeLists.txt file from a subdirectory of the current project.

      Expected Result:

      The selected CMakeLists.txt file is opened for editing.

      Actual Result:

      Qt Creator prompts me to configure this brand new project that it thinks I am trying to open.

      Rationale:

      Sometimes I want to quickly open the CMake file corresponding to the current source file. If I know the target name, I can do Ctrl+K,cmo <targetname>. If I know the folder name I can do Ctrl+K,<foldername>/CMakeLists.txt. But I work on a large codebase with over 300 CMakeLists.txt files and it's pretty common that I know neither the folder nor the target name off hand. Pressing Ctrl+O quickly shows me the contents of the current directory, making it easy to click on the CMakeLists.txt file, but frustratingly it tries to open it as a brand new project.

      Alternatively, a locator ("cmc"?) or a keyboard shortcut that opened the CMakeLists.txt corresponding to the current file would be useful.

      Attachments

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

        Activity

          People

            cadam Cristian Adam
            parkotron Parker Coates
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes