diff options
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickevents.cpp | 10 | ||||
-rw-r--r-- | src/quick/items/qquickgenericshadereffect.cpp | 31 | ||||
-rw-r--r-- | src/quick/items/qquickgenericshadereffect_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 1 | ||||
-rw-r--r-- | src/quick/items/qquickitemview.cpp | 3 | ||||
-rw-r--r-- | src/quick/items/qquickpainteditem.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectmesh_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 13 |
8 files changed, 49 insertions, 21 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 51c662cb3a..ad3a39dd71 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -913,10 +913,14 @@ void QQuickEventPoint::setGrabberPointerHandler(QQuickPointerHandler *grabber, b passiveGrabber->onGrabChanged(grabber, OverrideGrabPassive, this); } } - if (oldGrabberHandler) + if (oldGrabberHandler) { oldGrabberHandler->onGrabChanged(oldGrabberHandler, (grabber ? CancelGrabExclusive : UngrabExclusive), this); - else if (oldGrabberItem && pointerEvent()->asPointerTouchEvent()) - oldGrabberItem->touchUngrabEvent(); + } else if (oldGrabberItem) { + if (pointerEvent()->asPointerTouchEvent()) + oldGrabberItem->touchUngrabEvent(); + else if (pointerEvent()->asPointerMouseEvent()) + oldGrabberItem->mouseUngrabEvent(); + } // touchUngrabEvent() can result in the grabber being set to null (MPTA does that, for example). // So set it again to ensure that final state is what we want. m_exclusiveGrabber = QPointer<QObject>(grabber); diff --git a/src/quick/items/qquickgenericshadereffect.cpp b/src/quick/items/qquickgenericshadereffect.cpp index 1d71555849..df61ee853d 100644 --- a/src/quick/items/qquickgenericshadereffect.cpp +++ b/src/quick/items/qquickgenericshadereffect.cpp @@ -40,10 +40,27 @@ #include <private/qquickgenericshadereffect_p.h> #include <private/qquickwindow_p.h> #include <private/qquickitem_p.h> -#include <QSignalMapper> QT_BEGIN_NAMESPACE +namespace { +class IntSignalMapper : public QObject +{ + Q_OBJECT + + int value; +public: + explicit IntSignalMapper(int v) + : QObject(nullptr), value(v) {} + +public Q_SLOTS: + void map() { emit mapped(value); } + +Q_SIGNALS: + void mapped(int); +}; +} // unnamed namespace + // The generic shader effect is used whenever on the RHI code path, or when the // scenegraph backend indicates SupportsShaderEffectNode. This, unlike the // monolithic and interconnected (e.g. with particles) OpenGL variant, passes @@ -547,15 +564,10 @@ void QQuickGenericShaderEffect::updateShaderVars(Shader shaderType) if (!mp.hasNotifySignal()) qWarning("ShaderEffect: property '%s' does not have notification method", v.name.constData()); - // Have a QSignalMapper that emits mapped() with an index+type on each property change notify signal. + // Have a IntSignalMapper that emits mapped() with an index+type on each property change notify signal. auto &sm(m_signalMappers[shaderType][i]); - if (!sm.mapper) { -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - sm.mapper = new QSignalMapper; -QT_WARNING_POP - sm.mapper->setMapping(m_item, i | (shaderType << 16)); - } + if (!sm.mapper) + sm.mapper = new IntSignalMapper(i | (shaderType << 16)); sm.active = true; const QByteArray signalName = '2' + mp.notifySignal().methodSignature(); QObject::connect(m_item, signalName, sm.mapper, SLOT(map())); @@ -665,3 +677,4 @@ void QQuickGenericShaderEffect::markGeometryDirtyAndUpdateIfSupportsAtlas() QT_END_NAMESPACE #include "moc_qquickgenericshadereffect_p.cpp" +#include "qquickgenericshadereffect.moc" diff --git a/src/quick/items/qquickgenericshadereffect_p.h b/src/quick/items/qquickgenericshadereffect_p.h index 3f6f92921b..368c32d2f8 100644 --- a/src/quick/items/qquickgenericshadereffect_p.h +++ b/src/quick/items/qquickgenericshadereffect_p.h @@ -59,8 +59,6 @@ QT_BEGIN_NAMESPACE -class QSignalMapper; - class Q_QUICK_PRIVATE_EXPORT QQuickGenericShaderEffect : public QObject { Q_OBJECT @@ -142,7 +140,7 @@ private: struct SignalMapper { SignalMapper() : mapper(nullptr), active(false) { } - QSignalMapper *mapper; + QObject *mapper; bool active; }; QVector<SignalMapper> m_signalMappers[NShader]; diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index e6090e66ba..8aa259a7b6 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -227,6 +227,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickPathSvg>("QtQuick",2,0,"PathSvg"); qmlRegisterType<QQuickPath, 14>(uri, 2, 14, "Path"); qmlRegisterType<QQuickPathPolyline>("QtQuick", 2, 14, "PathPolyline"); + qmlRegisterType<QQuickPathMultiline>("QtQuick", 2, 14, "PathMultiline"); #endif #if QT_CONFIG(quick_pathview) qmlRegisterType<QQuickPathView>(uri,major,minor,"PathView"); diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 95f1229b92..bbfbf6244c 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -1852,6 +1852,9 @@ void QQuickItemViewPrivate::layout() forceLayout = false; if (transitioner && transitioner->canTransition(QQuickItemViewTransitioner::PopulateTransition, true)) { + // Give the view one more chance to refill itself, + // in case its size is changed such that more delegates become visible after component completed + refill(); for (FxViewItem *item : qAsConst(visibleItems)) { if (!item->transitionScheduledOrRunning()) item->transitionNextReposition(transitioner, QQuickItemViewTransitioner::PopulateTransition, true); diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp index 57848919f3..cee73ac2e8 100644 --- a/src/quick/items/qquickpainteditem.cpp +++ b/src/quick/items/qquickpainteditem.cpp @@ -369,10 +369,6 @@ void QQuickPaintedItem::setTextureSize(const QSize &size) emit textureSizeChanged(); } -#if QT_VERSION >= 0x060000 -#warning "Remove: QQuickPaintedItem::contentsBoundingRect, contentsScale, contentsSize. Also remove them from qsgadaptationlayer_p.h and qsgdefaultpainternode.h/cpp." -#endif - /*! \obsolete diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h index 62a9798e40..79e05a5f9f 100644 --- a/src/quick/items/qquickshadereffectmesh_p.h +++ b/src/quick/items/qquickshadereffectmesh_p.h @@ -66,8 +66,8 @@ QT_REQUIRE_CONFIG(quick_shadereffect); QT_BEGIN_NAMESPACE -const char *qtPositionAttributeName(); -const char *qtTexCoordAttributeName(); +Q_QUICK_PRIVATE_EXPORT const char *qtPositionAttributeName(); +Q_QUICK_PRIVATE_EXPORT const char *qtTexCoordAttributeName(); class QSGGeometry; class QRectF; diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 30738b3db6..a208e135af 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -536,6 +536,13 @@ void QQuickWindowPrivate::renderSceneGraph(const QSize &size, const QSize &surfa context->endNextRhiFrame(renderer); else context->endNextFrame(renderer); + + if (renderer->hasCustomRenderModeWithContinuousUpdate()) { + // For the overdraw visualizer. This update is not urgent so avoid a + // direct update() call, this is only here to keep the overdraw + // visualization box rotating even when the scene is static. + QCoreApplication::postEvent(q, new QEvent(QEvent::Type(FullUpdateRequest))); + } } QQuickWindowPrivate::QQuickWindowPrivate() @@ -3804,6 +3811,12 @@ bool QQuickWindow::isSceneGraphInitialized() const This signal is emitted when the window receives the event \a close from the windowing system. + + On \macOs, Qt will create a menu item \c Quit if there is no menu item + whose text is "quit" or "exit". This menu item calls the \c QCoreApplication::quit + signal, not the \c QQuickWindow::closing() signal. + + \sa {QMenuBar as a Global Menu Bar} */ /*! |