diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-30 13:25:53 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-30 13:28:35 +0200 |
commit | 42f485231c6bdbf2ad42e9483ec372b108d40f37 (patch) | |
tree | fd0ab45513e9f7c9b2af9a751ec8d7c469725ab2 /src/quick | |
parent | 15849d78b7cca848b87badcfee33db1db70b8b52 (diff) | |
parent | ac44a5b574289e8a24c7ad76760fdbb0a0728478 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/quick/items/context2d/qquickcanvasitem.cpp
src/quickwidgets/qquickwidget.cpp
tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc | 2 | ||||
-rw-r--r-- | src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc | 4 | ||||
-rw-r--r-- | src/quick/doc/src/examples.qdoc | 2 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickitem.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 8 | ||||
-rw-r--r-- | src/quick/items/qquickspriteengine.cpp | 9 | ||||
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 2 |
9 files changed, 25 insertions, 10 deletions
diff --git a/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc b/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc index 1b6e7dc539..20a6d131f5 100644 --- a/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc +++ b/src/quick/doc/src/concepts/layouts/qtquicklayouts-overview.qdoc @@ -84,7 +84,7 @@ stretches horizontally. The azure rectangle can be resized from 50x150 to 300x150, and the plum rectangle can be resized from 100x100 to ∞x100. - \snippet windowconstraints.qml rowlayout + \snippet qml/windowconstraints.qml rowlayout \image rowlayout-minimum.png "RowLayout at its minimum" diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc index 7d0a0826a6..c820e08e1b 100644 --- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc +++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc @@ -186,7 +186,7 @@ dedicated thread. Qt attempts to choose a suitable loop based on the platform and possibly the graphics drivers in use. When this is not satisfactory, or for testing purposes, the environment variable \c QSG_RENDER_LOOP can be used to force the usage of a given loop. To -verify which render loop is in use, enable the \c qt.scenegraph.info +verify which render loop is in use, enable the \c qt.scenegraph.general \l {QLoggingCategory}{logging category}. \note The \c threaded and \c windows render loops rely on the OpenGL @@ -374,7 +374,7 @@ addition to being helpful to Qt contributors. \li \c {qt.scenegraph.time.glyph} - logs the time spent preparing distance field glyphs -\li \c {qt.scenegraph.info} - logs general information about various parts of the scene graph and the graphics stack +\li \c {qt.scenegraph.general} - logs general information about various parts of the scene graph and the graphics stack \li \c {qt.scenegraph.renderloop} - creates a detailed log of the various stages involved in rendering. This log mode is primarily useful for developers working on Qt. diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc index e69c2f6551..e41b472ee1 100644 --- a/src/quick/doc/src/examples.qdoc +++ b/src/quick/doc/src/examples.qdoc @@ -135,7 +135,7 @@ Creator. \div {class="doc-column"} \b{Layouts and Views} \list - \li \l{Qt Quick Controls - Basic Layouts Example}{Basic Layouts} + \li \l{Qt Quick Layouts - Basic Example} \li \l{Qt Quick Examples - Positioners}{Positioners} \li \l{Qt Quick Examples - Views}{Views} \li \l{Qt Quick Examples - Window and Screen}{Windows and Screen} diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 8d91df5a74..3b2b125c63 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -708,7 +708,7 @@ void QQuickCanvasItem::updatePolish() for (auto it = animationCallbacks.cbegin(), end = animationCallbacks.cend(); it != end; ++it) { QV4::ScopedFunctionObject f(scope, it.value().value()); - callData->args[0] = QV4::Primitive::fromUInt32(QDateTime::currentDateTimeUtc().toTime_t()); + callData->args[0] = QV4::Primitive::fromUInt32(QDateTime::currentMSecsSinceEpoch() / 1000); f->call(scope, callData); } } diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 04d48d0384..6fd8875e83 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -5772,6 +5772,8 @@ bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window); if (windowPriv->mouseGrabberItem == q) q->ungrabMouse(); + if (!effectiveVisible) + q->ungrabTouchPoints(); } bool childVisibilityChanged = false; @@ -5820,6 +5822,8 @@ void QQuickItemPrivate::setEffectiveEnableRecur(QQuickItem *scope, bool newEffec QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window); if (windowPriv->mouseGrabberItem == q) q->ungrabMouse(); + if (!effectiveEnable) + q->ungrabTouchPoints(); if (scope && !effectiveEnable && activeFocus) { windowPriv->clearFocusInScope( scope, q, Qt::OtherFocusReason, QQuickWindowPrivate::DontChangeFocusProperty | QQuickWindowPrivate::DontChangeSubFocusItem); diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 074af7ebdc..4b9b7df98a 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -3147,7 +3147,7 @@ bool QQuickListViewPrivate::applyInsertionChange(const QQmlChangeSet::Change &ch } } - int prevVisibleCount = visibleItems.count(); + bool visibleAffected = false; if (insertResult->visiblePos.isValid() && pos < insertResult->visiblePos) { // Insert items before the visible item. int insertionIdx = index; @@ -3170,6 +3170,7 @@ bool QQuickListViewPrivate::applyInsertionChange(const QQmlChangeSet::Change &ch if (!item) return false; + visibleAffected = true; visibleItems.insert(insertionIdx, item); if (insertionIdx == 0) insertResult->changedFirstItem = true; @@ -3201,6 +3202,9 @@ bool QQuickListViewPrivate::applyInsertionChange(const QQmlChangeSet::Change &ch } else { qreal to = buffer + displayMarginEnd + tempPos + size(); + + visibleAffected = count > 0 && pos < to; + for (int i = 0; i < count && pos <= to; ++i) { FxViewItem *item = 0; if (change.isMove() && (item = currentChanges.removedItems.take(change.moveKey(modelIndex + i)))) @@ -3251,7 +3255,7 @@ bool QQuickListViewPrivate::applyInsertionChange(const QQmlChangeSet::Change &ch updateVisibleIndex(); - return visibleItems.count() > prevVisibleCount; + return visibleAffected; } void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult) diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp index c82966cf6b..2137c8d8d5 100644 --- a/src/quick/items/qquickspriteengine.cpp +++ b/src/quick/items/qquickspriteengine.cpp @@ -408,6 +408,15 @@ QImage QQuickSpriteEngine::assembledImage() QImage img = state->m_pix.image(); + { + const QSize frameSize(state->m_frameWidth, state->m_frameHeight); + if (!(img.size() - frameSize).isValid()) { + qmlInfo(state).nospace() << "SpriteEngine: Invalid frame size " << frameSize << "." + " It's bigger than image size " << img.size() << "."; + return QImage(); + } + } + //Check that the frame sizes are the same within one sprite if (!state->m_frameWidth) state->m_frameWidth = img.width() / state->frames(); diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index daff9ef473..c452659c5b 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -240,8 +240,6 @@ public: uint clearBeforeRendering : 1; - // Currently unused in the default implementation, as we're not stopping - // rendering when obscured as we should... uint persistentGLContext : 1; uint persistentSceneGraph : 1; diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index 83aceb79f4..0009de8c67 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE // Used for very high-level info about the renderering and gl context // Includes GL_VERSION, type of render loop, atlas size, etc. -Q_LOGGING_CATEGORY(QSG_LOG_INFO, "qt.scenegraph.info") +Q_LOGGING_CATEGORY(QSG_LOG_INFO, "qt.scenegraph.general") // Used to debug the renderloop logic. Primarily useful for platform integrators // and when investigating the render loop logic. |