Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.9.1
-
None
-
2bda52aa3d50deb56128f42395ae9f2686af2a99
Description
The Problem
Consider a product that
- depends on Qt.core (which sets cpp.cxxLanguageVersion)
- depends on another module "globals" that sets cpp.cxxLanguageVersion
Module "globals" might be user-provided to set project-global properties as we recommend to do.
Resolving such a product will print a warning:
WARNING: Conflicting scalar values at /home/jobor/.config/QtProject/qbs/1.10.0/profiles/qt591/modules/Qt/core/core.qbs:94:29 and /home/jobor/playground/collidingModuleProp/modules/globals/globals.qbs:3:29.
...because cpp.cxxLanguageVersion is a scalar property, and qbs doesn't know how to resolve the conflict between scalar properties.
Proposed Solution
Provide a way to resolve conflicts on scalar properties. This could be done like this:
// In the cpp module PropertyOptions { name: "cxxLanguageVersion" resolveConflict: function (a, b) { return cxxLanguageVersionLessThan(a, b) ? b : a; } }
The function resolveConflict either returns a valid value or throws an exception. The default implementation returns the first parameter and prints the warning above.
Attachments
Issue Links
- is required for
-
QTCREATORBUG-19602 Property minimumMacosVersion is not set when building Creator with Qt 5.9.3, which causes build failure
- Closed