diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-19 21:22:05 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-19 21:22:10 +0200 |
commit | 79349119c66c2237d70fe4c13ebb9fe273ce2f85 (patch) | |
tree | 4cfa3561f188a3904496cef330c79c1a687436ed /src/qml | |
parent | bf3b596066af733c04b5ed3ef2dc9ec753a41e79 (diff) | |
parent | 4f0988c3907406087dbfdc193abfbf767678d814 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 7 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/exposecppattributes.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/extending-tutorial.qdoc | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 3 | ||||
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 2 |
8 files changed, 18 insertions, 10 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 4130ad08d7..e0def1021b 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2513,6 +2513,13 @@ bool Codegen::visit(ReturnStatement *ast) Result expr = expression(ast->expression); move(_block->TEMP(_returnAddress), *expr); } + + // Since we're leaving, don't let any finally statements we emit as part of the unwinding + // jump to exception handlers at run-time if they throw. + IR::BasicBlock *unwindBlock = _function->newBasicBlock(/*no exception handler*/Q_NULLPTR); + _block->JUMP(unwindBlock); + _block = unwindBlock; + unwindException(0); _block->JUMP(_exitBlock); diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc index c7e4930bfb..f5aea0b01a 100644 --- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc +++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc @@ -73,7 +73,7 @@ convert them as appropriately when used from QML. Additionally, C++ classes that are \l{Registering C++ types with the QML type system}{registered} with the QML type system can be can be used as data types, as can their enums if appropriately registered. See \l{qtqml-cppintegration-data.html}{Data Type -Conversion Between QML and C++} for details for further information. +Conversion Between QML and C++} for further information. Additionally, data ownership rules are taken into consideration when data is transferred from C++ to QML. See \l {Data Ownership} for more details. diff --git a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc index c0cfc3e1aa..58cc650e01 100644 --- a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc +++ b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc @@ -389,7 +389,7 @@ directory. When building this example on Windows or Linux, the \c Charts directory will be located at the same level as the application that uses our new import module. This way, the QML engine will find our module as the default search path for QML -imports includes the directory of the application executable. On OS X, the +imports includes the directory of the application executable. On \macos, the plugin binary is copied to \c Contents/PlugIns in the the application bundle; this path is set in \l {tutorials/extending-qml/chapter6-plugins/app.pro} {chapter6-plugins/app.pro}: diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index b68dbc27b7..eda7774f90 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -58,6 +58,8 @@ #include "qv4value_p.h" #include "qv4internalclass_p.h" +#include <QtCore/qtypetraits.h> + QT_BEGIN_NAMESPACE @@ -132,7 +134,7 @@ struct ObjectVTable #define DEFINE_OBJECT_VTABLE(classname) \ const QV4::ObjectVTable classname::static_vtbl = \ { \ - DEFINE_MANAGED_VTABLE_INT(classname, &classname::SuperClass::static_vtbl == &Object::static_vtbl ? 0 : &classname::SuperClass::static_vtbl.vTable), \ + DEFINE_MANAGED_VTABLE_INT(classname, (QT_PREPEND_NAMESPACE(QtPrivate)::is_same<classname::SuperClass, Object>::value) ? Q_NULLPTR : &classname::SuperClass::static_vtbl.vTable), \ call, \ construct, \ get, \ diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index c95e767bb0..9032503fdf 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1262,19 +1262,19 @@ ReturnedValue Runtime::method_unwindException(ExecutionEngine *engine) void Runtime::method_pushWithScope(const Value &o, ExecutionEngine *engine) { engine->pushContext(engine->currentContext->newWithContext(o.toObject(engine))); - Q_ASSERT(engine->jsStackTop = engine->currentContext + 2); + Q_ASSERT(engine->jsStackTop == engine->currentContext + 2); } void Runtime::method_pushCatchScope(NoThrowEngine *engine, int exceptionVarNameIndex) { ExecutionContext *c = engine->currentContext; engine->pushContext(c->newCatchContext(c->d()->compilationUnit->runtimeStrings[exceptionVarNameIndex], engine->catchException(0))); - Q_ASSERT(engine->jsStackTop = engine->currentContext + 2); + Q_ASSERT(engine->jsStackTop == engine->currentContext + 2); } void Runtime::method_popScope(ExecutionEngine *engine) { - Q_ASSERT(engine->jsStackTop = engine->currentContext + 2); + Q_ASSERT(engine->jsStackTop == engine->currentContext + 2); engine->popContext(); engine->jsStackTop -= 2; } diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index cdaa9e83e9..0cc96be5a8 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -405,10 +405,9 @@ The following functions are also on the Qt object. \li \c "ios" - iOS \li \c "tvos" - tvOS \li \c "linux" - Linux - \li \c "osx" - OS X + \li \c "osx" - \macos \li \c "unix" - Other Unix-based OS \li \c "windows" - Windows - \li \c "wince" - Windows CE \li \c "winrt" - Windows Runtime \li \c "winphone" - Windows Phone \endlist diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 63e8da3aa8..ee4d3efa6f 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1717,7 +1717,7 @@ QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, \header \li Platform \li Valid suffixes \row \li Windows \li \c .dll \row \li Unix/Linux \li \c .so - \row \li OS X \li \c .dylib, \c .bundle, \c .so + \row \li \macos \li \c .dylib, \c .bundle, \c .so \endtable Version number on unix are ignored. diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 5d96240e5b..4b54123892 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -301,7 +301,7 @@ void QQmlPropertyCapture::registerQmlDependencies(const QV4::CompiledData::Funct if (!ep) return; QQmlPropertyCapture *capture = ep->propertyCapture; - if (!capture) + if (!capture || capture->watcher->wasDeleted()) return; if (capture->expression->m_permanentDependenciesRegistered) |