[QBS] Local configuration should have higher priority?

Tom Sutcliffe devtomsci at me.com
Wed Apr 11 15:01:04 CEST 2012


Hi Loaden,

A profile will always override something set in modules.*. So in this case (with the profile "4" in effect) neither the local nor global modules.qbs.platform keys will have any effect, and the platform will be set to the value of profiles.4.qbs.platform.

If you wanted a local config to build with mingw for Qt 4 (as opposed to the default of Qt 5 with the WinSDK), you'd want to set:

qbs config --local profile:4
qbs config --local profiles.4.qbs.platform: mingw32

We did discuss whether the "modules" keys should be called "defaults" or "fallbacks" or similar, but eventually decided no single word would explain exactly how they worked so we left it as it is. Local keys override global keys of the same name, and a key profiles.x.keyname overrides a modules.keyname (if profile x is in effect´╗┐) regardless of whether the definitions being used are global or local.
Regards,

Tom

On 11 Apr, 2012,at 12:15 PM, Loaden <loaden at gmail.com> wrote:

> See config list log:
>
>     D:\qpSOFT\Projects\Qbs\tests\manual\hello>qbs config --list
>     local variables:
>     modules.qbs.platform: mingw32
>     profile: 4
>     global variables:
>     modules.qbs.platform: WinSDK7.1.7600.0.30514
>     modules.qt.core.path: D:\qpSOFT\DEVx86\qt
>     modules.qt.core.version: 5.0.0
>     profile: 5
>     profiles.4.qbs.platform: WinSDK7.1.7600.0.30514
>     profiles.4.qt.core.path: D:\qpSOFT\Projects\Qt4
>     profiles.5.qbs.platform: WinSDK7.1.7600.0.30514
>     profiles.5.qt.core.path: D:\qpSOFT\DEVx86\qt
>     profiles.5.qt.core.version: 5.0.0
>
> After test will see the local config is invalid!
> In default qbs use the global configuration.
> It's a bug? or a feature?
>
> -- 
> Regards
> Loaden
>
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20120411/273a5e10/attachment.html>


More information about the Qbs mailing list