[QBS] Inconsistency in treatment of qbsSearchPath

Thomas Epting thomas.epting.stryker at gmail.com
Mon Aug 18 10:40:06 CEST 2014


Hi,

I think there is some inconsistency regarding the treatment of
qbsSearchPath. Consider a Qbs project like this:


Project {

    name: "My Project"

    CppApplication {

        files: ["main.cpp"]

        Group {

            fileTagsFilter: product.type

            qbs.install: true

        }

    }

}


This works as expected. Now I like to add a bit more convenience, by
providing an item type "MyCppApplication" which has (in this case) the
install group predefined (but there are many other use cases I can think
of).

Project {    name: "My Project"    qbsSearchPaths: "qbs"
MyCppApplication {        files: ["main.cpp"]    }
}

Of course I added the "qbs" directory, an "imports" subdirectory, and a
file MyCppApplication.qbs within "imports":


import qbs 1.0


CppApplication {

    Group {

        fileTagsFilter: product.type

        qbs.install: true

    }

}


But this doesn't work. The message I'm getting is "Unexpected item type
'MyCppApplication'. If I move MyCppApplication part out to a separate .qbs
file and reference it (via "references"), everything works fine.

In my opinion, this behavior is inconsistent and it's really hard to
understand why the qbsSearchPath is applied only to the "next level of
indirection".

What do you think about this? Is it working as designed now? Or should it
be treated as a bug?

Regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140818/bb9a5c3b/attachment.html>


More information about the Qbs mailing list