aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-18 09:47:06 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-18 09:47:21 +0200
commit5df9fb29e13800932e00800059ba431a95de160b (patch)
tree096a61564b0f5ee4a62549f2685cbe6a9b2261bf /src/qml
parentb03c85de2ab337858b44bf0a21692d7b544313a5 (diff)
parent4840bc0c207aa09b4332842c67e65bc92f43d3bd (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qv4codegen.cpp7
-rw-r--r--src/qml/doc/src/cppintegration/extending-tutorial.qdoc2
-rw-r--r--src/qml/jsruntime/qv4object_p.h4
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp6
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--src/qml/qml/qqmlimport.cpp2
6 files changed, 16 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index ad28e4d6d1..461ff89550 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2512,6 +2512,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/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 e4431a9fc9..fe6b487a83 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -57,6 +57,8 @@
#include "qv4scopedvalue_p.h"
#include "qv4value_p.h"
+#include <QtCore/qtypetraits.h>
+
QT_BEGIN_NAMESPACE
@@ -131,7 +133,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 0e10f7699e..60136a9bd9 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1236,19 +1236,19 @@ ReturnedValue Runtime::unwindException(ExecutionEngine *engine)
void Runtime::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::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::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 dd54760760..517324a80f 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -406,7 +406,7 @@ 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 "winrt" - Windows Runtime
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index b51c78b8d4..c1f5e75369 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1729,7 +1729,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.