[Qt-creator] Creator ignores condition blocks?

Nikos Chantziaras realnc at gmail.com
Mon Mar 12 22:54:23 CET 2012


A project is a project.  You develop it as a whole.  It's up to you to 
create relevant directories for platform-specific files and collapse the 
ones you don't want to see.

On 12/03/12 22:59, Danny Price wrote:
> Is there a workaround? It's annoying to have the tree cluttered up with files irrelevant to the hist platform and it gets worse when you have unix files in there too!
>
> I've resorted to commenting out the include() but that's not ideal.
>
> On 12 Mar 2012, at 20:34, Coda Highland wrote:
>
>> On Mon, Mar 12, 2012 at 3:25 PM, Danny Price<deepblue842 at googlemail.com>  wrote:
>>> I have the following in my .pro file:
>>>
>>> macx {
>>>     include(mac.pri)
>>> }
>>>
>>> win32 {
>>>     include(win.pri)
>>> }
>>>
>>> These pri files include different code for the relevant platform and only the correct files are compiled. However, rather than display only the relevant files in the project tree as I would expect, Creator includes ALL of them as though the conditions were not there.
>>>
>>> I tried putting message() calls in the blocks above and only one or the other is parsed when I run QMake so why is Creator displaying the wrong files?
>>>
>>> I've noticed similar problems with configuration blocks - Creator includes the files fall all configurations, even those are not active.
>>>
>>> Is this a bug?
>>
>> My understanding from earlier discussions is that this is intentional.
>> The theory is that you're interested in modifying the source files in
>> your project regardless of the build configuration you have chosen at
>> the moment.
>>
>> /s/ Adam





More information about the Qt-creator mailing list