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

File renaming may break project layout

    XMLWordPrintable

Details

    • Linux/X11
    • 11cd79adca8b136a7c06dd127635564022382219 (qt-creator/qt-creator/4.12)

    Description

      Not sure if it's more related to the qmake parser..

      Steps to reproduce:

      • create a simple project that has at least one header file (e.g. widget app from template)
      • remove the empty lines between the HEADERS, SOURCES and FORMS that it looks like this
      SOURCES += \
          main.cpp \
          mainwindow.cpp
      HEADERS += \
          mainwindow.h
      FORMS += \
          mainwindow.ui 
      • now rename the header to use a different (valid) C++ header suffix (hpp, H, hh,...)

      Current result:

      • the file ends up inside the wrong section (inside the pro file it is added to the SOURCES)
      • the project tree displays the icon still correct as header

       

      Note: if at least a single empty line is present (before HEADERS and FORMS) this works as expected..

      Note: the file will be renamed correctly and files including this file will adapt the include correctly..

      Found by Squish test tst_rename_file.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            cstenger Christian Stenger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes