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

Qt Creator fails to load run configurations when using hierarchical .pro files, possibly due to a parsing error

    XMLWordPrintable

Details

    • 5d91afda3488ae46a3e9c41e490cc6c689a43ace

    Description

      I am currently developing an application MinimalApp/MinimalApp.pro (see the attached archive, which contains a minimal example of the problem) that depends on a static library MinimalLib/MinimalLib.pro. As the code must be shared with my team, I have made the dependency explicit in a third .pro file, MinimalApp/MinimalFailure.pro. Opening MinimalFailure.pro causes Qt Creator 2.1.0's project navigator to nest MinimalApp and MinimalLib under MinimalFailure, as expected.

      For some reason, Qt Creator 2.1.0 fails to load run configurations that I create with this hierarchy of .pro files. It allows me to create run configurations, and it successfully passes command-line parameters to my application, but if I close Qt Creator and reopen it, the run configurations are no longer there (it does save them in the MinimalFailure.pro.user file, as it should, but it doesn't load them). If I replace MinimalFailure.pro with:

      MinimalApp/MinimalSuccess.pro
      TEMPLATE = subdirs
      CONFIG += ordered
      SUBDIRS = ../MinimalLib
      

      Qt Creator stores my run configurations in MinimalSuccess.pro.user and successfully loads them when I restart it. Also, if I open MinimalLib.pro directly, it stores my run configurations in MinimalLib.pro.user and successfully loads them when I restart it. But obviously, I want to use MinimalFailure.pro, so that I can develop the application and the library together.

      I tried upgrading to Qt Creator 2.3.1 to see if that would fix the problem. I have not tested it with the attached minimal example, but I did test it with my original .pro files. It did load my run configurations when I restarted it, but they were not editable (the text boxes were grayed out), and it gave a warning message saying "the .pro file could not be parsed". However qmake does not complain about parsing errors if I call qmake MinimalFailure.pro directly, even if I use the -Wall option (I'm not sure if this option controls qmake's output, or if it just passes it to g++).

      Attachments

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

        Activity

          People

            dt Daniel Teske
            ose Ose Pedro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes