aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp8
-rw-r--r--src/quick/items/qquickmousearea.cpp2
-rw-r--r--src/quick/items/qquicktext.cpp2
4 files changed, 12 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 040089db20..22a54d732e 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -289,7 +289,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}.
*/
/*!
@@ -679,7 +679,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<QQmlError> QQmlComponent::errors() const
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 9abca59b1c..9fb49f9c9e 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
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index b933dc240a..ef053abbd1 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);
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 223219a3f9..5c436d2074 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -461,7 +461,7 @@ void QQuickTextPrivate::updateSize()
}
QQuickTextLine::QQuickTextLine()
- : QObject(), m_line(0), m_height(0)
+ : QObject(), m_line(0), m_height(0), m_lineOffset(0)
{
}