aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-18 13:07:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-09-21 11:16:28 +0200
commit02b4770c3d867bf0b562db63015a7137479db10a (patch)
tree57157d0101a295fd394bf9acc91dd216fb361264
parent858c62583ff776edb8c9e539f0331f5d658de2d1 (diff)
parent345226aa3ecee8642c3bf46e40c981d4a49d958e (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
-rw-r--r--dist/changes-5.6.280
-rw-r--r--src/imports/layouts/qquicklayout.cpp4
-rw-r--r--src/imports/localstorage/plugin.cpp18
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc3
-rw-r--r--src/qml/jsruntime/qv4value_p.h13
-rw-r--r--src/qml/qml.pro6
-rw-r--r--src/qml/qml/qqmltypeloader.cpp7
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp20
-rw-r--r--src/quick/doc/snippets/qml/localstorage/dbtransaction.js68
-rw-r--r--src/quick/doc/src/concepts/input/focus.qdoc2
-rw-r--r--src/quick/items/qquickdrag.cpp2
-rw-r--r--src/quick/items/qquicktextinput.cpp7
-rw-r--r--src/quick/items/qquicktextnode.cpp8
-rw-r--r--src/quick/items/qquickwindow.cpp9
-rw-r--r--src/quick/scenegraph/util/qsgdefaultpainternode.cpp4
-rw-r--r--tests/auto/qml/qqmltypeloader/data/MyComponent.qml11
-rw-r--r--tests/auto/qml/qqmltypeloader/data/MyComponent2.qml7
-rw-r--r--tests/auto/qml/qqmltypeloader/data/MyComponent3.qml9
-rw-r--r--tests/auto/qml/qqmltypeloader/data/trim_cache2.qml13
-rw-r--r--tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp14
-rw-r--r--tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml55
-rw-r--r--tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml53
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml12
-rw-r--r--tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp7
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp4
25 files changed, 409 insertions, 27 deletions
diff --git a/dist/changes-5.6.2 b/dist/changes-5.6.2
new file mode 100644
index 0000000000..57bae85ae4
--- /dev/null
+++ b/dist/changes-5.6.2
@@ -0,0 +1,80 @@
+Qt 5.6.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+QtQml
+-----
+
+ - [QTBUG-53412] Fix mapping of null JS values to null SQL values instead
+ of empty strings.
+ - [QTBUG-53794] Fix crash when using the "with" statement with an
+ expression that throws an exception.
+ - [QTBUG-54589] Fix assertion when deleting properties of JS objects
+ - Fix crash when incubating objects asynchronously with initial properties.
+ - Fix support for QJSValue parameters in QML signal handlers.
+ - Fix crash on 64-bit big endian architectures.
+ - Fix literal string assignments to QVector2D and QQuaternion properties.
+ - Fix crashes when using Component.onDestruction handlers.
+ - [QTBUG-49232] Fix assignment of values to quint8 properties.
+ - [QTBUG-48136] Fix QQmlPropertyMap emitting valueChanged when the value had
+ not actually changed, causing side effects such as causing fake binding loops.
+ - [QTBUG-55238] Work around miscompilations with Visual Studio 2015 Update 3
+ - [QTBUG-55482] Work around a crash in release mode with GCC 6 related to dead
+ store elimination
+
+QtQuick
+-------
+
+ - Fix QtQuick scenegraph waiting up to a full vsync duration before rendering
+ the first frame.
+ - ShaderEffect: Fix a crash when a ShaderEffect and an Image both share the
+ same texture via supportsAtlasTextures.
+ - [QTBUG-53726] Flickable: Fix widthRatio and heightRatio being incorrect when
+ the content is smaller than the view.
+ - [QTBUG-42928] MultiPointTouchArea: Fix touch points remaining pressed when
+ the MultiPointTouchArea is hidden or disabled.
+ - [QTBUG-53937] AnimatedSprite: Fix a potential infinite loop when changing
+ image source.
+ - [QTBUG-53263] ListView: Fix items not always rendering when inserting many
+ items into a model.
+ - [QTBUG-52901] Fixed QQuickPaintedItem not scaling correctly for high DPI when
+ using a renderTarget of FramebufferObject
+ - [QTBUG-52534] MouseArea: Fix drag.threshold when preventStealing is in use.
+ - QQuickWidget now properly repaints text on high-DPI screen changes.
+ - [QTBUG-54238] qt.scenegraph.info logging category got renamed to
+ qt.scenegraph.general.
+
+ - QQuickItem:
+ * [QTBUG-31861] Fixed issue with mouse button events being sent even
+ when they were disabled by setAcceptedMouseButtons.
+ * [QTBUG-40145] Fix multiple items gaining activeFocus incorrectly.
+
+ - Text:
+ * [QTBUG-54075] Fix positioning of inline images when using StyledText.
+ * [QTBUG-52389] Fixed clipping of glyphs that extend beyond font's em
+ square.
+ * Fix mouse presses being eaten when textFormat was PlainText. In this
+ case, the item cannot possibly make use of a press (as there are no
+ hyperlinks), but deprives other items of the opportunity to take the press.
+
+ - PathView:
+ * [QTBUG-53464] PathView: Fix items not being correctly created in some
+ circumstances.
+ * [QTBUG-37815] PathView: Fix infinite loop when creating items in some
+ circumstances.
+
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
index 98e2aea44f..07ada75a5f 100644
--- a/src/imports/layouts/qquicklayout.cpp
+++ b/src/imports/layouts/qquicklayout.cpp
@@ -698,6 +698,10 @@ QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent)
QQuickLayout::~QQuickLayout()
{
d_func()->m_isReady = false;
+
+ const auto childItems = d_func()->childItems;
+ for (QQuickItem *child : childItems)
+ QQuickItemPrivate::get(child)->removeItemChangeListener(this, QQuickItemPrivate::SiblingOrder);
}
QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object)
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 7d96f11768..f76bca2747 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -585,9 +585,9 @@ import QtQuick.LocalStorage 2.0 as Sql
db = Sql.openDatabaseSync(identifier, version, description, estimated_size, callback(db))
\endcode
The above code returns the database identified by \e identifier. If the database does not already exist, it
-is created, and the function \e callback is called with the database as a parameter. \e description
-and \e estimated_size are written to the INI file (described below), but are otherwise currently
-unused.
+is created, and the function \e callback is called with the database as a parameter. \e identifier is the
+name of the physical file (with or without full path) containing the database. \e description and
+\e estimated_size are written to the INI file (described below), but are currently unused.
May throw exception with code property SQLException.DATABASE_ERR, or SQLException.VERSION_ERR.
@@ -595,7 +595,7 @@ When a database is first created, an INI file is also created specifying its cha
\table
\header \li \b {Key} \li \b {Value}
-\row \li Name \li The name of the database passed to \c openDatabase()
+\row \li Identifier \li The name of the database passed to \c openDatabase()
\row \li Version \li The version of the database passed to \c openDatabase()
\row \li Description \li The description of the database passed to \c openDatabase()
\row \li EstimatedSize \li The estimated size (in bytes) of the database passed to \c openDatabase()
@@ -615,12 +615,19 @@ you can call \e executeSql on \e tx to upgrade the database.
May throw exception with code property SQLException.DATABASE_ERR or SQLException.UNKNOWN_ERR.
+See example below.
+
+\snippet qml/localstorage/dbtransaction.js 2
+
\section3 db.transaction(callback(tx))
This method creates a read/write transaction and passed to \e callback. In this function,
you can call \e executeSql on \e tx to read and modify the database.
If the callback throws exceptions, the transaction is rolled back.
+Below you will find an example of a database transaction which catches exceptions.
+
+\snippet qml/localstorage/dbtransaction.js 0
\section3 db.readTransaction(callback(tx))
@@ -643,6 +650,9 @@ It returns a results object, with the following properties:
May throw exception with code property SQLException.DATABASE_ERR, SQLException.SYNTAX_ERR, or SQLException.UNKNOWN_ERR.
+See below for an example:
+
+\snippet qml/localstorage/dbtransaction.js 1
\section1 Method Documentation
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index de0515e5d0..3692605c18 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -855,7 +855,8 @@ are otherwise unavailable to the object. In particular, they allow objects to
access properties or signals that are specifically relevant to the individual
object.
-A QML type implementation may choose to create an \e {attaching type} with
+A QML type implementation may choose to \l {Providing Attached Objects for
+Data Annotations}{create an \e {attaching type} in C++} with
particular properties and signals. Instances of this type can then be created
and \e attached to specific objects at run time, allowing those objects to
access the properties and signals of the attaching type. These are accessed by
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index dae4d11767..d02d08f3e6 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -102,19 +102,16 @@ public:
Q_ALWAYS_INLINE quint64 rawValue() const { return _val; }
Q_ALWAYS_INLINE void setRawValue(quint64 raw) { _val = raw; }
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN || defined(QV4_USE_64_BIT_VALUE_ENCODING)
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
static inline int valueOffset() { return 0; }
static inline int tagOffset() { return 4; }
- Q_ALWAYS_INLINE void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
- Q_ALWAYS_INLINE quint32 value() const { return _val & quint64(~quint32(0)); }
- Q_ALWAYS_INLINE quint32 tag() const { return _val >> 32; }
-#else // !Q_LITTLE_ENDIAN && !defined(QV4_USE_64_BIT_VALUE_ENCODING)
+#else // !Q_LITTLE_ENDIAN
static inline int valueOffset() { return 4; }
static inline int tagOffset() { return 0; }
- Q_ALWAYS_INLINE void setTagValue(quint32 tag, quint32 value) { _val = quint64(value) << 32 | tag; }
- Q_ALWAYS_INLINE quint32 tag() const { return _val & quint64(~quint32(0)); }
- Q_ALWAYS_INLINE quint32 value() const { return _val >> 32; }
#endif
+ Q_ALWAYS_INLINE void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
+ Q_ALWAYS_INLINE quint32 value() const { return _val & quint64(~quint32(0)); }
+ Q_ALWAYS_INLINE quint32 tag() const { return _val >> 32; }
#if defined(V4_BOOTSTRAP)
Q_ALWAYS_INLINE Heap::Base *m() const { Q_UNREACHABLE(); return Q_NULLPTR; }
diff --git a/src/qml/qml.pro b/src/qml/qml.pro
index cc5023f12a..13e00d8812 100644
--- a/src/qml/qml.pro
+++ b/src/qml/qml.pro
@@ -24,9 +24,13 @@ exists("qqml_enable_gcov") {
gcc:!intel_icc:greaterThan(QT_GCC_MAJOR_VERSION, 5) {
# Our code is bad. Temporary workaround.
- QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks
+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}
+# QTBUG-55238, disable new optimizer for MSVC 2015/Update 3.
+release:win32-msvc*:equals(QT_CL_MAJOR_VERSION, 19):equals(QT_CL_MINOR_VERSION, 00): \
+ greaterThan(QT_CL_PATCH_VERSION, 24212):QMAKE_CXXFLAGS += -d2SSAOptimizer-
+
QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf
# 2415: variable "xx" of static storage duration was declared but never referenced
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 566f5ef767..20bd5d2620 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1965,10 +1965,13 @@ void QQmlTypeLoader::trimCache()
QList<TypeCache::Iterator> unneededTypes;
for (TypeCache::Iterator iter = m_typeCache.begin(), end = m_typeCache.end(); iter != end; ++iter) {
QQmlTypeData *typeData = iter.value();
+
+ const bool hasError = !typeData->m_compiledData && !typeData->m_errors.isEmpty();
+ const bool isNotReferenced = typeData->isComplete() && typeData->m_compiledData
+ && typeData->m_compiledData->count() == 1;
// typeData->m_compiledData may be set early on in the proccess of loading a file, so it's important
// to check the general loading status of the typeData before making any other decisions.
- if (typeData->isComplete() && typeData->m_compiledData && typeData->count() == 1
- && typeData->m_compiledData->count() == 1) {
+ if (typeData->count() == 1 && (hasError || isNotReferenced)) {
// There are no live objects of this type
unneededTypes.append(iter);
}
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index d6d4553946..1ca51ea360 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -1313,9 +1313,23 @@ void QQmlDelegateModelPrivate::itemsRemoved(
}
} else {
if (QQDMIncubationTask *incubationTask = cacheItem->incubationTask) {
- for (int i = 1; i < m_groupCount; ++i) {
- if (remove.inGroup(i))
- incubationTask->index[i] = remove.index[i];
+ if (!cacheItem->isObjectReferenced()) {
+ releaseIncubator(cacheItem->incubationTask);
+ cacheItem->incubationTask = 0;
+ if (cacheItem->object) {
+ QObject *object = cacheItem->object;
+ cacheItem->destroyObject();
+ if (QQuickPackage *package = qmlobject_cast<QQuickPackage *>(object))
+ emitDestroyingPackage(package);
+ else
+ emitDestroyingItem(object);
+ }
+ cacheItem->scriptRef -= 1;
+ } else {
+ for (int i = 1; i < m_groupCount; ++i) {
+ if (remove.inGroup(i))
+ incubationTask->index[i] = remove.index[i];
+ }
}
}
if (QQmlDelegateModelAttached *attached = cacheItem->attached) {
diff --git a/src/quick/doc/snippets/qml/localstorage/dbtransaction.js b/src/quick/doc/snippets/qml/localstorage/dbtransaction.js
new file mode 100644
index 0000000000..07d8a5618b
--- /dev/null
+++ b/src/quick/doc/snippets/qml/localstorage/dbtransaction.js
@@ -0,0 +1,68 @@
+ /****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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$
+**
+****************************************************************************/
+
+//![0]
+db.transaction(
+ try {
+ function(tx) {
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ }
+ } catch (err) {
+ console.log("Error inserting into table Greeting");
+ }
+)
+//![0]
+
+//![1]
+db.transaction(
+ function(tx) {
+ var results = tx.executeSql('SELECT salutation FROM Greeting WHERE salutee=?;', 'world');
+ }
+ console.log("We greeted in this most respectful way: " + results.rows.item(0).value);
+)
+//![1]
+//![2]
+var db = LocalStorage.openDatabaseSync("QQmlExampleDB", "", "The Example QML SQL!", 1000000);
+if (db.version == '0.1') {
+ db.changeVersion('0.1', '0.2', function(tx) {
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ }
+});
+//![2]
diff --git a/src/quick/doc/src/concepts/input/focus.qdoc b/src/quick/doc/src/concepts/input/focus.qdoc
index db84961d20..ec4e4ca2d9 100644
--- a/src/quick/doc/src/concepts/input/focus.qdoc
+++ b/src/quick/doc/src/concepts/input/focus.qdoc
@@ -117,7 +117,7 @@ the focus, but it cannot control the focus when it is imported or reused.
Likewise, the \c window component does not have the ability to know if its
imported components are requesting the focus.
-To solve this problem, the QML introduces a concept known as a \e {focus scope}.
+To solve this problem, QML introduces a concept known as a \e {focus scope}.
For existing Qt users, a focus scope is like an automatic focus proxy.
A focus scope is created by declaring the \l FocusScope type.
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index 8a0af6c263..b943c28661 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -761,7 +761,7 @@ Qt::DropAction QQuickDragAttachedPrivate::startDrag(Qt::DropActions supportedAct
{
Q_Q(QQuickDragAttached);
- QDrag *drag = new QDrag(q);
+ QDrag *drag = new QDrag(source ? source : q);
QMimeData *mimeData = new QMimeData();
for (auto it = externalMimeData.cbegin(), end = externalMimeData.cend(); it != end; ++it)
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index fd158207c6..6543a64624 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -4356,8 +4356,13 @@ void QQuickTextInputPrivate::processKeyEvent(QKeyEvent* event)
if (!(q->inputMethodHints() & Qt::ImhMultiLine))
inputMethod->hide();
+ if (activeFocus) {
+ // If we lost focus after hiding the virtual keyboard, we've already emitted
+ // editingFinished from handleFocusEvent. Otherwise we emit it now.
+ emit q->editingFinished();
+ }
+
emit q->accepted();
- emit q->editingFinished();
}
event->ignore();
return;
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp
index 0e9d1e3951..8716f98bff 100644
--- a/src/quick/items/qquicktextnode.cpp
+++ b/src/quick/items/qquicktextnode.cpp
@@ -160,10 +160,18 @@ void QQuickTextNode::addImage(const QRectF &rect, const QImage &image)
QSGRenderContext *sg = QQuickItemPrivate::get(m_ownerElement)->sceneGraphRenderContext();
QSGInternalImageNode *node = sg->sceneGraphContext()->createInternalImageNode();
QSGTexture *texture = sg->createTexture(image);
+ if (m_ownerElement->smooth()) {
+ texture->setFiltering(QSGTexture::Linear);
+ texture->setMipmapFiltering(QSGTexture::Linear);
+ }
m_textures.append(texture);
node->setTargetRect(rect);
node->setInnerTargetRect(rect);
node->setTexture(texture);
+ if (m_ownerElement->smooth()) {
+ node->setFiltering(QSGTexture::Linear);
+ node->setMipmapFiltering(QSGTexture::Linear);
+ }
appendChildNode(node);
node->update();
}
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index c72565b2f4..0bf5941d55 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1509,6 +1509,15 @@ bool QQuickWindow::event(QEvent *e)
// return in order to avoid the QWindow::event below
return d->deliverTouchCancelEvent(static_cast<QTouchEvent*>(e));
break;
+ case QEvent::Enter: {
+ QEnterEvent *enter = static_cast<QEnterEvent*>(e);
+ bool accepted = enter->isAccepted();
+ bool delivered = d->deliverHoverEvent(d->contentItem, enter->windowPos(), d->lastMousePosition,
+ QGuiApplication::keyboardModifiers(), 0L, accepted);
+ enter->setAccepted(accepted);
+ return delivered;
+ }
+ break;
case QEvent::Leave:
d->clearHover();
d->lastMousePosition = QPointF();
diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp
index 561eccdb0c..e1aea290a3 100644
--- a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp
+++ b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp
@@ -225,7 +225,7 @@ void QSGDefaultPainterNode::updateGeometry()
if (m_actualRenderTarget == QQuickPaintedItem::Image)
source = QRectF(0, 0, 1, 1);
else
- source = QRectF(0, 0, qreal(m_size.width()) / m_fboSize.width(), qreal(m_size.height()) / m_fboSize.height());
+ source = QRectF(0, 0, qreal(m_textureSize.width()) / m_fboSize.width(), qreal(m_textureSize.height()) / m_fboSize.height());
QRectF dest(0, 0, m_size.width(), m_size.height());
if (m_actualRenderTarget == QQuickPaintedItem::InvertedYFramebufferObject)
dest = QRectF(QPointF(0, m_size.height()), QPointF(m_size.width(), 0));
@@ -307,7 +307,7 @@ void QSGDefaultPainterNode::updateRenderTarget()
QSGPainterTexture *texture = new QSGPainterTexture;
if (m_actualRenderTarget == QQuickPaintedItem::Image) {
texture->setOwnsTexture(true);
- texture->setTextureSize(m_size);
+ texture->setTextureSize(m_textureSize);
} else {
texture->setTextureId(m_fbo->texture());
texture->setOwnsTexture(false);
diff --git a/tests/auto/qml/qqmltypeloader/data/MyComponent.qml b/tests/auto/qml/qqmltypeloader/data/MyComponent.qml
new file mode 100644
index 0000000000..a642518199
--- /dev/null
+++ b/tests/auto/qml/qqmltypeloader/data/MyComponent.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 100
+ height: 62
+
+ MyComponent3 {}
+
+ MyComponent2 {}
+}
+
diff --git a/tests/auto/qml/qqmltypeloader/data/MyComponent2.qml b/tests/auto/qml/qqmltypeloader/data/MyComponent2.qml
new file mode 100644
index 0000000000..02cf5cb5dd
--- /dev/null
+++ b/tests/auto/qml/qqmltypeloader/data/MyComponent2.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 100
+ height: 62
+}
+
diff --git a/tests/auto/qml/qqmltypeloader/data/MyComponent3.qml b/tests/auto/qml/qqmltypeloader/data/MyComponent3.qml
new file mode 100644
index 0000000000..ad5d569197
--- /dev/null
+++ b/tests/auto/qml/qqmltypeloader/data/MyComponent3.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 100
+ height: 62
+
+ MyComponent4 {}
+}
+
diff --git a/tests/auto/qml/qqmltypeloader/data/trim_cache2.qml b/tests/auto/qml/qqmltypeloader/data/trim_cache2.qml
new file mode 100644
index 0000000000..326a720a87
--- /dev/null
+++ b/tests/auto/qml/qqmltypeloader/data/trim_cache2.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+Item {
+ width: 400
+ height: 400
+
+ Component.onCompleted: {
+ var component = Qt.createComponent("MyComponent.qml")
+ if (component.status == Component.Error)
+ console.log(component.errorString())
+ }
+}
+
diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
index 74f3929783..3d3a7ff725 100644
--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
@@ -42,6 +42,7 @@ private slots:
void testLoadComplete();
void loadComponentSynchronously();
void trimCache();
+ void trimCache2();
};
void tst_QQMLTypeLoader::testLoadComplete()
@@ -106,6 +107,19 @@ void tst_QQMLTypeLoader::trimCache()
}
}
+void tst_QQMLTypeLoader::trimCache2()
+{
+ QQuickView *window = new QQuickView();
+ window->setSource(testFileUrl("trim_cache2.qml"));
+ QQmlTypeLoader &loader = QQmlEnginePrivate::get(window->engine())->typeLoader;
+ // in theory if gc has already run this could be false
+ // QCOMPARE(loader.isTypeLoaded(testFileUrl("MyComponent2.qml")), true);
+ window->engine()->collectGarbage();
+ QTest::qWait(1); // force event loop
+ window->engine()->trimComponentCache();
+ QCOMPARE(loader.isTypeLoaded(testFileUrl("MyComponent2.qml")), false);
+}
+
QTEST_MAIN(tst_QQMLTypeLoader)
#include "tst_qqmltypeloader.moc"
diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
new file mode 100644
index 0000000000..22205c18f0
--- /dev/null
+++ b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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.7
+import QtQuick.Layouts 1.3
+
+Item {
+ objectName: "qtbug51927-window"
+ visible: true
+
+ default property alias _contents: customContent.data
+
+ RowLayout {
+ id: customContent
+ objectName: "qtbug51927-columnLayout"
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
new file mode 100644
index 0000000000..ff7ce6221b
--- /dev/null
+++ b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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.6
+import QtQuick.Window 2.2
+
+Container {
+ visible: true
+
+ Text {
+ objectName: "qtbug51927-text"
+ text: qsTr("Hello World")
+ anchors.centerIn: parent
+ renderType: Text.QtRendering
+ }
+}
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
index 33b8fd0e4e..2d4e227a9e 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
@@ -926,5 +926,17 @@ Item {
waitForRendering(layout)
layout.destroy()
}
+
+
+ function test_defaultPropertyAliasCrash() {
+ var containerUserComponent = Qt.createComponent("rowlayout/ContainerUser.qml");
+ compare(containerUserComponent.status, Component.Ready);
+
+ var containerUser = containerUserComponent.createObject(testCase);
+ verify(containerUser);
+
+ // Shouldn't crash.
+ containerUser.destroy();
+ }
}
}
diff --git a/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
index 17c09805aa..cabfb97914 100644
--- a/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
+++ b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
@@ -4094,9 +4094,10 @@ void tst_qquickvisualdatamodel::asynchronousRemove()
controller.incubateFor(50);
} while (timer.elapsed() < 1000 && controller.incubatingObjectCount() > 0);
- QVERIFY(requester.itemInitialized);
- QCOMPARE(requester.itemCreated, requester.itemInitialized);
- QCOMPARE(requester.itemDestroyed, requester.itemInitialized);
+ // The item was removed before incubation started. We should not have any item created.
+ QVERIFY(!requester.itemInitialized);
+ QVERIFY(!requester.itemCreated);
+ QVERIFY(!requester.itemDestroyed);
} else {
item = qobject_cast<QQuickItem*>(visualModel->object(completeIndex, false));
QVERIFY(item);
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index baa4bcb21c..1594da46bd 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -1336,8 +1336,12 @@ void tst_TouchMouse::hoverEnabled()
// device->setType(QTouchDevice::TouchScreen);
// QWindowSystemInterface::registerTouchDevice(device);
+ // Ensure the cursor is away from the window
+ QCursor::setPos(0, 0);
+
QQuickView *window = createView();
window->setSource(testFileUrl("hoverMouseAreas.qml"));
+ window->setPosition(10, 10);
window->show();
window->requestActivate();