Details
Description
I was pushing an array of strings onto an array, which worked in the previous versions of qbs but doesn't work in 1.6. I think I'm using 1.6 since I'm on QtCreator 4.1? I know this is wrong, but instead of qbs handling gracefully, and qbs fails to parse my app's qbs files with the following error:
/Users/vpicaver/Qt/Qt Creator.app/Contents/Resources/qbs/share/qbs/modules/cpp/GenericGCC.qbs:218: error: Result of expression 'value[i].startsWith' [undefined] is not a function.
I was using the following cxxFlags that caused the problem.
cpp.cxxFlags: { var flags = [ "-stdlib=libc++", //Needed for protoc "-Werror", //Treat warnings as errors ]; if(qbs.buildVariant == "debug") { flags.push(["-fsanitize=address", "-fno-omit-frame-pointer"]) console.error("Flags:" + JSON.stringify(flags)); } return flags; }
GenericGCC.qbs assumes your passing string to it (so that startWidth() function is defined), but sometimes users aren't so smart... I think qbs should validate that all the inputs are the correct type and report to the user where their input's aren't.
Attachments
For Gerrit Dashboard: QBS-1013 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
169577,3 | Do not auto-convert values to property types | master | qbs/qbs | Status: MERGED | +2 | 0 |