diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-07-04 13:18:55 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-07-04 16:03:36 +0200 |
commit | 40ded579bd977dc8fc41aaa1cdfca36822d14fc6 (patch) | |
tree | 04069b8c15c05b2625dd45c869b45c37a6c62b3a /src/qml/compiler/qqmlirbuilder.cpp | |
parent | c1546f8b7005a7cc0ed25f9dc1c762a9c929a25b (diff) |
Simplify codegen error handling
There can only ever be one error, either a syntax error or a reference
error. We record the error type as we want to get rid of the virtual
throw<X>Error methods in favor of an explicit compilation result.
Change-Id: Ie228490aad8efb7885083f6485f931299567f54c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 7ed0a01cb0..5d3d055db3 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1836,7 +1836,7 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil } scan.leaveEnvironment(); - if (hasError) + if (hasError()) return QVector<int>(); _context = nullptr; |