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

'Project:Name' Qt Creator variable is inconsistent for cmake projects

    XMLWordPrintable

Details

    • All
    • 884a568d7 (17.0)

    Description

      Hey.
      To facilitate backups I keep my builds outside the projects directory.
      The 'Default build directory' settings has the value of

      wherever_one_wants/builds/%{Project:Name}/%{Kit:FileSystemName}-%{BuildConfig:Name}

      I go into Qt examples, grab the windowsflags example and put it into my projects directory.
      I rename the windowsflags folder into testwindowsflags.

      qmake based projects work just fine. I open it in Qt Creator, configure it and builds go to

      wherever_one_wants/builds/windowflags/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug

      just as expected.

      But when I open CMakeLists.txt Qt Creator suggests in the 'Configure Project' pane that the project name is testwindowsflags after its folder name despite what the project file says.

      # CMakeLists.txt
      project(windowflags LANGUAGES CXX)
      
      # builds go to
      wherever_one_wants/builds/testwindowflags/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug 

      Even the editor shows the name wrong for a short time while the project is loading. It only changes later when the configuration is parsed and all set.

      Attachments

        1. 1_default_build_directory.png
          35 kB
          danilshkodin
        2. 2_project_sources.png
          53 kB
          danilshkodin
        3. 3_configuration_named_after_folder.png
          93 kB
          danilshkodin
        4. 4_configuring_name_still_not_parsed.png
          67 kB
          danilshkodin
        5. 5_configured_name_is_correct.png
          62 kB
          danilshkodin
        6. 6_qt_creator_variables.png
          93 kB
          danilshkodin
        For Gerrit Dashboard: QTCREATORBUG-32996
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            danilshkodin danilshkodin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes