From fffb997e192a72b4dcd66edc2fbad5473dd359f3 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 6 Jan 2017 09:22:27 +0100 Subject: Fix incorrect JavaScript evaluation with the JIT This is a regression from commit 7e14b531b294650733a61a9365eb9ef74f8a7a90, that replaced a QHash with a vector of intervals. When an interval is split, it may happen that during one interval a temp is stored in a register and in the second interval it ends up in a different register or the stack. The _liveIntervals variable, formerly the _intervalForTemp hash, tracked the intervals per temp when going through the basic blocks and statements during the renumbering phase. Indexing uniquely by temp is important therefore for _liveIntervals and addNewIntervals violated that by replacing the QHash replacement _intervalForTemp[i->temp()] = i; with _liveIntervals.push_back(i); This is how we may end up with multiple intervals for the same temp (in different locations), and when doing the linear lookup we'd only find the first. Restoring the replacement behavior and thus ensuring uniqueness by temp fixes the miscompilations. Task-number: QTBUG-57779 Change-Id: Ib8f53672b66750f68e16e47794dbc5f39989e1a2 Reviewed-by: Lars Knoll Reviewed-by: Robin Burchell --- src/qml/jit/qv4regalloc.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 406b9096ea..b168a1e2ba 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -969,7 +969,15 @@ private: break; Q_ASSERT(!i->isFixedInterval()); - _liveIntervals.push_back(i); + auto it = _liveIntervals.begin(); + for (; it != _liveIntervals.end(); ++it) { + if ((*it)->temp() == i->temp()) { + *it = i; + break; + } + } + if (it == _liveIntervals.end()) + _liveIntervals.push_back(i); // qDebug() << "-- Activating interval for temp" << i->temp().index; _unprocessedReverseOrder.removeLast(); -- cgit v1.2.3 From 5f828705bd694e71f6971f9e441cd6107ecb8130 Mon Sep 17 00:00:00 2001 From: Kavindra Palaraja Date: Fri, 6 Jan 2017 23:29:43 +0100 Subject: Remove documentation references to internal functions QSGOpacityNode::combinedOpacity() and QSGTransformNode::combinedMatrix() are intended to be internal. Task-number: QTBUG-53897 Change-Id: Icc73476eb8af5cdc673f7ce9bacd25ecc75202b5 Reviewed-by: Robin Burchell Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/coreapi/qsgnode.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index a1e1ef8c27..7ef75d4b4c 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -337,13 +337,6 @@ QSGNode::~QSGNode() to the scene graph and will cause the preprocess() function to be called for every frame the node is rendered. - The preprocess function is called before the update pass that propagates - opacity and transformations through the scene graph. That means that - functions like QSGOpacityNode::combinedOpacity() and - QSGTransformNode::combinedMatrix() will not contain up-to-date values. - If such values are changed during the preprocess, these changes will be - propagated through the scene graph before it is rendered. - \warning Beware of deleting nodes while they are being preprocessed. It is possible, with a small performance hit, to delete a single node during its own preprocess call. Deleting a subtree which has nodes that also use -- cgit v1.2.3 From ec5f3fa6b7ddf0ed80801f70add90444f3714593 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 13 Jan 2017 17:41:34 +0900 Subject: Fix build without feature.shortcut Change-Id: Id0ea0037db4cc3878ae2f75109aa3a7daa120189 Reviewed-by: Lars Knoll --- src/quick/items/qquickevents_p_p.h | 2 ++ src/quick/util/qquickutilmodule.cpp | 9 ++++++++- src/quick/util/util.pri | 9 +++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index 7b281623fe..cf6f83e5b1 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -108,7 +108,9 @@ public: bool isAccepted() { return event.isAccepted(); } void setAccepted(bool accepted) { event.setAccepted(accepted); } +#if QT_CONFIG(shortcut) Q_REVISION(2) Q_INVOKABLE bool matches(QKeySequence::StandardKey key) const { return event.matches(key); } +#endif private: QKeyEvent event; diff --git a/src/quick/util/qquickutilmodule.cpp b/src/quick/util/qquickutilmodule.cpp index c1bc3d60b8..5728ad608e 100644 --- a/src/quick/util/qquickutilmodule.cpp +++ b/src/quick/util/qquickutilmodule.cpp @@ -54,7 +54,9 @@ #include "qquicktextmetrics_p.h" #include "qquicktransition_p.h" #include "qquickanimator_p.h" +#if QT_CONFIG(shortcut) #include "qquickshortcut_p.h" +#endif #include "qquickvalidator_p.h" #include #include @@ -63,7 +65,9 @@ #include #include +#if QT_CONFIG(shortcut) Q_DECLARE_METATYPE(QKeySequence::StandardKey) +#endif void QQuickUtilModule::defineModule() { @@ -114,13 +118,16 @@ void QQuickUtilModule::defineModule() qmlRegisterCustomType("QtQuick",2,0,"PropertyChanges", new QQuickPropertyChangesParser); +#if QT_CONFIG(shortcut) qRegisterMetaType(); qmlRegisterUncreatableType("QtQuick", 2, 2, "StandardKey", QStringLiteral("Cannot create an instance of StandardKey.")); +#endif qmlRegisterType("QtQuick", 2, 4, "FontMetrics"); qmlRegisterType("QtQuick", 2, 4, "TextMetrics"); +#if QT_CONFIG(shortcut) qmlRegisterType("QtQuick", 2, 5, "Shortcut"); - qmlRegisterType("QtQuick", 2, 6, "Shortcut"); +#endif } diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri index 1ef1018a31..b53b132cce 100644 --- a/src/quick/util/util.pri +++ b/src/quick/util/util.pri @@ -26,7 +26,6 @@ SOURCES += \ $$PWD/qquickanimatorcontroller.cpp \ $$PWD/qquickfontmetrics.cpp \ $$PWD/qquicktextmetrics.cpp \ - $$PWD/qquickshortcut.cpp \ $$PWD/qquickvalidator.cpp !contains(QT_CONFIG, no-qml-debug): SOURCES += $$PWD/qquickprofiler.cpp @@ -63,9 +62,15 @@ HEADERS += \ $$PWD/qquickprofiler_p.h \ $$PWD/qquickfontmetrics_p.h \ $$PWD/qquicktextmetrics_p.h \ - $$PWD/qquickshortcut_p.h \ $$PWD/qquickvalidator_p.h +qtConfig(shortcut) { + SOURCES += \ + $$PWD/qquickshortcut.cpp + HEADERS += \ + $$PWD/qquickshortcut_p.h +} + qtConfig(quick-path) { SOURCES += \ $$PWD/qquickpath.cpp \ -- cgit v1.2.3 From 04f91c0505495ae15d29c84b570a1f8a2a9347cb Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Sat, 14 Jan 2017 13:09:00 +0900 Subject: Fix build without feature.statemachine Change-Id: Iea95465a88627e312259ea62a8908d9cbb3f82ac Reviewed-by: Lars Knoll --- src/imports/imports.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imports/imports.pro b/src/imports/imports.pro index cad02a2980..c49c05956d 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -5,10 +5,10 @@ SUBDIRS += \ qtqml \ folderlistmodel \ localstorage \ - models \ - statemachine + models qtConfig(settings): SUBDIRS += settings +qtConfig(statemachine): SUBDIRS += statemachine qtHaveModule(quick) { SUBDIRS += \ -- cgit v1.2.3 From 563b640de4312d4a06f33c4db24bd2444586889f Mon Sep 17 00:00:00 2001 From: Kavindra Palaraja Date: Sun, 15 Jan 2017 10:31:07 +0100 Subject: Clarify that QML's date object includes time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-42495 Change-Id: I0f7693ed32d3ec696f5c75b7ce7acdb41dd0ce6f Reviewed-by: Topi Reiniö --- src/qml/doc/src/qmltypereference.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc index f32574fcc1..b2bb9ebd18 100644 --- a/src/qml/doc/src/qmltypereference.qdoc +++ b/src/qml/doc/src/qmltypereference.qdoc @@ -89,7 +89,7 @@ provided: \ingroup qtquickbasictypes \brief a date value. -The \c date type refers to a date value. +The \c date type refers to a date value, including the time of the day. To create a \c date value, specify it as a "YYYY-MM-DD" string: @@ -100,7 +100,7 @@ MyDatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" } To read a date value returned from a C++ extension class, use \l{QtQml::Qt::formatDate()}{Qt.formatDate()} and \l{QtQml::Qt::formatDateTime()}{Qt.formatDateTime()}. -When integrating with C++, note that any QDate value +When integrating with C++, note that any QDate or QDateTime value \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically converted into a \c date value, and vice-versa. -- cgit v1.2.3 From 89c6bee139422b17534f79129eea2820d2ce952e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 16 Jan 2017 16:28:31 +0100 Subject: Fix support for QJSValue as C++ signal parameter type, part 2 After commit 0e3380f9c6ab6e3ea7398caccf5aa84f1575f1cd we wouldn't crash anymore, if QJSValue::UndefinedValue was provided as value for a QJSValue C++ signal parameter. However that was not a complete fix for the regression of commit aa869cbb06bcf005e238059a2cb0205947ff0b5f, as other primitive values stored in QJSValue as QVariant were not converted, so for example QJSValue(42). So let's fix this once and for all by using QJSValuePrivate::valueForData, that handles all types of QJSValuePrivate encodings. Task-number: QTBUG-58133 Change-Id: Ib7c0461b18df6260ccd4bce729ae2348281eb7f3 Reviewed-by: Arnaud Vrac Reviewed-by: Lars Knoll --- src/qml/qml/qqmlboundsignal.cpp | 2 +- tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml | 8 +++++++- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index d207a4908c..1fdb0d2e25 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -199,7 +199,7 @@ void QQmlBoundSignalExpression::evaluate(void **a) // for several cases (such as QVariant type and QObject-derived types) //args[ii] = engine->metaTypeToJS(type, a[ii + 1]); if (type == qMetaTypeId()) { - if (QV4::Value *v4Value = QJSValuePrivate::getValue(reinterpret_cast(a[ii + 1]))) + if (QV4::Value *v4Value = QJSValuePrivate::valueForData(reinterpret_cast(a[ii + 1]), &callData->args[ii])) callData->args[ii] = *v4Value; else callData->args[ii] = QV4::Encode::undefined(); diff --git a/tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml b/tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml index 676593096c..54d29dfc94 100644 --- a/tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml +++ b/tests/auto/qml/qqmlecmascript/data/signalParameterTypes.qml @@ -16,5 +16,11 @@ MyQmlObject onBasicSignal: root.mySignal(10, 19.2, Qt.rgba(1, 1, 0, 1), Qt.rgba(1, 0, 1, 1), MyQmlObject.EnumValue3, Qt.LeftButton) - onQjsValueEmittingSignal: {} + property bool emittedQjsValueWasUndefined + property int emittedQjsValueAsInt + + onQjsValueEmittingSignal: { + emittedQjsValueWasUndefined = value === undefined; + emittedQjsValueAsInt = value + } } diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index b8f12e772d..20f7940e9d 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -1410,7 +1410,6 @@ void tst_qqmlecmascript::signalParameterTypes() QVERIFY(object != 0); emit object->basicSignal(); - emit object->qjsValueEmittingSignal(QJSValue()); QCOMPARE(object->property("intProperty").toInt(), 10); QCOMPARE(object->property("realProperty").toReal(), 19.2); @@ -1419,6 +1418,12 @@ void tst_qqmlecmascript::signalParameterTypes() QVERIFY(object->property("enumProperty") == MyQmlObject::EnumValue3); QVERIFY(object->property("qtEnumProperty") == Qt::LeftButton); + emit object->qjsValueEmittingSignal(QJSValue()); + QVERIFY(object->property("emittedQjsValueWasUndefined").toBool()); + emit object->qjsValueEmittingSignal(QJSValue(42)); + QVERIFY(!object->property("emittedQjsValueWasUndefined").toBool()); + QCOMPARE(object->property("emittedQjsValueAsInt").value(), 42); + delete object; } -- cgit v1.2.3 From 94324a4ea2261940d1d55dec141c885bf4f57832 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 19 Jan 2017 09:05:46 +0100 Subject: Fix memory leak in V4 Transitions contain both an id and a set of flags, but the sorting failed to take the flags into account in the operator<. As a result we would some times end up with duplicate entries if the same id was added multiple times with different flags. If the same id was added again and again with varying flags, this could lead to an ever expanding list filled with duplicate entries. Fix this by also taking flags into account in operator< so that operator< and operator== are symetric and the list gets correctly sorted. Change-Id: I762ec3f0c5b4ed9a1aecb9a883187a0445491591 Reviewed-by: Simon Hausmann Reviewed-by: Robin Burchell --- src/qml/jsruntime/qv4internalclass_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index dcda949c97..1d8ef4b0fb 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -234,7 +234,7 @@ struct InternalClassTransition { return id == other.id && flags == other.flags; } bool operator<(const InternalClassTransition &other) const - { return id < other.id; } + { return id < other.id || (id == other.id && flags < other.flags); } }; struct InternalClass : public QQmlJS::Managed { -- cgit v1.2.3 From 03505d6eb7164298617c1a88979e802d7da12e15 Mon Sep 17 00:00:00 2001 From: Oleg Yadrov Date: Tue, 3 Jan 2017 14:49:13 -0800 Subject: StackLayout: propagate rearrange() call to child layouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-57867 Change-Id: I0190b892e2bc2966b82a0dbd99e53fd9d6848957 Reviewed-by: Jan Arve Sæther --- src/imports/layouts/qquickstacklayout.cpp | 6 +- .../quick/qquicklayouts/data/tst_stacklayout.qml | 107 +++++++++++++++++++++ tests/auto/quick/qquicklayouts/qquicklayouts.pro | 3 +- 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 tests/auto/quick/qquicklayouts/data/tst_stacklayout.qml diff --git a/src/imports/layouts/qquickstacklayout.cpp b/src/imports/layouts/qquickstacklayout.cpp index a223dd0374..0bfe63816d 100644 --- a/src/imports/layouts/qquickstacklayout.cpp +++ b/src/imports/layouts/qquickstacklayout.cpp @@ -307,7 +307,11 @@ void QQuickStackLayout::rearrange(const QSizeF &newSize) QQuickItem *item = itemAt(d->currentIndex); Q_ASSERT(item); item->setPosition(QPointF(0,0)); // ### respect alignment? - item->setSize(newSize.expandedTo(hints.min()).boundedTo(hints.max())); + const QSizeF oldSize(item->width(), item->height()); + const QSizeF effectiveNewSize = newSize.expandedTo(hints.min()).boundedTo(hints.max()); + item->setSize(effectiveNewSize); + if (effectiveNewSize == oldSize) + item->polish(); QQuickLayout::rearrange(newSize); } diff --git a/tests/auto/quick/qquicklayouts/data/tst_stacklayout.qml b/tests/auto/quick/qquicklayouts/data/tst_stacklayout.qml new file mode 100644 index 0000000000..8234ac6ef7 --- /dev/null +++ b/tests/auto/quick/qquicklayouts/data/tst_stacklayout.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.2 +import QtTest 1.0 +import QtQuick.Layouts 1.3 + +Item { + id: container + width: 200 + height: 200 + TestCase { + id: testCase + name: "Tests_StackLayout" + when: windowShown + width: 200 + height: 200 + + Component { + id: layout_rearrange_Component + + StackLayout { + width: 640 + height: 480 + + property alias testRectangle: testRectangle + + RowLayout { + spacing: 0 + + Rectangle { + Layout.preferredWidth: 100 + Layout.preferredHeight: 100 + } + + Rectangle { + id: testRectangle + Layout.preferredWidth: 100 + Layout.preferredHeight: 100 + visible: false + } + + Item { + Layout.fillWidth: true + } + } + } + } + + function test_rearrange() + { + var layout = layout_rearrange_Component.createObject(container) + compare(layout.testRectangle.x, 0) + layout.testRectangle.visible = true + tryCompare(layout.testRectangle, "x", 100) + + layout.destroy() + } + } +} diff --git a/tests/auto/quick/qquicklayouts/qquicklayouts.pro b/tests/auto/quick/qquicklayouts/qquicklayouts.pro index 9ed3e076be..5079d0a182 100644 --- a/tests/auto/quick/qquicklayouts/qquicklayouts.pro +++ b/tests/auto/quick/qquicklayouts/qquicklayouts.pro @@ -9,5 +9,6 @@ TESTDATA = data/* OTHER_FILES += \ data/tst_rowlayout.qml \ - data/tst_gridlayout.qml + data/tst_gridlayout.qml \ + data/tst_stacklayout.qml -- cgit v1.2.3 From 63ce81bb052a5c462cf30f2e4293466fb9084f5a Mon Sep 17 00:00:00 2001 From: Julien Gueytat Date: Tue, 18 Oct 2016 10:21:55 +0200 Subject: No need to define c99 math functions in c++11 mode Change-Id: I5a04cb678ad4a222d2a716dd1499f5103bb66c8e Reviewed-by: Simon Hausmann --- src/3rdparty/masm/wtf/MathExtras.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h index 75e3670367..3740d54beb 100644 --- a/src/3rdparty/masm/wtf/MathExtras.h +++ b/src/3rdparty/masm/wtf/MathExtras.h @@ -88,7 +88,7 @@ inline double wtf_ceil(double x) { return copysign(ceil(x), x); } #endif -#if OS(SOLARIS) +#if OS(SOLARIS) && __cplusplus < 201103L namespace std { -- cgit v1.2.3 From c4067b42f7ab359ed8d1285211a3eb2311ed5338 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 19 Jan 2017 16:10:09 +0100 Subject: Do not leak the item, and use a QScopedPointer to guarantee cleanup Change-Id: Ib4160f418686cef6d85dfd64657d25836f66778e Reviewed-by: Shawn Rutledge --- tests/auto/quick/qquickloader/tst_qquickloader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index 77af4796b6..3e7439f3e9 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -469,7 +469,7 @@ void tst_QQuickLoader::networkComponent() // because in the synchronous case we're already done loading. QTRY_COMPARE(component.status(), QQmlComponent::Ready); - QQuickItem *item = qobject_cast(component.create()); + QScopedPointer item(qobject_cast(component.create())); QVERIFY(item); QQuickLoader *loader = qobject_cast(item->children().at(1)); @@ -481,7 +481,6 @@ void tst_QQuickLoader::networkComponent() QCOMPARE(loader->status(), QQuickLoader::Ready); QCOMPARE(static_cast(loader)->children().count(), 1); - delete loader; } void tst_QQuickLoader::failNetworkRequest() -- cgit v1.2.3 From f1c37497238be8960a5408fc3b7abc65c3774061 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Wed, 18 Jan 2017 22:04:50 +0900 Subject: Fix build without features.localserver Change-Id: I25edd84fb67f417caa98e63f284547eac3a7793a Reviewed-by: Lars Knoll --- src/src.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src.pro b/src/src.pro index f585ef15ca..21925c9330 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs CONFIG += ordered include($$OUT_PWD/quick/qtquick-config.pri) -QT_FOR_CONFIG += quick-private +QT_FOR_CONFIG += network quick-private SUBDIRS += \ qml @@ -20,6 +20,6 @@ SUBDIRS += \ imports \ qmldevtools -!contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmldebug +qtConfig(localserver):!contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmldebug qmldevtools.CONFIG = host_build -- cgit v1.2.3 From 941fb369ebfa7d44e5db0f589d81159fe156cf88 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Mon, 23 Jan 2017 14:56:50 +0100 Subject: Stabilize test Obviously, if the animation still hasn't stopped, we cannot expect it to fail on the next QTRY_COMPARE, since that might wait until it then passes, thus CI will log that as an XPASS. This failed during CI run for MSVC 2015: XPASS : tst_QPauseAnimationJob::multipleSequentialGroups() QCOMPARE(((group.state())), QAbstractAnimationJob::Stopped) returned TRUE unexpectedly. tst_qpauseanimationjob.cpp(396) : failure location Change-Id: I25151123b8fc2617f2a4d3690215e6a1ed2856ff Reviewed-by: Shawn Rutledge --- .../auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp b/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp index 1791407934..ff295c5409 100644 --- a/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp +++ b/tests/auto/qml/animation/qpauseanimationjob/tst_qpauseanimationjob.cpp @@ -392,8 +392,10 @@ void tst_QPauseAnimationJob::multipleSequentialGroups() #ifdef Q_OS_WIN if (group.state() != QAbstractAnimationJob::Stopped) QEXPECT_FAIL("", winTimerError, Abort); -#endif + QCOMPARE(group.state(), QAbstractAnimationJob::Stopped); +#else QTRY_COMPARE(group.state(), QAbstractAnimationJob::Stopped); +#endif #ifdef Q_OS_WIN if (subgroup1.state() != QAbstractAnimationJob::Stopped) -- cgit v1.2.3 From f74b7b15979364d61a48e36315442c501bb9ea1a Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 23 Jan 2017 18:28:52 +0900 Subject: Fix build without qml-debug Change-Id: If4308195b05255a49a06184cab3db88ec9532f76 Reviewed-by: Lars Knoll --- src/qml/debugger/qqmlprofiler_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h index 3a507bef74..41fb2c5b7b 100644 --- a/src/qml/debugger/qqmlprofiler_p.h +++ b/src/qml/debugger/qqmlprofiler_p.h @@ -73,7 +73,7 @@ struct QQmlProfiler {}; struct QQmlBindingProfiler { - QQmlBindingProfiler(quintptr, QQmlBinding *, QV4::FunctionObject *) {} + QQmlBindingProfiler(quintptr, QV4::Function *) {} }; struct QQmlHandlingSignalProfiler -- cgit v1.2.3 From 9aed949bb99b9bf328322457a02ad1a9fb330f2d Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 23 Jan 2017 17:01:22 +0900 Subject: Fix build without features.commandlineparser Change-Id: I3a23e53fc647f5257593e0aece7198eea430cf14 Reviewed-by: Lars Knoll --- tools/qmllint/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 211427cc64..45914353a8 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -29,7 +29,9 @@ #include #include #include +#if QT_CONFIG(commandlineparser) #include +#endif #include #include @@ -72,6 +74,7 @@ int main(int argv, char *argc[]) QCoreApplication app(argv, argc); QCoreApplication::setApplicationName("qmllint"); QCoreApplication::setApplicationVersion("1.0"); +#if QT_CONFIG(commandlineparser) QCommandLineParser parser; parser.setApplicationDescription(QLatin1String("QML syntax verifier")); parser.addHelpOption(); @@ -87,8 +90,15 @@ int main(int argv, char *argc[]) } bool silent = parser.isSet(silentOption); +#else + bool silent = false; +#endif bool success = true; +#if QT_CONFIG(commandlineparser) foreach (const QString &filename, parser.positionalArguments()) { +#else + foreach (const QString &filename, app.arguments()) { +#endif success &= lint_file(filename, silent); } -- cgit v1.2.3