diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-27 09:22:19 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-28 07:56:46 +0000 |
commit | d6177808d6bff7f8d950bb3110daba9011e1c461 (patch) | |
tree | c2d386832efbe2e6ee3da02e7386aed8e23b5bf9 /tools | |
parent | aa8c0203104ce8d9e6ec42b28bfb3a31b601bffe (diff) |
Clarify error message when using eval in signal handlers
Task-number: QTBUG-64024
Change-Id: If8f749ef9ec072928cb352ad7cd4dcf140b6ed53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index adc9def590..8a2776e808 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -147,11 +147,13 @@ static bool checkArgumentsObjectUseInSignalHandlers(const QmlIR::Document &doc, if (compiledFunction->column > 0) error->message += QString::number(compiledFunction->column) + QLatin1Char(':'); - error->message += QLatin1String(" error: The use of the arguments object in signal handlers is\n" - "not supported when compiling qml files ahead of time, because it may be ambiguous if\n" - "any signal parameter is called \"arguments\". Unfortunately we cannot distinguish\n" - "between it being a parameter or the JavaScript arguments object at this point.\n" - "Consider renaming the parameter of the signal if applicable."); + error->message += QLatin1String(" error: The use of eval() or the use of the arguments object in signal handlers is\n" + "not supported when compiling qml files ahead of time. That is because it's ambiguous if \n" + "any signal parameter is called \"arguments\". Similarly the string passed to eval might use\n" + "\"arguments\". Unfortunately we cannot distinguish between it being a parameter or the\n" + "JavaScript arguments object at this point.\n" + "Consider renaming the parameter of the signal if applicable or moving the code into a\n" + "helper function."); return false; } } |