Merge remote-tracking branch 'origin/stable' into dev
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 11 Feb 2014 10:08:11 +0000 (11:08 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 11 Feb 2014 11:00:31 +0000 (12:00 +0100)
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4arrayobject.cpp
src/qml/jsruntime/qv4context.cpp

Change-Id: Ied5b23bec4dc14abe51127c507aed668f855c1e1

28 files changed:
1  2 
examples/quick/quick.pro
src/qml/compiler/qv4isel_masm.cpp
src/qml/compiler/qv4isel_masm_p.h
src/qml/compiler/qv4regalloc.cpp
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4arrayobject.cpp
src/qml/jsruntime/qv4context.cpp
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmllocale.cpp
src/qml/qml/qqmlvme.cpp
src/quick/items/qquickitem.cpp
src/quick/items/qquickitemview.cpp
src/quick/items/qquicktext.cpp
src/quick/items/qquicktranslate.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
src/quick/scenegraph/qsgcontext.cpp
src/quick/scenegraph/qsgcontext_p.h
src/quick/scenegraph/qsgrenderloop.cpp
src/quick/scenegraph/qsgthreadedrenderloop.cpp
src/quick/scenegraph/qsgwindowsrenderloop.cpp
src/quick/util/qquickpropertychanges.cpp
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -302,11 -308,21 +302,11 @@@ ReturnedValue ArrayPrototype::method_pu
          return Encode(newLen);
      }
  
 -    if (!instance->protoHasArray() && instance->arrayDataLen <= len && (instance->flags & SimpleArray)) {
 -        for (int i = 0; i < ctx->callData->argc; ++i) {
 -            if (!instance->sparseArray) {
 -                if (len >= instance->arrayAlloc)
 -                    instance->arrayReserve(len + 1);
 -                instance->arrayData[len].value = ctx->callData->args[i];
 -                if (instance->arrayAttributes)
 -                    instance->arrayAttributes[len] = Attr_Data;
 -                instance->arrayDataLen = len + 1;
 -            } else {
 -                uint j = instance->allocArrayValue(ctx->callData->args[i]);
 -                instance->sparseArray->push_back(j, len);
 -            }
 -            ++len;
 -        }
 +    if (!ctx->callData->argc) {
 +        ;
-     } else if (!instance->protoHasArray() && instance->arrayData->length() <= len) {
++    } else if (!instance->protoHasArray() && instance->arrayData->length() <= len && instance->arrayType() == ArrayData::Simple) {
 +        instance->arrayData->vtable()->putArray(instance.getPointer(), len, ctx->callData->args, ctx->callData->argc);
 +        len = instance->arrayData->length();
      } else {
          for (int i = 0; i < ctx->callData->argc; ++i)
              instance->putIndexed(len + i, ctx->callData->args[i]);
@@@ -71,7 -91,7 +71,7 @@@ CallContext *ExecutionContext::newCallC
          c->lookups = c->compilationUnit->runtimeLookups;
      }
  
-     c->locals = (Value *)(c + 1);
 -    c->locals = (SafeValue *)((quintptr(c + 1) + 7) & ~7);
++    c->locals = (Value *)((quintptr(c + 1) + 7) & ~7);
  
      if (function->varCount)
          std::fill(c->locals, c->locals + function->varCount, Primitive::undefinedValue());
@@@ -247,18 -239,9 +247,18 @@@ struct ExecutionContextSave
      }
  };
  
 +inline Scope::Scope(ExecutionContext *ctx)
 +    : engine(ctx->engine)
 +#ifndef QT_NO_DEBUG
 +    , size(0)
 +#endif
 +{
 +    mark = engine->jsStackTop;
 +}
 +
  /* Function *f, int argc */
  #define requiredMemoryForExecutionContect(f, argc) \
-     sizeof(CallContext) + sizeof(Value) * (f->varCount + qMax((uint)argc, f->formalParameterCount)) + sizeof(CallData)
+     ((sizeof(CallContext) + 7) & ~7) + sizeof(Value) * (f->varCount + qMax((uint)argc, f->formalParameterCount)) + sizeof(CallData)
  
  } // namespace QV4
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -47,8 -47,8 +47,9 @@@
  #include <qgraphicsitem.h>
  #include <qstandarditemmodel.h>
  #include <QtCore/qnumeric.h>
+ #include <qqmlengine.h>
  #include <stdlib.h>
 +#include <private/qv4alloca_p.h>
  
  #ifdef Q_CC_MSVC
  #define NO_INLINE __declspec(noinline)
@@@ -379,22 -378,11 +379,22 @@@ void tst_QQuickAccessible::hitTest(
  
  void tst_QQuickAccessible::checkableTest()
  {
-     QQuickView *window = new QQuickView();
+     QScopedPointer<QQuickView> window(new QQuickView());
      window->setSource(testFileUrl("checkbuttons.qml"));
      window->show();
-     QVERIFY(QTest::qWaitForWindowActive(window));
 +    window->requestActivate();
++    QVERIFY(QTest::qWaitForWindowActive(window.data()));
 +
 +    QQuickItem *contentItem = window->contentItem();
 +    QVERIFY(contentItem);
 +    QQuickItem *rootItem = contentItem->childItems().first();
 +    QVERIFY(rootItem);
 +
 +    // the window becomes active
 +    QAccessible::State activatedChange;
 +    activatedChange.active = true;
  
-     QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window);
+     QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window.data());
      QVERIFY(iface);
      QAccessibleInterface *root = iface->child(0);