aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:56:42 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-04-08 13:03:25 +0200
commit68ba8fe3ccf7abe8d24ba3614f8d7ceb3778de74 (patch)
tree8fdc2922aa5375203fef05746691e88632a92bbe /src
parent0d8de448ef746aea7215f6f654660500dc9601d2 (diff)
parenta676e4e2dae945c02521691c7018f5a5534feff9 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
Diffstat (limited to 'src')
-rw-r--r--src/imports/folderlistmodel/fileinfothread.cpp1
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp1
-rw-r--r--src/imports/testlib/TestCase.qml24
-rw-r--r--src/particles/particleresources/noise.pngbin19477 -> 13313 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro2
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc5
-rw-r--r--src/qml/qml/ftw/ftw.pri1
-rw-r--r--src/qml/qml/ftw/qhashfield_p.h118
-rw-r--r--src/qml/qml/qqmlincubator.cpp2
-rw-r--r--src/qmltest/quicktestresult.cpp4
-rw-r--r--src/quick/doc/images/anchorchanges.pngbin566 -> 399 bytes
-rw-r--r--src/quick/doc/images/parentchange.pngbin509 -> 357 bytes
-rw-r--r--src/quick/doc/images/qml-borderimage-normal-image.pngbin5282 -> 1506 bytes
-rw-r--r--src/quick/doc/images/qml-borderimage-scaled.pngbin5580 -> 1552 bytes
-rw-r--r--src/quick/doc/images/qml-borderimage-tiled.pngbin5889 -> 1602 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-clip-complex.pngbin70000 -> 67842 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-startAngle.pngbin10254 -> 5099 bytes
-rw-r--r--src/quick/doc/images/qml-mousearea-snippet.pngbin780 -> 671 bytes
-rw-r--r--src/quick/doc/images/qml-photoviewer-demo-small.pngbin35633 -> 35488 bytes
-rw-r--r--src/quick/doc/images/qml-rssnews-demo-small.pngbin19489 -> 15717 bytes
-rw-r--r--src/quick/doc/images/qmldesigner-visual-editor.pngbin102238 -> 101854 bytes
-rw-r--r--src/quick/doc/qtquick.qdocconf1
-rw-r--r--src/quick/items/items.qrc2
-rw-r--r--src/quick/items/qquickanimatedsprite.cpp4
-rw-r--r--src/quick/items/qquickimage.cpp12
-rw-r--r--src/quick/items/qquickshadereffect.cpp4
-rw-r--r--src/quick/items/qquickshadereffectnode.cpp6
-rw-r--r--src/quick/items/qquickspritesequence.cpp4
-rw-r--r--src/quick/items/qquickview_p.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp8
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.cpp18
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode.cpp4
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp18
-rw-r--r--src/quick/scenegraph/scenegraph.qrc2
-rw-r--r--src/quick/scenegraph/util/qsgflatcolormaterial.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.cpp6
-rw-r--r--src/quick/scenegraph/util/qsgvertexcolormaterial.cpp4
-rw-r--r--src/quick/util/qquickanimation.cpp4
-rw-r--r--src/quick/util/qquickanimatorjob.cpp17
-rw-r--r--src/quick/util/qquickanimatorjob_p.h2
-rw-r--r--src/quick/util/qquickpixmapcache.cpp1
42 files changed, 97 insertions, 188 deletions
diff --git a/src/imports/folderlistmodel/fileinfothread.cpp b/src/imports/folderlistmodel/fileinfothread.cpp
index 7338636784..5d911eec1e 100644
--- a/src/imports/folderlistmodel/fileinfothread.cpp
+++ b/src/imports/folderlistmodel/fileinfothread.cpp
@@ -66,7 +66,6 @@ FileInfoThread::FileInfoThread(QObject *parent)
connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(dirChanged(QString)));
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateFile(QString)));
#endif // !QT_NO_FILESYSTEMWATCHER
- start(LowPriority);
}
FileInfoThread::~FileInfoThread()
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 9b0571a402..66af37c40c 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -538,6 +538,7 @@ void QQuickFolderListModel::componentComplete()
QString localPath = QQmlFile::urlToLocalFileOrQrc(d->currentDir);
if (localPath.isEmpty() || !QDir(localPath).exists())
setFolder(QUrl::fromLocalFile(QDir::currentPath()));
+ d->fileInfoThread.start(QThread::LowPriority);
}
/*!
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 0f73d97c1b..046ce507d4 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -972,6 +972,9 @@ Item {
\sa mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mousePress(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mousePress", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1003,6 +1006,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseRelease(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseRelease", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1036,6 +1042,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseWheel()
*/
function mouseDrag(item, x, y, dx, dy, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDrag", 1)
+
if (item.x === undefined || item.y === undefined)
return
if (button === undefined)
@@ -1083,6 +1092,9 @@ Item {
\sa mousePress(), mouseRelease(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseClick(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseClick", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1114,6 +1126,9 @@ Item {
\sa mouseDoubleClickSequence(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseDoubleClick(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDoubleClick", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1152,6 +1167,9 @@ Item {
\sa mouseDoubleClick(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseDoubleClickSequence(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDoubleClickSequence", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1181,6 +1199,9 @@ Item {
\sa mousePress(), mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseDrag(), mouseWheel()
*/
function mouseMove(item, x, y, delay, buttons) {
+ if (!item)
+ qtest_fail("No item given to mouseMove", 1)
+
if (delay == undefined)
delay = -1
if (buttons == undefined)
@@ -1206,6 +1227,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseDrag(), QWheelEvent::angleDelta()
*/
function mouseWheel(item, x, y, xDelta, yDelta, buttons, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseWheel", 1)
+
if (delay == undefined)
delay = -1
if (buttons == undefined)
diff --git a/src/particles/particleresources/noise.png b/src/particles/particleresources/noise.png
index 3c723e1a5a..c74ce493a6 100644
--- a/src/particles/particleresources/noise.png
+++ b/src/particles/particleresources/noise.png
Binary files differ
diff --git a/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro b/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
index b3fe1681e8..e5489574be 100644
--- a/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
+++ b/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
@@ -1,5 +1,5 @@
TARGET = qmldbg_native
-QT += qml-private core-private packetprotocol-private
+QT = qml-private core-private packetprotocol-private
HEADERS += \
$$PWD/../shared/qqmldebugpacket.h \
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 6f738752a7..26fc40ff37 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -338,9 +338,8 @@
One exception to this is that a QObject singleton type property may not be aliased (because the
singleton type name does not identify an object within the same component as any other item).
- \b{NOTE:} A QObject singleton type instance returned from a singleton type provider is owned by the QML
- engine. For this reason, the singleton type provider function should \b{not} be implemented as a
- singleton factory.
+ \b{NOTE:} A QObject singleton type instance returned from a singleton type provider is owned by
+ the QML engine unless the object has explicit QQmlEngine::CppOwnership flag set.
Usage:
\code
diff --git a/src/qml/qml/ftw/ftw.pri b/src/qml/qml/ftw/ftw.pri
index 51697b0aff..a671cfa12d 100644
--- a/src/qml/qml/ftw/ftw.pri
+++ b/src/qml/qml/ftw/ftw.pri
@@ -5,7 +5,6 @@ HEADERS += \
$$PWD/qhashedstring_p.h \
$$PWD/qqmlrefcount_p.h \
$$PWD/qfieldlist_p.h \
- $$PWD/qhashfield_p.h \
$$PWD/qqmlthread_p.h \
$$PWD/qfinitestack_p.h \
$$PWD/qrecursionwatcher_p.h \
diff --git a/src/qml/qml/ftw/qhashfield_p.h b/src/qml/qml/ftw/qhashfield_p.h
deleted file mode 100644
index 15114239eb..0000000000
--- a/src/qml/qml/ftw/qhashfield_p.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QHASHFIELD_P_H
-#define QHASHFIELD_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-
-#include <QtCore/qglobal.h>
-
-QT_BEGIN_NAMESPACE
-
-// QHashField can be used for doing coarse grained set testing, in
-// cases where you do not expect the set to contain the item. For
-// example where you would write:
-// QSet<QString> strings;
-// for (int ii = 0; ii < mystrings.count(); ++ii) {
-// if (strings.contains(mystrings.at(ii)))
-// qFatal("Duplication!");
-// strings.insert(mystrings);
-// }
-// You may write:
-// QHashField strings;
-// for (int ii = 0; ii < mystrings.count(); ++ii) {
-// if (strings.testAndSet(qHash(mystrings.at(ii)))) {
-// // The string *might* be duplicated
-// for (int jj = 0; jj < ii; ++jj) {
-// if (mystrings.at(ii) == mystrings.at(jj))
-// qFatal("Duplication!");
-// }
-// }
-// }
-// For small lists of things, where the hash is cheap to calculate
-// and you don't expect duplication this will be much faster.
-class QHashField {
-public:
- inline QHashField();
-
- inline void clear();
-
- inline bool test(quint32 hash);
- inline bool testAndSet(quint32 hash);
-private:
- quint32 m_field;
-};
-
-QHashField::QHashField()
-: m_field(0)
-{
-}
-
-void QHashField::clear()
-{
- m_field = 0;
-}
-
-bool QHashField::test(quint32 hash)
-{
- return m_field & (1 << (hash % 31));
-}
-
-bool QHashField::testAndSet(quint32 hash)
-{
- quint32 mask = 1 << (hash % 31);
- bool rv = m_field & mask;
- m_field |= mask;
- return rv;
-}
-
-QT_END_NAMESPACE
-
-#endif // QHASHFIELD_P_H
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
index a046bfd922..235aa1bf44 100644
--- a/src/qml/qml/qqmlincubator.cpp
+++ b/src/qml/qml/qqmlincubator.cpp
@@ -687,7 +687,7 @@ void QQmlIncubator::statusChanged(Status status)
Called after the \a object is first created, but before property bindings are
evaluated and, if applicable, QQmlParserStatus::componentComplete() is
called. This is equivalent to the point between QQmlComponent::beginCreate()
-and QQmlComponent::endCreate(), and can be used to assign initial values
+and QQmlComponent::completeCreate(), and can be used to assign initial values
to the object's properties.
The default implementation does nothing.
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index 7a26027e11..235b532dbb 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -111,9 +111,7 @@ public Q_SLOTS:
|| x * y >= m_image.width() * m_image.height())
return QVariant();
- const QRgb* pixel = reinterpret_cast<const QRgb*>(m_image.constScanLine(y));
- pixel += x;
- return QColor::fromRgba(*pixel);
+ return QColor::fromRgba(m_image.pixel(QPoint(x, y)));
}
bool equals(QuickTestImageObject *other) const
diff --git a/src/quick/doc/images/anchorchanges.png b/src/quick/doc/images/anchorchanges.png
index 4973e4e9aa..12d99393b6 100644
--- a/src/quick/doc/images/anchorchanges.png
+++ b/src/quick/doc/images/anchorchanges.png
Binary files differ
diff --git a/src/quick/doc/images/parentchange.png b/src/quick/doc/images/parentchange.png
index 93206fbbb2..05f78eac34 100644
--- a/src/quick/doc/images/parentchange.png
+++ b/src/quick/doc/images/parentchange.png
Binary files differ
diff --git a/src/quick/doc/images/qml-borderimage-normal-image.png b/src/quick/doc/images/qml-borderimage-normal-image.png
index ae7460a7d7..fd0dd37c82 100644
--- a/src/quick/doc/images/qml-borderimage-normal-image.png
+++ b/src/quick/doc/images/qml-borderimage-normal-image.png
Binary files differ
diff --git a/src/quick/doc/images/qml-borderimage-scaled.png b/src/quick/doc/images/qml-borderimage-scaled.png
index 8035c79f37..e42891ecc7 100644
--- a/src/quick/doc/images/qml-borderimage-scaled.png
+++ b/src/quick/doc/images/qml-borderimage-scaled.png
Binary files differ
diff --git a/src/quick/doc/images/qml-borderimage-tiled.png b/src/quick/doc/images/qml-borderimage-tiled.png
index 14883d0dd6..e27d9601c4 100644
--- a/src/quick/doc/images/qml-borderimage-tiled.png
+++ b/src/quick/doc/images/qml-borderimage-tiled.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-clip-complex.png b/src/quick/doc/images/qml-item-canvas-clip-complex.png
index cb582bad41..92730ff2e0 100644
--- a/src/quick/doc/images/qml-item-canvas-clip-complex.png
+++ b/src/quick/doc/images/qml-item-canvas-clip-complex.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-startAngle.png b/src/quick/doc/images/qml-item-canvas-startAngle.png
index f81562e5e4..bf82c3aa4b 100644
--- a/src/quick/doc/images/qml-item-canvas-startAngle.png
+++ b/src/quick/doc/images/qml-item-canvas-startAngle.png
Binary files differ
diff --git a/src/quick/doc/images/qml-mousearea-snippet.png b/src/quick/doc/images/qml-mousearea-snippet.png
index 15229446c7..d1ddd8d2f5 100644
--- a/src/quick/doc/images/qml-mousearea-snippet.png
+++ b/src/quick/doc/images/qml-mousearea-snippet.png
Binary files differ
diff --git a/src/quick/doc/images/qml-photoviewer-demo-small.png b/src/quick/doc/images/qml-photoviewer-demo-small.png
index b16fb4e53a..ada37794ae 100644
--- a/src/quick/doc/images/qml-photoviewer-demo-small.png
+++ b/src/quick/doc/images/qml-photoviewer-demo-small.png
Binary files differ
diff --git a/src/quick/doc/images/qml-rssnews-demo-small.png b/src/quick/doc/images/qml-rssnews-demo-small.png
index 451a420623..299f72adc5 100644
--- a/src/quick/doc/images/qml-rssnews-demo-small.png
+++ b/src/quick/doc/images/qml-rssnews-demo-small.png
Binary files differ
diff --git a/src/quick/doc/images/qmldesigner-visual-editor.png b/src/quick/doc/images/qmldesigner-visual-editor.png
index 9cd4b8b2dc..94f8239ed4 100644
--- a/src/quick/doc/images/qmldesigner-visual-editor.png
+++ b/src/quick/doc/images/qmldesigner-visual-editor.png
Binary files differ
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index 4f141a733a..131cd758a5 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -65,6 +65,7 @@ sourcedirs += ../../plugins
excludedirs += ../../imports/models \
../../imports/statemachine
+excludefiles += ../util/qquickpropertychanges_p.h
examples.fileextensions += "*.qm"
manifestmeta.thumbnail.names += "QtQuick/Threaded ListModel Example" \
diff --git a/src/quick/items/items.qrc b/src/quick/items/items.qrc
index 671d8acdbb..99f9b5224f 100644
--- a/src/quick/items/items.qrc
+++ b/src/quick/items/items.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/items">
+ <qresource prefix="/qt-project.org/items">
<file>shaders/sprite.frag</file>
<file>shaders/sprite.vert</file>
<file>shaders/shadereffect.vert</file>
diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp
index c32e9546a5..77c7ae106b 100644
--- a/src/quick/items/qquickanimatedsprite.cpp
+++ b/src/quick/items/qquickanimatedsprite.cpp
@@ -102,8 +102,8 @@ public:
AnimatedSpriteMaterialData()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/items/shaders/sprite.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/items/shaders/sprite.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/items/shaders/sprite.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/items/shaders/sprite.frag"));
}
void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) Q_DECL_OVERRIDE
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 8162eeb1bc..34b8f0ac49 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -697,17 +697,17 @@ QSGNode *QQuickImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
break;
case Pad:
- qreal w = qMin(qreal(d->pix.width()), width());
- qreal h = qMin(qreal(d->pix.height()), height());
- qreal x = (d->pix.width() > width()) ? -xOffset : 0;
- qreal y = (d->pix.height() > height()) ? -yOffset : 0;
+ qreal w = qMin(qreal(pixWidth), width());
+ qreal h = qMin(qreal(pixHeight), height());
+ qreal x = (pixWidth > width()) ? -xOffset : 0;
+ qreal y = (pixHeight > height()) ? -yOffset : 0;
targetRect = QRectF(x + xOffset, y + yOffset, w, h);
sourceRect = QRectF(x, y, w, h);
break;
};
- qreal nsWidth = (hWrap == QSGTexture::Repeat) ? d->pix.width() / d->devicePixelRatio : d->pix.width();
- qreal nsHeight = (vWrap == QSGTexture::Repeat) ? d->pix.height() / d->devicePixelRatio : d->pix.height();
+ qreal nsWidth = (hWrap == QSGTexture::Repeat || d->fillMode == Pad) ? d->pix.width() / d->devicePixelRatio : d->pix.width();
+ qreal nsHeight = (vWrap == QSGTexture::Repeat || d->fillMode == Pad) ? d->pix.height() / d->devicePixelRatio : d->pix.height();
QRectF nsrect(sourceRect.x() / nsWidth,
sourceRect.y() / nsHeight,
sourceRect.width() / nsWidth,
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index 0cfb85db97..41b7ea3896 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -1033,12 +1033,12 @@ QSGNode *QQuickShaderEffect::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
Key s = m_common.source;
QSGShaderSourceBuilder builder;
if (s.sourceCode[Key::FragmentShader].isEmpty()) {
- builder.appendSourceFile(QStringLiteral(":/items/shaders/shadereffect.frag"));
+ builder.appendSourceFile(QStringLiteral(":/qt-project.org/items/shaders/shadereffect.frag"));
s.sourceCode[Key::FragmentShader] = builder.source();
builder.clear();
}
if (s.sourceCode[Key::VertexShader].isEmpty()) {
- builder.appendSourceFile(QStringLiteral(":/items/shaders/shadereffect.vert"));
+ builder.appendSourceFile(QStringLiteral(":/qt-project.org/items/shaders/shadereffect.vert"));
s.sourceCode[Key::VertexShader] = builder.source();
}
s.className = metaObject()->className();
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp
index 66154fac6d..a06fe26a9c 100644
--- a/src/quick/items/qquickshadereffectnode.cpp
+++ b/src/quick/items/qquickshadereffectnode.cpp
@@ -52,7 +52,7 @@ static bool hasAtlasTexture(const QVector<QSGTextureProvider *> &textureProvider
{
for (int i = 0; i < textureProviders.size(); ++i) {
QSGTextureProvider *t = textureProviders.at(i);
- if (t->texture() && t->texture()->isAtlasTexture())
+ if (t && t->texture() && t->texture()->isAtlasTexture())
return true;
}
return false;
@@ -305,8 +305,8 @@ void QQuickCustomMaterialShader::compile()
QSGShaderSourceBuilder::initializeProgramFromFiles(
program(),
- QStringLiteral(":/items/shaders/shadereffectfallback.vert"),
- QStringLiteral(":/items/shaders/shadereffectfallback.frag"));
+ QStringLiteral(":/qt-project.org/items/shaders/shadereffectfallback.vert"),
+ QStringLiteral(":/qt-project.org/items/shaders/shadereffectfallback.frag"));
#ifndef QT_NO_DEBUG
for (int i = 0; i < attrCount; ++i) {
diff --git a/src/quick/items/qquickspritesequence.cpp b/src/quick/items/qquickspritesequence.cpp
index 029beba1ff..f32e1afd50 100644
--- a/src/quick/items/qquickspritesequence.cpp
+++ b/src/quick/items/qquickspritesequence.cpp
@@ -101,8 +101,8 @@ public:
SpriteSequenceMaterialData()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/items/shaders/sprite.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/items/shaders/sprite.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/items/shaders/sprite.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/items/shaders/sprite.frag"));
}
void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) Q_DECL_OVERRIDE
diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h
index 6306066134..1bbff0de0e 100644
--- a/src/quick/items/qquickview_p.h
+++ b/src/quick/items/qquickview_p.h
@@ -76,7 +76,7 @@ class QQmlError;
class QQuickItem;
class QQmlComponent;
-class QQuickViewPrivate : public QQuickWindowPrivate,
+class Q_QUICK_PRIVATE_EXPORT QQuickViewPrivate : public QQuickWindowPrivate,
public QQuickItemChangeListener
{
Q_DECLARE_PUBLIC(QQuickView)
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index bb5476c3e2..e657307efd 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -2104,8 +2104,8 @@ Renderer::ClipType Renderer::updateStencilClip(const QSGClipNode *clip)
if (!m_clipProgram.isLinked()) {
QSGShaderSourceBuilder::initializeProgramFromFiles(
&m_clipProgram,
- QStringLiteral(":/scenegraph/shaders/stencilclip.vert"),
- QStringLiteral(":/scenegraph/shaders/stencilclip.frag"));
+ QStringLiteral(":/qt-project.org/scenegraph/shaders/stencilclip.vert"),
+ QStringLiteral(":/qt-project.org/scenegraph/shaders/stencilclip.frag"));
m_clipProgram.bindAttributeLocation("vCoord", 0);
m_clipProgram.link();
m_clipMatrixId = m_clipProgram.uniformLocation("matrix");
@@ -3115,8 +3115,8 @@ void Renderer::visualize()
VisualizeShader *prog = new VisualizeShader();
QSGShaderSourceBuilder::initializeProgramFromFiles(
prog,
- QStringLiteral(":/scenegraph/shaders/visualization.vert"),
- QStringLiteral(":/scenegraph/shaders/visualization.frag"));
+ QStringLiteral(":/qt-project.org/scenegraph/shaders/visualization.vert"),
+ QStringLiteral(":/qt-project.org/scenegraph/shaders/visualization.frag"));
prog->bindAttributeLocation("v", 0);
prog->link();
prog->bind();
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
index 78b803df83..3da7a10456 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
@@ -116,8 +116,8 @@ QSGTextMaskShader::QSGTextMaskShader(QFontEngine::GlyphFormat glyphFormat)
, m_textureScale_id(-1)
, m_glyphFormat(glyphFormat)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/textmask.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/textmask.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/textmask.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/textmask.frag"));
}
static inline qreal fontSmoothingGamma()
@@ -176,7 +176,7 @@ public:
QSG8BitTextMaskShader(QFontEngine::GlyphFormat glyphFormat)
: QSGTextMaskShader(glyphFormat)
{
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/8bittextmask.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/8bittextmask.frag"));
}
virtual void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect);
@@ -201,7 +201,7 @@ public:
: QSGTextMaskShader(glyphFormat)
, m_useSRGB(false)
{
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/24bittextmask.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/24bittextmask.frag"));
}
virtual void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect);
@@ -279,7 +279,7 @@ public:
QSG32BitColorTextShader(QFontEngine::GlyphFormat glyphFormat)
: QSGTextMaskShader(glyphFormat)
{
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/32bitcolortext.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/32bitcolortext.frag"));
}
void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) Q_DECL_OVERRIDE;
@@ -303,8 +303,8 @@ public:
QSGStyledTextShader(QFontEngine::GlyphFormat glyphFormat)
: QSG8BitTextMaskShader(glyphFormat)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/styledtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/styledtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/styledtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/styledtext.frag"));
}
virtual void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect);
@@ -375,8 +375,8 @@ public:
QSGOutlinedTextShader(QFontEngine::GlyphFormat glyphFormat)
: QSGStyledTextShader(glyphFormat)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/outlinedtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/outlinedtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/outlinedtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/outlinedtext.frag"));
}
};
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp
index c26092e20c..bb4db150c0 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp
@@ -111,8 +111,8 @@ QSGMaterialShader *QSGSmoothTextureMaterial::createShader() const
SmoothTextureMaterialShader::SmoothTextureMaterialShader()
: QSGTextureMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/smoothtexture.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/smoothtexture.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothtexture.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothtexture.frag"));
}
void SmoothTextureMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
index 551575573e..5ef52e8722 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
@@ -124,8 +124,8 @@ private:
SmoothColorMaterialShader::SmoothColorMaterialShader()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/smoothcolor.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/smoothcolor.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothcolor.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/smoothcolor.frag"));
}
void SmoothColorMaterialShader::updateState(const RenderState &state, QSGMaterial *, QSGMaterial *oldEffect)
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
index 6a49c90cc5..ca91e5d85f 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
@@ -94,8 +94,8 @@ QSGDistanceFieldTextMaterialShader::QSGDistanceFieldTextMaterialShader()
, m_lastAlphaMin(-1)
, m_lastAlphaMax(-1)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/distancefieldtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/distancefieldtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldtext.frag"));
}
void QSGDistanceFieldTextMaterialShader::updateAlphaRange(ThresholdFunc thresholdFunc, AntialiasingSpreadFunc spreadFunc)
@@ -345,7 +345,7 @@ DistanceFieldOutlineTextMaterialShader::DistanceFieldOutlineTextMaterialShader()
, m_outlineAlphaMax0_id(-1)
, m_outlineAlphaMax1_id(-1)
{
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/distancefieldoutlinetext.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldoutlinetext.frag"));
}
void DistanceFieldOutlineTextMaterialShader::initialize()
@@ -427,8 +427,8 @@ DistanceFieldShiftedStyleTextMaterialShader::DistanceFieldShiftedStyleTextMateri
: DistanceFieldStyledTextMaterialShader()
, m_shift_id(-1)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/distancefieldshiftedtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/distancefieldshiftedtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldshiftedtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/distancefieldshiftedtext.frag"));
}
void DistanceFieldShiftedStyleTextMaterialShader::initialize()
@@ -507,8 +507,8 @@ QSGHiQSubPixelDistanceFieldTextMaterialShader::QSGHiQSubPixelDistanceFieldTextMa
, m_fontScale_id(-1)
, m_vecDelta_id(-1)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/hiqsubpixeldistancefieldtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/hiqsubpixeldistancefieldtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/hiqsubpixeldistancefieldtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/hiqsubpixeldistancefieldtext.frag"));
}
void QSGHiQSubPixelDistanceFieldTextMaterialShader::initialize()
@@ -574,8 +574,8 @@ public:
QSGLoQSubPixelDistanceFieldTextMaterialShader::QSGLoQSubPixelDistanceFieldTextMaterialShader()
: QSGHiQSubPixelDistanceFieldTextMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/loqsubpixeldistancefieldtext.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/loqsubpixeldistancefieldtext.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/loqsubpixeldistancefieldtext.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/loqsubpixeldistancefieldtext.frag"));
}
QSGMaterialType *QSGLoQSubPixelDistanceFieldTextMaterial::type() const
diff --git a/src/quick/scenegraph/scenegraph.qrc b/src/quick/scenegraph/scenegraph.qrc
index 5db242e46b..ef6da71334 100644
--- a/src/quick/scenegraph/scenegraph.qrc
+++ b/src/quick/scenegraph/scenegraph.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/scenegraph">
+ <qresource prefix="/qt-project.org/scenegraph">
<file>shaders/flatcolor.frag</file>
<file>shaders/flatcolor.vert</file>
<file>shaders/8bittextmask.frag</file>
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
index 005c7a043d..836b5759a2 100644
--- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
@@ -66,8 +66,8 @@ QSGMaterialType FlatColorMaterialShader::type;
FlatColorMaterialShader::FlatColorMaterialShader()
: QSGMaterialShader(*new QSGMaterialShaderPrivate)
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/flatcolor.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/flatcolor.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.frag"));
}
void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp
index 4eb38842dc..66e87a77a8 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.cpp
+++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp
@@ -56,8 +56,8 @@ QSGMaterialType QSGOpaqueTextureMaterialShader::type;
QSGOpaqueTextureMaterialShader::QSGOpaqueTextureMaterialShader()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/opaquetexture.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/opaquetexture.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/opaquetexture.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/opaquetexture.frag"));
}
char const *const *QSGOpaqueTextureMaterialShader::attributeNames() const
@@ -362,7 +362,7 @@ QSGMaterialShader *QSGTextureMaterial::createShader() const
QSGTextureMaterialShader::QSGTextureMaterialShader()
: QSGOpaqueTextureMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/texture.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/texture.frag"));
}
void QSGTextureMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
index 91d7ece90d..8e86b3906f 100644
--- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
@@ -65,8 +65,8 @@ QSGMaterialType QSGVertexColorMaterialShader::type;
QSGVertexColorMaterialShader::QSGVertexColorMaterialShader()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/scenegraph/shaders/vertexcolor.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/vertexcolor.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/vertexcolor.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/vertexcolor.frag"));
}
void QSGVertexColorMaterialShader::updateState(const RenderState &state, QSGMaterial * /*newEffect*/, QSGMaterial *)
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp
index 51212661c9..adf8f600a0 100644
--- a/src/quick/util/qquickanimation.cpp
+++ b/src/quick/util/qquickanimation.cpp
@@ -1441,7 +1441,7 @@ QQuickVector3dAnimation::~QQuickVector3dAnimation()
}
/*!
- \qmlproperty real QtQuick::Vector3dAnimation::from
+ \qmlproperty vector3d QtQuick::Vector3dAnimation::from
This property holds the starting value for the animation.
If the Vector3dAnimation is defined within a \l Transition or \l Behavior,
@@ -1463,7 +1463,7 @@ void QQuickVector3dAnimation::setFrom(QVector3D f)
}
/*!
- \qmlproperty real QtQuick::Vector3dAnimation::to
+ \qmlproperty vector3d QtQuick::Vector3dAnimation::to
This property holds the end value for the animation.
If the Vector3dAnimation is defined within a \l Transition or \l Behavior,
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp
index d7be237a39..8d5ecadab5 100644
--- a/src/quick/util/qquickanimatorjob.cpp
+++ b/src/quick/util/qquickanimatorjob.cpp
@@ -238,6 +238,10 @@ void QQuickAnimatorJob::debugAnimation(QDebug d) const
<< "target:" << m_target << "value:" << m_value;
}
+qreal QQuickAnimatorJob::progress(int time) const
+{
+ return m_easing.valueForProgress((m_duration == 0) ? qreal(1) : qreal(time) / qreal(m_duration));
+}
qreal QQuickAnimatorJob::value() const
{
qreal v;
@@ -388,7 +392,7 @@ void QQuickXAnimatorJob::updateCurrentTime(int time)
return;
Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
- m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
+ m_value = m_from + (m_to - m_from) * progress(time);
m_helper->dx = m_value;
m_helper->wasChanged = true;
}
@@ -405,7 +409,7 @@ void QQuickYAnimatorJob::updateCurrentTime(int time)
return;
Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
- m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
+ m_value = m_from + (m_to - m_from) * progress(time);
m_helper->dy = m_value;
m_helper->wasChanged = true;
}
@@ -475,7 +479,7 @@ void QQuickOpacityAnimatorJob::updateCurrentTime(int time)
return;
Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
- m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
+ m_value = m_from + (m_to - m_from) * progress(time);
m_opacityNode->setOpacity(m_value);
}
@@ -491,7 +495,7 @@ void QQuickScaleAnimatorJob::updateCurrentTime(int time)
return;
Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
- m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
+ m_value = m_from + (m_to - m_from) * progress(time);
m_helper->scale = m_value;
m_helper->wasChanged = true;
}
@@ -511,7 +515,8 @@ void QQuickRotationAnimatorJob::updateCurrentTime(int time)
return;
Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
- float t = m_easing.valueForProgress(time / (qreal) m_duration);
+ float t = progress(time);
+
switch (m_direction) {
case QQuickRotationAnimator::Clockwise:
m_value = _q_interpolateClockwiseRotation(m_from, m_to, t).toFloat();
@@ -594,7 +599,7 @@ void QQuickUniformAnimatorJob::updateCurrentTime(int time)
if (!m_node || m_uniformIndex == -1 || m_uniformType == -1)
return;
- m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
+ m_value = m_from + (m_to - m_from) * progress(time);
QQuickShaderEffectMaterial *material =
static_cast<QQuickShaderEffectMaterial *>(m_node->material());
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index 71c1e93746..2b910d3737 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -158,6 +158,8 @@ protected:
QQuickAnimatorJob();
void debugAnimation(QDebug d) const Q_DECL_OVERRIDE;
+ qreal progress(int time) const;
+
QPointer<QQuickItem> m_target;
QQuickAnimatorController *m_controller;
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 7d9997b9c8..6dee84b005 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -515,7 +515,6 @@ void QQuickPixmapReader::asyncResponseFinished(QQuickImageResponse *response)
QQuickTextureFactory *t = 0;
QQuickPixmapReply::ReadError error = QQuickPixmapReply::NoError;
QString errorString;
- QSize readSize;
if (!response->errorString().isEmpty()) {
error = QQuickPixmapReply::Loading;
errorString = response->errorString();