From cf59a0acaee9b47bd371dd3ab8f0a6bd1f5b6d35 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 26 Nov 2015 07:37:17 +0100 Subject: MouseArea: fixed a crash in propagate() Should not propagate without window. Task-number: QTBUG-49100 Change-Id: Ieda3a8357283f8d07d4ffc0cc62c4e15645d7e5a Reviewed-by: J-P Nurmi --- src/quick/items/qquickmousearea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index 4a44760035..29d6680272 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -118,7 +118,7 @@ bool QQuickMouseAreaPrivate::isWheelConnected() void QQuickMouseAreaPrivate::propagate(QQuickMouseEvent* event, PropagateType t) { Q_Q(QQuickMouseArea); - if (!propagateComposedEvents) + if (!window || !propagateComposedEvents) return; QPointF scenePos = q->mapToScene(QPointF(event->x(), event->y())); propagateHelper(event, window->contentItem(), scenePos, t); -- cgit v1.2.3 From 4ce41d7fdcb07b515f9466c8d532b7f737aa24c9 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 26 Nov 2015 11:28:07 +0100 Subject: docfix: Make it clearer how Context2D relates to Canvas Change-Id: Id64aff29ef8bc7cbb4f7fc46b1a0d30a47585055 Reviewed-by: Mitch Curtis --- src/quick/items/context2d/qquickcanvasitem.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 6ef2d6123b..f0a56867f1 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -222,6 +222,9 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() operations. The Canvas output may be saved as an image file or serialized to a URL. + Rendering to the Canvas is done using a Context2D object, usually as a + result of the \l paint signal. + To define a drawing area in the Canvas item set the \c width and \c height properties. For example, the following code creates a Canvas item which has a drawing area with a height of 100 pixels and width of 200 pixels: @@ -231,6 +234,11 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() id: mycanvas width: 100 height: 200 + onPaint: { + var ctx = getContext("2d"); + ctx.fillStyle = Qt.rgba(1, 0, 0, 1); + ctx.fillRect(0, 0, width, height); + } } \endqml -- cgit v1.2.3 From 588da2a1ab30edb0d9dca798e91358732070e16a Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 8 Dec 2015 16:06:01 +0100 Subject: Fix link to QQmlError in QQmlComponent documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4549acabec366bb17512aad20a943b6b2f813801 Reviewed-by: Topi Reiniƶ --- src/qml/qml/qqmlcomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 669ed2337a..1cbe752e6c 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -306,7 +306,7 @@ V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); \value Null This QQmlComponent has no data. Call loadUrl() or setData() to add QML content. \value Ready This QQmlComponent is ready and create() may be called. \value Loading This QQmlComponent is loading network data. - \value Error An error has occurred. Call errors() to retrieve a list of \{QQmlError}{errors}. + \value Error An error has occurred. Call errors() to retrieve a list of \l {QQmlError}{errors}. */ /*! -- cgit v1.2.3 From dfb172f7bdcfc3c723e9506b3a54b5fc9e73dc6f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 8 Dec 2015 15:59:12 +0100 Subject: Fix QQmlComponent::errors() documentation Change-Id: I3b65a6aea614a01e36f0fb9e93bb8a9c929ad919 Reviewed-by: J-P Nurmi --- src/qml/qml/qqmlcomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 1cbe752e6c..35182d6319 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -696,7 +696,7 @@ void QQmlComponentPrivate::loadUrl(const QUrl &newUrl, QQmlComponent::Compilatio } /*! - Return the list of errors that occurred during the last compile or create + Returns the list of errors that occurred during the last compile or create operation. An empty list is returned if isError() is not set. */ QList QQmlComponent::errors() const -- cgit v1.2.3 From d1461c8429c7b6f9e9442f319d5a49b7e7a5b67d Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 17 Dec 2015 14:25:47 +0300 Subject: QQuickTextLine: set lineOffset to zero in ctor Change-Id: Ie6b085157cebaf06750a30bc050b6bed0c7f6018 Reviewed-by: Simon Hausmann --- src/quick/items/qquicktext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index f848d0baee..3129bda7cc 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -523,7 +523,7 @@ void QQuickTextPrivate::updateSize() } QQuickTextLine::QQuickTextLine() - : QObject(), m_line(0), m_height(0) + : QObject(), m_line(0), m_height(0), m_lineOffset(0) { } -- cgit v1.2.3