diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-12 18:15:52 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-13 09:19:18 +0200 |
commit | 6e6079031cf44149be4ca1f05547b4c03e505290 (patch) | |
tree | d16fb11a3cdb50f367fea645359538523ab83620 /src/quick | |
parent | 38d2d6ede6722b0fb86ee6723bbfbb2b063c4d6b (diff) | |
parent | 8ca22ca7eb5216513410651411fd2e0f07e50f34 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: If33197b616de3476811f0161d4ecd8e7d004756c
Diffstat (limited to 'src/quick')
38 files changed, 114 insertions, 114 deletions
diff --git a/src/quick/designer/qqmldesignermetaobject.cpp b/src/quick/designer/qqmldesignermetaobject.cpp index f238740504..46808f978b 100644 --- a/src/quick/designer/qqmldesignermetaobject.cpp +++ b/src/quick/designer/qqmldesignermetaobject.cpp @@ -41,7 +41,7 @@ #include <QSharedPointer> #include <QMetaProperty> -#include <qnumeric.h> +#include <QtCore/private/qnumeric_p.h> #include <QDebug> #include <private/qqmlengine_p.h> @@ -271,19 +271,19 @@ int QQmlDesignerMetaObject::metaCall(QObject *o, QMetaObject::Call call, int id, if (call == QMetaObject::WriteProperty && propertyById.userType() == QMetaType::QVariant && reinterpret_cast<QVariant *>(a[0])->type() == QVariant::Double - && qIsNaN(reinterpret_cast<QVariant *>(a[0])->toDouble())) { + && qt_is_nan(reinterpret_cast<QVariant *>(a[0])->toDouble())) { return -1; } if (call == QMetaObject::WriteProperty && propertyById.userType() == QMetaType::Double - && qIsNaN(*reinterpret_cast<double*>(a[0]))) { + && qt_is_nan(*reinterpret_cast<double*>(a[0]))) { return -1; } if (call == QMetaObject::WriteProperty && propertyById.userType() == QMetaType::Float - && qIsNaN(*reinterpret_cast<float*>(a[0]))) { + && qt_is_nan(*reinterpret_cast<float*>(a[0]))) { return -1; } diff --git a/src/quick/doc/images/anchorchanges.png b/src/quick/doc/images/anchorchanges.png Binary files differindex 4973e4e9aa..12d99393b6 100644 --- a/src/quick/doc/images/anchorchanges.png +++ b/src/quick/doc/images/anchorchanges.png diff --git a/src/quick/doc/images/parentchange.png b/src/quick/doc/images/parentchange.png Binary files differindex 93206fbbb2..05f78eac34 100644 --- a/src/quick/doc/images/parentchange.png +++ b/src/quick/doc/images/parentchange.png diff --git a/src/quick/doc/images/qml-borderimage-normal-image.png b/src/quick/doc/images/qml-borderimage-normal-image.png Binary files differindex ae7460a7d7..fd0dd37c82 100644 --- a/src/quick/doc/images/qml-borderimage-normal-image.png +++ b/src/quick/doc/images/qml-borderimage-normal-image.png diff --git a/src/quick/doc/images/qml-borderimage-scaled.png b/src/quick/doc/images/qml-borderimage-scaled.png Binary files differindex 8035c79f37..e42891ecc7 100644 --- a/src/quick/doc/images/qml-borderimage-scaled.png +++ b/src/quick/doc/images/qml-borderimage-scaled.png diff --git a/src/quick/doc/images/qml-borderimage-tiled.png b/src/quick/doc/images/qml-borderimage-tiled.png Binary files differindex 14883d0dd6..e27d9601c4 100644 --- a/src/quick/doc/images/qml-borderimage-tiled.png +++ b/src/quick/doc/images/qml-borderimage-tiled.png diff --git a/src/quick/doc/images/qml-item-canvas-clip-complex.png b/src/quick/doc/images/qml-item-canvas-clip-complex.png Binary files differindex 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 diff --git a/src/quick/doc/images/qml-item-canvas-startAngle.png b/src/quick/doc/images/qml-item-canvas-startAngle.png Binary files differindex f81562e5e4..bf82c3aa4b 100644 --- a/src/quick/doc/images/qml-item-canvas-startAngle.png +++ b/src/quick/doc/images/qml-item-canvas-startAngle.png diff --git a/src/quick/doc/images/qml-mousearea-snippet.png b/src/quick/doc/images/qml-mousearea-snippet.png Binary files differindex 15229446c7..d1ddd8d2f5 100644 --- a/src/quick/doc/images/qml-mousearea-snippet.png +++ b/src/quick/doc/images/qml-mousearea-snippet.png diff --git a/src/quick/doc/images/qml-photoviewer-demo-small.png b/src/quick/doc/images/qml-photoviewer-demo-small.png Binary files differindex b16fb4e53a..ada37794ae 100644 --- a/src/quick/doc/images/qml-photoviewer-demo-small.png +++ b/src/quick/doc/images/qml-photoviewer-demo-small.png diff --git a/src/quick/doc/images/qml-rssnews-demo-small.png b/src/quick/doc/images/qml-rssnews-demo-small.png Binary files differindex 451a420623..299f72adc5 100644 --- a/src/quick/doc/images/qml-rssnews-demo-small.png +++ b/src/quick/doc/images/qml-rssnews-demo-small.png diff --git a/src/quick/doc/images/qmldesigner-visual-editor.png b/src/quick/doc/images/qmldesigner-visual-editor.png Binary files differindex 9cd4b8b2dc..94f8239ed4 100644 --- a/src/quick/doc/images/qmldesigner-visual-editor.png +++ b/src/quick/doc/images/qmldesigner-visual-editor.png 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/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 3e84a79445..74666fb8b6 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -65,7 +65,7 @@ #include <private/qv4scopedvalue_p.h> #include <QtCore/qmath.h> -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> #include <QtCore/QRunnable> #include <QtGui/qguiapplication.h> #include <QtGui/qopenglframebufferobject.h> @@ -1260,7 +1260,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_globalAlpha(QV4::CallContext *c QV4::Scoped<QQuickJSContext2D> r(scope, ctx->thisObject().as<QQuickJSContext2D>()); CHECK_CONTEXT_SETTER(r) - double globalAlpha = ctx->argc() ? ctx->args()[0].toNumber() : qQNaN(); + double globalAlpha = ctx->argc() ? ctx->args()[0].toNumber() : qt_qnan(); if (!qIsFinite(globalAlpha)) return QV4::Encode::undefined(); @@ -2010,7 +2010,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_shadowOffsetX(QV4::CallContext QV4::Scoped<QQuickJSContext2D> r(scope, ctx->thisObject()); CHECK_CONTEXT_SETTER(r) - qreal offsetX = ctx->argc() ? ctx->args()[0].toNumber() : qQNaN(); + qreal offsetX = ctx->argc() ? ctx->args()[0].toNumber() : qt_qnan(); if (qIsFinite(offsetX) && offsetX != r->d()->context->state.shadowOffsetX) { r->d()->context->state.shadowOffsetX = offsetX; r->d()->context->buffer()->setShadowOffsetX(offsetX); @@ -2038,7 +2038,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_shadowOffsetY(QV4::CallContext QV4::Scoped<QQuickJSContext2D> r(scope, ctx->thisObject()); CHECK_CONTEXT_SETTER(r) - qreal offsetY = ctx->argc() ? ctx->args()[0].toNumber() : qQNaN(); + qreal offsetY = ctx->argc() ? ctx->args()[0].toNumber() : qt_qnan(); if (qIsFinite(offsetY) && offsetY != r->d()->context->state.shadowOffsetY) { r->d()->context->state.shadowOffsetY = offsetY; r->d()->context->buffer()->setShadowOffsetY(offsetY); 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/qquickitem.cpp b/src/quick/items/qquickitem.cpp index da89a51f24..ea2cb5aa5f 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -56,7 +56,7 @@ #include <QtGui/private/qguiapplication_p.h> #include <QtGui/qinputmethod.h> #include <QtCore/qcoreevent.h> -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> #include <QtGui/qpa/qplatformtheme.h> #include <QtCore/qloggingcategory.h> @@ -6260,8 +6260,8 @@ void QQuickItem::setX(qreal v) d->dirty(QQuickItemPrivate::Position); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(oldx, y(), width(), height())); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(oldx, d->y, d->width, d->height)); } void QQuickItem::setY(qreal v) @@ -6275,8 +6275,8 @@ void QQuickItem::setY(qreal v) d->dirty(QQuickItemPrivate::Position); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), oldy, width(), height())); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, oldy, d->width, d->height)); } /*! @@ -6296,8 +6296,8 @@ void QQuickItem::setPosition(const QPointF &pos) d->dirty(QQuickItemPrivate::Position); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(oldx, oldy, width(), height())); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(oldx, oldy, d->width, d->height)); } /*! @@ -6314,7 +6314,7 @@ qreal QQuickItem::width() const void QQuickItem::setWidth(qreal w) { Q_D(QQuickItem); - if (qIsNaN(w)) + if (qt_is_nan(w)) return; d->widthValid = true; @@ -6326,8 +6326,8 @@ void QQuickItem::setWidth(qreal w) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), oldWidth, height())); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, oldWidth, d->height)); } void QQuickItem::resetWidth() @@ -6448,8 +6448,8 @@ void QQuickItem::setImplicitWidth(qreal w) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), oldWidth, height())); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, oldWidth, d->height)); if (changed) d->implicitWidthChanged(); @@ -6478,7 +6478,7 @@ qreal QQuickItem::height() const void QQuickItem::setHeight(qreal h) { Q_D(QQuickItem); - if (qIsNaN(h)) + if (qt_is_nan(h)) return; d->heightValid = true; @@ -6490,8 +6490,8 @@ void QQuickItem::setHeight(qreal h) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), width(), oldHeight)); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, d->width, oldHeight)); } void QQuickItem::resetHeight() @@ -6542,8 +6542,8 @@ void QQuickItem::setImplicitHeight(qreal h) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), width(), oldHeight)); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, d->width, oldHeight)); if (changed) d->implicitHeightChanged(); @@ -6587,8 +6587,8 @@ void QQuickItem::setImplicitSize(qreal w, qreal h) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), oldWidth, oldHeight)); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, oldWidth, oldHeight)); if (!wDone && wChanged) d->implicitWidthChanged(); @@ -6624,8 +6624,8 @@ void QQuickItem::setSize(const QSizeF &size) d->dirty(QQuickItemPrivate::Size); - geometryChanged(QRectF(x(), y(), width(), height()), - QRectF(x(), y(), oldWidth, oldHeight)); + geometryChanged(QRectF(d->x, d->y, d->width, d->height), + QRectF(d->x, d->y, oldWidth, oldHeight)); } /*! 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 8f08020374..a89dbc0ea2 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -2105,8 +2105,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"); @@ -3116,8 +3116,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/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 1c62b69769..a84ac6d177 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -104,7 +104,11 @@ public: : available(PageSize) , allocated(PageSize) { - for (int i=0; i<PageSize; ++i) blocks[i] = i; + for (int i=0; i<PageSize; ++i) + blocks[i] = i; + + // Zero out all new pages. + memset(data, 0, sizeof(data)); } const Type *at(uint index) const @@ -156,7 +160,7 @@ public: void *mem = p->at(pos); p->available--; p->allocated.setBit(pos); - Type *t = new (mem) Type(); + Type *t = (Type*)mem; return t; } @@ -166,8 +170,9 @@ public: if (!page->allocated.testBit(index)) qFatal("Double delete in allocator: page=%d, index=%d", pageIndex , index); - // Call the destructor - page->at(index)->~Type(); + // Zero this instance as we're done with it. + void *mem = page->at(index); + memset(mem, 0, sizeof(Type)); page->allocated[index] = false; page->available++; @@ -443,21 +448,9 @@ struct Batch QDataBuffer<DrawSet> drawSets; }; +// NOTE: Node is zero-allocated by the Allocator. struct Node { - Node() - : sgNode(0) - , parent(0) - , data(0) - , firstChild(0) - , nextSibling(0) - , lastChild(0) - , dirtyState(0) - , isOpaque(false) - , isBatchRoot(false) - { - } - QSGNode *sgNode; Node *parent; void *data; diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index d8552e622d..7c2663d5a3 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -117,8 +117,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() @@ -177,7 +177,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); @@ -202,7 +202,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); @@ -280,7 +280,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; @@ -304,8 +304,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); @@ -376,8 +376,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 8ab5575b18..9fed70a7de 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp @@ -85,8 +85,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 da1623e197..117a9272e5 100644 --- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp +++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp @@ -69,8 +69,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 a3dfc555c4..b9986c3d11 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -68,8 +68,8 @@ FlatColorMaterialShader::FlatColorMaterialShader() : QSGMaterialShader(*new QSGMaterialShaderPrivate) { #ifndef QT_NO_OPENGL - 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")); #endif } diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 35c5ace889..12a1b474e3 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -58,8 +58,8 @@ QSGOpaqueTextureMaterialShader::QSGOpaqueTextureMaterialShader() : QSGMaterialShader() { #ifndef QT_NO_OPENGL - 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")); #endif } @@ -370,7 +370,7 @@ QSGTextureMaterialShader::QSGTextureMaterialShader() : QSGOpaqueTextureMaterialShader() { #ifndef QT_NO_OPENGL - setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/scenegraph/shaders/texture.frag")); + setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/texture.frag")); #endif } diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp index 3897dfe4b2..18de19b04e 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp @@ -66,8 +66,8 @@ QSGVertexColorMaterialShader::QSGVertexColorMaterialShader() : QSGMaterialShader() { #ifndef QT_NO_OPENGL - 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")); #endif } 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 3502a28301..f0ecb8150a 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -239,6 +239,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) if (!m_controller) 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); m_helper->dx = m_value; m_helper->wasChanged = true; } @@ -404,7 +408,7 @@ void QQuickYAnimatorJob::updateCurrentTime(int time) if (!m_controller) 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); m_helper->dy = m_value; m_helper->wasChanged = true; } @@ -473,7 +477,7 @@ void QQuickOpacityAnimatorJob::updateCurrentTime(int time) if (!m_controller || !m_opacityNode) 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); m_opacityNode->setOpacity(m_value); } @@ -488,7 +492,7 @@ void QQuickScaleAnimatorJob::updateCurrentTime(int time) if (!m_controller) 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); m_helper->scale = m_value; m_helper->wasChanged = true; } @@ -507,7 +511,8 @@ void QQuickRotationAnimatorJob::updateCurrentTime(int time) if (!m_controller) return; - 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(); @@ -590,7 +595,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 75d2b962a5..118487f937 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/qquickpath.cpp b/src/quick/util/qquickpath.cpp index 062411e0a9..6b491a433c 100644 --- a/src/quick/util/qquickpath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -46,7 +46,7 @@ #include <private/qbezier_p.h> #include <QtCore/qmath.h> -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> QT_BEGIN_NAMESPACE @@ -560,7 +560,7 @@ void QQuickPath::createPointCache() const { Q_D(const QQuickPath); qreal pathLength = d->pathLength; - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return; const int segments = segmentCount(d->_path, pathLength); @@ -633,7 +633,7 @@ QPointF QQuickPath::sequentialPointAt(const QPainterPath &path, const qreal &pat QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return path.pointAtPercent(0); //expensive? const int lastElement = path.elementCount() - 1; @@ -689,7 +689,7 @@ QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathL //ideally this should be merged with forwardsPointAt QPointF QQuickPath::backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return path.pointAtPercent(0); const int firstElement = 1; //element 0 is always a MoveTo, which we ignore diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 23b2887fac..2b6e8f68c3 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -530,7 +530,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(); diff --git a/src/quick/util/qquicktimeline.cpp b/src/quick/util/qquicktimeline.cpp index d8226a08f3..74baa3bfda 100644 --- a/src/quick/util/qquicktimeline.cpp +++ b/src/quick/util/qquicktimeline.cpp @@ -47,7 +47,7 @@ #include <QCoreApplication> #include <QEasingCurve> #include <QTime> -#include <QtNumeric> +#include <QtCore/private/qnumeric_p.h> #include <algorithm> @@ -387,7 +387,7 @@ void QQuickTimeLine::set(QQuickTimeLineValue &timeLineValue, qreal value) */ int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration) { - if (qFuzzyIsNull(acceleration) || qIsNaN(acceleration)) + if (qFuzzyIsNull(acceleration) || qt_is_nan(acceleration)) return -1; if ((velocity > 0.0f) == (acceleration > 0.0f)) @@ -414,7 +414,7 @@ int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qr */ int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance) { - if (qFuzzyIsNull(maxDistance) || qIsNaN(maxDistance) || qFuzzyIsNull(acceleration) || qIsNaN(acceleration)) + if (qFuzzyIsNull(maxDistance) || qt_is_nan(maxDistance) || qFuzzyIsNull(acceleration) || qt_is_nan(acceleration)) return -1; Q_ASSERT(acceleration > 0.0f && maxDistance > 0.0f); @@ -444,7 +444,7 @@ int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qr */ int QQuickTimeLine::accelDistance(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal distance) { - if (qFuzzyIsNull(distance) || qIsNaN(distance) || qFuzzyIsNull(velocity) || qIsNaN(velocity)) + if (qFuzzyIsNull(distance) || qt_is_nan(distance) || qFuzzyIsNull(velocity) || qt_is_nan(velocity)) return -1; Q_ASSERT((distance >= 0.0f) == (velocity >= 0.0f)); |