diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-07 10:56:42 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-08 13:03:25 +0200 |
commit | 68ba8fe3ccf7abe8d24ba3614f8d7ceb3778de74 (patch) | |
tree | 8fdc2922aa5375203fef05746691e88632a92bbe /src/quick/items | |
parent | 0d8de448ef746aea7215f6f654660500dc9601d2 (diff) | |
parent | a676e4e2dae945c02521691c7018f5a5534feff9 (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/quick/items')
-rw-r--r-- | src/quick/items/items.qrc | 2 | ||||
-rw-r--r-- | src/quick/items/qquickanimatedsprite.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickimage.cpp | 12 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffect.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectnode.cpp | 6 | ||||
-rw-r--r-- | src/quick/items/qquickspritesequence.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickview_p.h | 2 |
7 files changed, 17 insertions, 17 deletions
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) |