On Wednesday, 20 May 2020 09:30:41 PDT Jérôme Godbout wrote:
> It kinda work, it’s really weird, but all the project get display, the .pri
> and the include/source no matter the condition, but they are grey out if
> the include condition is false, so it does scan the .pri no matter what but
> doesn’t really include them to be used only for display!?! So I got all the
> optional part display but not really used. The compile seem to work. This
> leave an horrible UX view for developer to see part that aren’t used but
> source is display and searchable for the project!

Are you talking about qmake or about Qt Creator's .pro file parsing?

Qt Creator evaluates all conditions, including false ones, so it can gather 
all dependencies and all possibilities. For example, if you had:

contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n): \
    SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
else: \
    SOURCES += $$AMOTUS_Qt_PATH/no-i18n.cpp

Then Qt Creator should display both files in your file listing. You *want* 
that.

But qmake will follow only one code path when generating your Makefile.

So please be precise: are you talking about Qt Creator or are you talking 
about the actual build?
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to