Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.3.1
-
None
-
Used qmake 3.0
-
dacf3994ba29106132c3a377dba303acdb74daca
Description
If a qmake function can receive multiple arguments and they are not all specified by the caller, but have been specified for the previous function, they are carried forward to the function.
The workaround is to explicitly leave them empty.
I don't know if this is by design, but it's a little unintuitive and can cause some surprises.
Example ".pro" file:
defineTest(optionalSecondArgumentFunction) { !isEmpty(2) : error("Received second argument: $$2"); warning("No second argument") } defineTest(anotherTwoArgumentFunction) { optionalSecondArgumentFunction(goodbye, ) # explicit empty second arg optionalSecondArgumentFunction(goodbye) } anotherTwoArgumentFunction(hello, world)