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

Class is added to wrong project file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.6.0
    • Qt Creator 3.5.1
    • None
    • Debian Wheezy, open source Qt downloaded from official site
    • 48270d58a6170f81a6c8d79a42f5a2b6cb0942e5

    Description

      Create two "Qt Console Application" projects named e.g. app1 and app2.
      Right-click app1 and select "Add New..." from the context menu.
      Select "C++ Class".
      Enter a class name on the second page.
      On the third page, "Add to project" is by default set to app1.pro. Click on this dropdown list, hover the mouse over app2.pro so it is highlighted and then click outside the list so that app1.pro stays selected.
      Click Finish.

      The source files for the new class have now been saved in the app1 directory as expected.
      The source files for the new class are not referenced by app1.pro as expected, but by app2.pro:

      ------------------------------------------
      QT += core
      QT -= gui

      TARGET = app2
      CONFIG += console
      CONFIG -= app_bundle

      TEMPLATE = app

      SOURCES += main.cpp \
      ../app1/classa.cpp

      HEADERS += \
      ../app1/classa.h
      ------------------------------------------

      Attachments

        Issue Links

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

          Activity

            People

              hunger Tobias Hunger
              hsolg Henrik Solgaard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes