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

Qt Creator "Add New..." Confused by Pro files with same base name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • Qt Creator 1.3.1
    • None
    • Linux, Qt 4.6.2, Qt Creator 1.3.1
    • 43f9c27b315721fbfb1a213915f07df41060da66

      If two pro files with the same base name appear in the source tree then the Qt Creator "Add File" function lists only one instance of that name and can update the incorrect pro file with the added file. For example, with the following tree structure (attached):

      qtcreator-test
      qtcreator-test/qtcreator-test.pro
      qtcreator-test/test1
      qtcreator-test/test1/test1.pro
      qtcreator-test/test1/sub1
      qtcreator-test/test1/sub1/sub1.pro
      qtcreator-test/test1/core
      qtcreator-test/test1/core/core.pro
      qtcreator-test/test2
      qtcreator-test/test2/test2.pro
      qtcreator-test/test2/sub2
      qtcreator-test/test2/sub2/sub2.pro
      qtcreator-test/test2/core
      qtcreator-test/test2/core/core.pro
      

      Right-clicking "Add New..." on the test2/core directory and adding a class "TestClass" to the project "core.pro" results in:

      qtcreator-test
      qtcreator-test/qtcreator-test.pro
      qtcreator-test/test1
      qtcreator-test/test1/test1.pro
      qtcreator-test/test1/sub1
      qtcreator-test/test1/sub1/sub1.pro
      qtcreator-test/test1/core
      qtcreator-test/test1/core/core.pro
      qtcreator-test/test2
      qtcreator-test/test2/test2.pro
      qtcreator-test/test2/sub2
      qtcreator-test/test2/sub2/sub2.pro
      qtcreator-test/test2/core
      qtcreator-test/test2/core/core.pro
      qtcreator-test/test2/core/testclass.h
      qtcreator-test/test2/core/testclass.cpp
      

      with the new files in the correct directory, but test1/core/core.pro gets updated:

      $ cat qtcreator-test/test1/core/core.pro 
      CONFIG += warn_on
      HEADERS += ../../test2/core/testclass.h
      SOURCES += ../../test2/core/testclass.cpp
      TEMPLATE = lib
      

      rather than the expected test2/core/core.pro

      Qt Creator needs to distinguish between duplicate pro file base names in the "Add New..." logic. Perhaps the relative path to the pro file could be added to the project drop-down.

      As a work-around, avoiding such duplicate names seems the only option.

      http://lists.trolltech.com/pipermail/qt-creator/2009-July/003916.html also outlines this problem without resolution.

        1. qtcreator-test.tar.gz
          0.7 kB
          Chris Williams
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            chrisw67 Chris Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes