diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 658a4d686e2..603752dba8f 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -3112,11 +3112,11 @@ \li log(x) \li Returns the natural logarithm (base E) of x \row - \li max(x, y) - \li Returns the higher value of x and y + \li max([value1[, value2[, ...]]]) + \li Returns the highest value of the given numbers \row - \li min(x, y) - \li Returns the lower value of x and y + \li min([value1[, value2[, ...]]]) + \li Returns the lowest value of the given numbers \row \li oct(x) \li Returns the octal representation of x diff --git a/src/plugins/coreplugin/locator/javascriptfilter.cpp b/src/plugins/coreplugin/locator/javascriptfilter.cpp index 6f88a9188a2..58a119047bd 100644 --- a/src/plugins/coreplugin/locator/javascriptfilter.cpp +++ b/src/plugins/coreplugin/locator/javascriptfilter.cpp @@ -133,8 +133,8 @@ void JavaScriptFilter::setupEngine() "function floor(x) { return Math.floor(x); }\n" "function hex(x) { return '0x' + x.toString(16); }\n" "function log(x) { return Math.log(x); }\n" - "function max(x, y) { return Math.max(x, y); }\n" - "function min(x, y) { return Math.min(x, y); }\n" + "function max() { return Math.max.apply(null, arguments); }\n" + "function min() { return Math.min.apply(null, arguments); }\n" "function oct(x) { return '0' + x.toString(8); }\n" "function pi() { return Math.PI; }\n" "function pow(x, y) { return Math.pow(x, y); }\n"