Skip to content

Commit

Permalink
make command line parsing error messages consistent
Browse files Browse the repository at this point in the history
... by adding some quoting and punctuation.

Change-Id: I553171a0c001edc195fcf2e85f0f70bf2cfdd728
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
ossilator committed Jul 22, 2016
1 parent 601019e commit 0c3f431
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defineTest(qtConfCommandline_void) {
opt = $${1}
val = $${2}
!isEmpty(val) {
qtConfAddError("Command line option $$opt expects no argument ('$$val' given).")
qtConfAddError("Command line option '$$opt' expects no argument ('$$val' given).")
return()
}

Expand Down Expand Up @@ -110,7 +110,7 @@ defineTest(qtConfValidateValue) {
return(true)
}

qtConfAddError("Invalid value $$val supplied to command line option '$$opt'.")
qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
return(false)
}

Expand All @@ -120,7 +120,7 @@ defineTest(qtConfCommandline_string) {
isEmpty(val): val = $$qtConfGetNextCommandlineArg()

contains(val, "^-.*")|isEmpty(val) {
qtConfAddError("No value supplied to command line option $$opt")
qtConfAddError("No value supplied to command line option '$$opt'.")
return()
}

Expand Down Expand Up @@ -154,7 +154,7 @@ defineTest(qtConfCommandline_addString) {
isEmpty(val): val = $$qtConfGetNextCommandlineArg()

contains(val, "^-.*")|isEmpty(val) {
qtConfAddError("No value supplied to command line option $$opt")
qtConfAddError("No value supplied to command line option '$$opt'.")
return()
}

Expand Down Expand Up @@ -200,7 +200,7 @@ defineTest(qtConfParseCommandLine) {
opt = $$replace(c, "^--?([^-].*)", "\\1")
val =
} else {
error("Invalid command line parameter $$c")
error("Invalid command line parameter '$$c'.")
}

type = $$eval(config.commandline.options.$${opt})
Expand All @@ -225,7 +225,7 @@ defineTest(qtConfParseCommandLine) {
}

isEmpty(type): \
error("Unknown command line option $$c")
error("Unknown command line option '$$c'.")

call = "qtConfCommandline_$${type}"
!defined($$call, test): \
Expand Down

0 comments on commit 0c3f431

Please sign in to comment.