diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-04-22 11:51:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-04-22 12:28:37 +0200 |
commit | 7d1b3b23897359b4ba51747229261867993536a8 (patch) | |
tree | e6fd5a89383535a8cf9b65d07403a2950d839bcd /src | |
parent | c50113aaf4515c172a1dd2eb30532de088307d78 (diff) | |
parent | 93bc4113f06dce4c942374d765bef20054cd1f94 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I95266fdaf5c6dc65969bd2e28403da7969367d32
Diffstat (limited to 'src')
-rw-r--r-- | src/particles/qquickimageparticle.cpp | 7 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmltooling.pro | 29 | ||||
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 2 | ||||
-rw-r--r-- | src/qml/jit/qv4isel_masm.cpp | 1 | ||||
-rw-r--r-- | src/qml/jit/qv4regalloc.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4value.cpp | 3 | ||||
-rw-r--r-- | src/qml/memory/qv4mm.cpp | 7 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickmultipointtoucharea.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | 4 |
15 files changed, 49 insertions, 20 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index fde491b1ef..e388b52db3 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -1323,6 +1323,7 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) getState<ImageMaterialData>(m_material)->animSheetSize = QSizeF(image.size()); if (m_spriteEngine) m_spriteEngine->setCount(m_count); + Q_FALLTHROUGH(); case Tabled: if (!m_material) m_material = TabledMaterial::createMaterial(); @@ -1355,12 +1356,15 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) getState<ImageMaterialData>(m_material)->colorTable = QSGPlainTexture::fromImage(colortable); fillUniformArrayFromImage(getState<ImageMaterialData>(m_material)->sizeTable, sizetable, UNIFORM_ARRAY_SIZE); fillUniformArrayFromImage(getState<ImageMaterialData>(m_material)->opacityTable, opacitytable, UNIFORM_ARRAY_SIZE); + Q_FALLTHROUGH(); case Deformable: if (!m_material) m_material = DeformableMaterial::createMaterial(); + Q_FALLTHROUGH(); case Colored: if (!m_material) m_material = ColoredMaterial::createMaterial(); + Q_FALLTHROUGH(); default://Also Simple if (!m_material) m_material = SimpleMaterial::createMaterial(); @@ -1530,6 +1534,7 @@ void QQuickImageParticle::prepareNextFrame(QSGNode **node) if (m_spriteEngine) m_spriteEngine->updateSprites(timeStamp);//fires signals if anim changed spritesUpdate(time); + Q_FALLTHROUGH(); case Tabled: case Deformable: case Colored: @@ -1691,6 +1696,7 @@ void QQuickImageParticle::initialize(int gIdx, int pIdx) writeTo->animWidth = getState<ImageMaterialData>(m_material)->animSheetSize.width(); writeTo->animHeight = getState<ImageMaterialData>(m_material)->animSheetSize.height(); } + Q_FALLTHROUGH(); case Tabled: case Deformable: //Initial Rotation @@ -1737,6 +1743,7 @@ void QQuickImageParticle::initialize(int gIdx, int pIdx) getShadowDatum(datum)->autoRotate = autoRotate; } } + Q_FALLTHROUGH(); case Colored: //Color initialization // Particle color diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index 8123e2999e..27c51b53c8 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -QT_FOR_CONFIG += qml +QT_FOR_CONFIG += qml-private # Utilities SUBDIRS += \ @@ -10,25 +10,28 @@ SUBDIRS += \ qmldbg_native \ qmldbg_server +qmldbg_native.depends = packetprotocol +qmldbg_server.depends = packetprotocol + qtConfig(qml-network) { SUBDIRS += \ qmldbg_local \ qmldbg_tcp } -# Services -SUBDIRS += \ - qmldbg_debugger \ - qmldbg_profiler \ - qmldbg_messages \ - qmldbg_nativedebugger +qtConfig(qml-interpreter) { + # Services + SUBDIRS += \ + qmldbg_debugger \ + qmldbg_profiler \ + qmldbg_messages \ + qmldbg_nativedebugger -qmldbg_server.depends = packetprotocol -qmldbg_native.depends = packetprotocol -qmldbg_debugger.depends = packetprotocol -qmldbg_profiler.depends = packetprotocol -qmldbg_messages.depends = packetprotocol -qmldbg_nativedebugger.depends = packetprotocol + qmldbg_debugger.depends = packetprotocol + qmldbg_profiler.depends = packetprotocol + qmldbg_messages.depends = packetprotocol + qmldbg_nativedebugger.depends = packetprotocol +} qtHaveModule(quick) { SUBDIRS += \ diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index cc542e94e7..62e2833089 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -2345,6 +2345,7 @@ private: case OpIncrement: case OpDecrement: Q_ASSERT(!"Inplace operators should have been removed!"); + Q_UNREACHABLE(); default: Q_UNIMPLEMENTED(); Q_UNREACHABLE(); @@ -2645,6 +2646,7 @@ private: case OpMul: if (!targetTemp || !knownOk.contains(*targetTemp)) return false; + Q_FALLTHROUGH(); case OpBitAnd: case OpBitOr: case OpBitXor: diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp index 599370f73d..c2853a39d2 100644 --- a/src/qml/jit/qv4isel_masm.cpp +++ b/src/qml/jit/qv4isel_masm.cpp @@ -1002,6 +1002,7 @@ void InstructionSelection<JITAssembler>::convertTypeToBool(IR::Expr *source, IR: generateRuntimeCall(_as, JITTargetPlatform::ReturnValueRegister, toBoolean, PointerToValue(source)); _as->storeBool(JITTargetPlatform::ReturnValueRegister, target); + Q_FALLTHROUGH(); case IR::VarType: default: Pointer addr = _as->loadAddressForReading(JITTargetPlatform::ScratchRegister, source); diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 8eafaaaa8a..d418b050c4 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -125,6 +125,7 @@ protected: *out << ri->prettyName(); break; } + Q_FALLTHROUGH(); } default: IRPrinterWithPositions::visitTemp(e); @@ -662,6 +663,7 @@ protected: // IRDecoder addUses(rightSource->asTemp(), Use::MustHaveRegister); break; } + Q_FALLTHROUGH(); #endif case OpBitAnd: case OpBitOr: diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 806a614e95..2735883603 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -183,7 +183,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) "solutions for your platform."); } #else - factory = new JIT::ISelFactory; + factory = new JIT::ISelFactory<>; #endif } iselFactory.reset(factory); diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index b28a5f9000..9da0df326f 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -472,6 +472,7 @@ Heap::String *RuntimeHelpers::convertToString(ExecutionEngine *engine, const Val switch (value.type()) { case Value::Empty_Type: Q_ASSERT(!"empty Value encountered"); + Q_UNREACHABLE(); case Value::Undefined_Type: return engine->id_undefined()->d(); case Value::Null_Type: @@ -504,6 +505,7 @@ static Heap::String *convert_to_string_add(ExecutionEngine *engine, const Value switch (value.type()) { case Value::Empty_Type: Q_ASSERT(!"empty Value encountered"); + Q_UNREACHABLE(); case Value::Undefined_Type: return engine->id_undefined()->d(); case Value::Null_Type: diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp index e34ac9c764..f41442df7a 100644 --- a/src/qml/jsruntime/qv4value.cpp +++ b/src/qml/jsruntime/qv4value.cpp @@ -113,6 +113,7 @@ double Value::toNumberImpl() const case QV4::Value::Managed_Type: #ifdef V4_BOOTSTRAP Q_UNIMPLEMENTED(); + Q_FALLTHROUGH(); #else if (String *s = stringValue()) return RuntimeHelpers::stringToNumber(s->toQString()); @@ -140,6 +141,7 @@ QString Value::toQStringNoThrow() const switch (type()) { case Value::Empty_Type: Q_ASSERT(!"empty Value encountered"); + Q_UNREACHABLE(); case Value::Undefined_Type: return QStringLiteral("undefined"); case Value::Null_Type: @@ -193,6 +195,7 @@ QString Value::toQString() const switch (type()) { case Value::Empty_Type: Q_ASSERT(!"empty Value encountered"); + Q_UNREACHABLE(); case Value::Undefined_Type: return QStringLiteral("undefined"); case Value::Null_Type: diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index a0cfd5d925..c4bd1a733f 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -165,6 +165,13 @@ struct MemorySegment { size_t pageSize = WTF::pageSize(); size = (size + pageSize - 1) & ~(pageSize - 1); +#if !defined(Q_OS_LINUX) && !defined(Q_OS_WIN) + // Linux and Windows zero out pages that have been decommitted and get committed again. + // unfortunately that's not true on other OSes (e.g. BSD based ones), so zero out the + // memory before decommit, so that we can be sure that all chunks we allocate will be + // zero initialized. + memset(chunk, 0, size); +#endif pageReservation.decommit(chunk, size); } diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index dab35f2a54..bda3250c16 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -889,7 +889,7 @@ void QQuickCanvasItem::getContext(QQmlV4Function *args) } /*! - \qmlmethod long QtQuick::Canvas::requestAnimationFrame(callback) + \qmlmethod int QtQuick::Canvas::requestAnimationFrame(callback) This function schedules callback to be invoked before composing the Qt Quick scene. @@ -919,7 +919,7 @@ void QQuickCanvasItem::requestAnimationFrame(QQmlV4Function *args) } /*! - \qmlmethod QtQuick::Canvas::cancelRequestAnimationFrame(long handle) + \qmlmethod QtQuick::Canvas::cancelRequestAnimationFrame(int handle) This function will cancel the animation callback referenced by \a handle. */ diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp index 62119effb2..1882976e0c 100644 --- a/src/quick/items/qquickmultipointtoucharea.cpp +++ b/src/quick/items/qquickmultipointtoucharea.cpp @@ -176,8 +176,6 @@ void QQuickTouchPoint::setVelocity(const QVector2D &velocity) It is deprecated because a touch point is more correctly modeled as an ellipse, whereas this rectangle represents the outer bounds of the ellipse after \l rotation. - - \sa horizontalDiameter, verticalDiameter */ void QQuickTouchPoint::setArea(const QRectF &area) { diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 1edff3ff83..f4a88a1c45 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -3885,6 +3885,7 @@ void QQuickTextInputPrivate::parseInputMask(const QString &maskFields) break; case '\\': escape = true; + Q_FALLTHROUGH(); default: s = true; break; diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index d4324bc489..14f8514289 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -338,7 +338,7 @@ void Updater::visitNode(Node *n) case QSGNode::RenderNodeType: if (m_added) n->renderNodeElement()->root = m_roots.last(); - // Fall through to visit children. + Q_FALLTHROUGH(); // to visit children default: SHADOWNODE_TRAVERSE(n) visitNode(child); break; diff --git a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp index 48ab1aa52f..2b70139b37 100644 --- a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp +++ b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp @@ -133,6 +133,7 @@ Tokenizer::Token Tokenizer::next() pos += 3; return Token_Void; } + Q_FALLTHROUGH(); } case ';': return Token_SemiColon; diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp index d8f92919cb..e134a5d4d3 100644 --- a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp +++ b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp @@ -122,6 +122,7 @@ Tokenizer::Token Tokenizer::next() case '*': if (*pos == '/') return Token_MultiLineCommentEnd; + Q_FALLTHROUGH(); case '\n': return Token_NewLine; @@ -129,6 +130,7 @@ Tokenizer::Token Tokenizer::next() case '\r': if (*pos == '\n') return Token_NewLine; + Q_FALLTHROUGH(); case '#': { if (*pos == 'v' && pos[1] == 'e' && pos[2] == 'r' && pos[3] == 's' @@ -177,7 +179,7 @@ Tokenizer::Token Tokenizer::next() pos += 3; return Token_Void; } - // Fall-thru + Q_FALLTHROUGH(); } default: // Identifier... |