aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp20
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp168
-rw-r--r--src/quick/items/qquickaccessibleattached.cpp25
-rw-r--r--src/quick/items/qquickaccessibleattached_p.h2
-rw-r--r--src/quick/items/qquickanimatedimage.cpp2
-rw-r--r--src/quick/items/qquickborderimage.cpp22
-rw-r--r--src/quick/items/qquickcanvas.cpp8
-rw-r--r--src/quick/items/qquickdrag.cpp8
-rw-r--r--src/quick/items/qquickdroparea.cpp8
-rw-r--r--src/quick/items/qquickevents.cpp54
-rw-r--r--src/quick/items/qquickflickable.cpp22
-rw-r--r--src/quick/items/qquickgridview.cpp79
-rw-r--r--src/quick/items/qquickimage.cpp54
-rw-r--r--src/quick/items/qquickitem.cpp96
-rw-r--r--src/quick/items/qquickitemanimation.cpp10
-rw-r--r--src/quick/items/qquickitemview.cpp13
-rw-r--r--src/quick/items/qquickitemview_p_p.h7
-rw-r--r--src/quick/items/qquickitemviewtransition.cpp62
-rw-r--r--src/quick/items/qquicklistview.cpp99
-rw-r--r--src/quick/items/qquickloader.cpp61
-rw-r--r--src/quick/items/qquickmousearea.cpp24
-rw-r--r--src/quick/items/qquickmultipointtoucharea.cpp12
-rw-r--r--src/quick/items/qquickpathview.cpp6
-rw-r--r--src/quick/items/qquickpincharea.cpp40
-rw-r--r--src/quick/items/qquickpositioners.cpp52
-rw-r--r--src/quick/items/qquickrepeater.cpp16
-rw-r--r--src/quick/items/qquickshadereffect.cpp38
-rw-r--r--src/quick/items/qquickshadereffectmesh.cpp4
-rw-r--r--src/quick/items/qquickshadereffectsource.cpp24
-rw-r--r--src/quick/items/qquickstateoperations.cpp12
-rw-r--r--src/quick/items/qquicktext.cpp94
-rw-r--r--src/quick/items/qquicktextedit.cpp94
-rw-r--r--src/quick/items/qquicktextinput.cpp108
-rw-r--r--src/quick/items/qquicktextinput_p_p.h1
-rw-r--r--src/quick/items/qquickvisualadaptormodel.cpp24
-rw-r--r--src/quick/items/qquickvisualdatamodel.cpp30
-rw-r--r--src/quick/items/qquickvisualdatamodel_p_p.h2
-rw-r--r--src/quick/items/qquickwindowmanager.cpp12
38 files changed, 702 insertions, 711 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index f89ac186eb..4f849c771b 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -169,13 +169,13 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate()
Although the Canvas item is provides a HTML5 like API, HTML5 canvas
applications need to be modified to run in the Canvas item:
\list
- \o Replace all DOM API calls with QML property bindings or Canvas item methods.
- \o Replace all HTML event handlers with the \a MouseArea item.
- \o Change setInterval/setTimeout function calls with the \a Timer item or
+ \li Replace all DOM API calls with QML property bindings or Canvas item methods.
+ \li Replace all HTML event handlers with the \a MouseArea item.
+ \li Change setInterval/setTimeout function calls with the \a Timer item or
the use of requestAnimationFrame.
- \o Place painting code into the \a QtQuick2::Canvas::onPaint handler and trigger
+ \li Place painting code into the \a QtQuick2::Canvas::onPaint handler and trigger
painting by calling the \c markDirty or \c requestPaint methods.
- \o To draw images, load them by calling the Canvas's loadImage method and then request to paint
+ \li To draw images, load them by calling the Canvas's loadImage method and then request to paint
them in the onImageLoaded handler.
\endlist
@@ -369,8 +369,8 @@ void QQuickCanvasItem::setCanvasWindow(const QRectF& rect)
Holds the current canvas render target.
\list
- \o Canvas.Image - render to an in memory image buffer.
- \o Canvas.FramebufferObject - render to an OpenGL frame buffer
+ \li Canvas.Image - render to an in memory image buffer.
+ \li Canvas.FramebufferObject - render to an OpenGL frame buffer
\endlist
This hint is supplied along with renderStrategy to the graphics context to
@@ -404,9 +404,9 @@ void QQuickCanvasItem::setRenderTarget(QQuickCanvasItem::RenderTarget target)
Holds the current canvas rendering strategy.
\list
- \o Canvas.Immediate - context will perform graphics commands immediately in the main UI thread.
- \o Canvas.Threaded - context will defer graphics commands to a private rendering thread.
- \o Canvas.Cooperative - context will defer graphics commands to the applications global render thread.
+ \li Canvas.Immediate - context will perform graphics commands immediately in the main UI thread.
+ \li Canvas.Threaded - context will defer graphics commands to a private rendering thread.
+ \li Canvas.Cooperative - context will defer graphics commands to the applications global render thread.
\endlist
This hint is supplied along with renderTarget to the graphics context to
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 05577e8c5c..f8e5e3c57f 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
{http://www.w3.org/TR/2dcontext}{W3C Canvas 2D Context API standard} with
some enhanced features.
- The Context2D API provides the rendering \bold{context} which defines the
+ The Context2D API provides the rendering \b{context} which defines the
methods and attributes needed to draw on the \c Canvas item. The following
assigns the canvas rendering context to a \c{context} variable:
\code
@@ -495,22 +495,22 @@ static v8::Handle<v8::Value> ctx2d_reset(const v8::Arguments &args)
Each state consists of the current transformation matrix, clipping region,
and values of the following attributes:
\list
- \o\a QtQuick2::Context2D::strokeStyle
- \o\a QtQuick2::Context2D::fillStyle
- \o\a QtQuick2::Context2D::fillRule
- \o\a QtQuick2::Context2D::globalAlpha
- \o\a QtQuick2::Context2D::lineWidth
- \o\a QtQuick2::Context2D::lineCap
- \o\a QtQuick2::Context2D::lineJoin
- \o\a QtQuick2::Context2D::miterLimit
- \o\a QtQuick2::Context2D::shadowOffsetX
- \o\a QtQuick2::Context2D::shadowOffsetY
- \o\a QtQuick2::Context2D::shadowBlur
- \o\a QtQuick2::Context2D::shadowColor
- \o\a QtQuick2::Context2D::globalCompositeOperation
- \o\a QtQuick2::Context2D::font
- \o\a QtQuick2::Context2D::textAlign
- \o\a QtQuick2::Context2D::textBaseline
+ \li\a QtQuick2::Context2D::strokeStyle
+ \li\a QtQuick2::Context2D::fillStyle
+ \li\a QtQuick2::Context2D::fillRule
+ \li\a QtQuick2::Context2D::globalAlpha
+ \li\a QtQuick2::Context2D::lineWidth
+ \li\a QtQuick2::Context2D::lineCap
+ \li\a QtQuick2::Context2D::lineJoin
+ \li\a QtQuick2::Context2D::miterLimit
+ \li\a QtQuick2::Context2D::shadowOffsetX
+ \li\a QtQuick2::Context2D::shadowOffsetY
+ \li\a QtQuick2::Context2D::shadowBlur
+ \li\a QtQuick2::Context2D::shadowColor
+ \li\a QtQuick2::Context2D::globalCompositeOperation
+ \li\a QtQuick2::Context2D::font
+ \li\a QtQuick2::Context2D::textAlign
+ \li\a QtQuick2::Context2D::textBaseline
\endlist
The current path is NOT part of the drawing state. The path can be reset by
@@ -606,19 +606,19 @@ static v8::Handle<v8::Value> ctx2d_scale(const v8::Arguments &args)
\image qml-item-canvas-math.png
where:
\list
- \o \c{a} is the scale factor in the horizontal (x) direction
+ \li \c{a} is the scale factor in the horizontal (x) direction
\image qml-item-canvas-scalex.png
- \o \c{c} is the skew factor in the x direction
+ \li \c{c} is the skew factor in the x direction
\image qml-item-canvas-canvas-skewx.png
- \o \c{e} is the translation in the x direction
+ \li \c{e} is the translation in the x direction
\image qml-item-canvas-canvas-translate.png
- \o \c{b} is the skew factor in the y (vertical) direction
+ \li \c{b} is the skew factor in the y (vertical) direction
\image qml-item-canvas-canvas-skewy.png
- \o \c{d} is the scale factor in the y direction
+ \li \c{d} is the scale factor in the y direction
\image qml-item-canvas-canvas-scaley.png
- \o \c{f} is the translation in the y direction
+ \li \c{f} is the translation in the y direction
\image qml-item-canvas-canvas-translatey.png
- \o the last row remains constant
+ \li the last row remains constant
\endlist
The scale factors and skew factors are multiples; \c{e} and \c{f} are
coordinate space units, just like the units in the \a QtQuick2::Context2D::translate(x,y)
@@ -799,22 +799,22 @@ static void ctx2d_globalAlpha_set(v8::Local<v8::String>, v8::Local<v8::Value> va
\qmlproperty string QtQuick2::Context2D::globalCompositeOperation
Holds the the current the current composition operation, from the list below:
\list
- \o source-atop - A atop B. Display the source image wherever both images are opaque.
+ \li source-atop - A atop B. Display the source image wherever both images are opaque.
Display the destination image wherever the destination image is opaque but the source image is transparent.
Display transparency elsewhere.
- \o source-in - A in B. Display the source image wherever both the source image and destination image are opaque.
+ \li source-in - A in B. Display the source image wherever both the source image and destination image are opaque.
Display transparency elsewhere.
- \o source-out - A out B. Display the source image wherever the source image is opaque and the destination image is transparent.
+ \li source-out - A out B. Display the source image wherever the source image is opaque and the destination image is transparent.
Display transparency elsewhere.
- \o source-over - (default) A over B. Display the source image wherever the source image is opaque.
+ \li source-over - (default) A over B. Display the source image wherever the source image is opaque.
Display the destination image elsewhere.
- \o destination-atop - B atop A. Same as source-atop but using the destination image instead of the source image and vice versa.
- \o destination-in - B in A. Same as source-in but using the destination image instead of the source image and vice versa.
- \o destination-out - B out A. Same as source-out but using the destination image instead of the source image and vice versa.
- \o destination-over - B over A. Same as source-over but using the destination image instead of the source image and vice versa.
- \o lighter - A plus B. Display the sum of the source image and destination image, with color values approaching 255 (100%) as a limit.
- \o copy - A (B is ignored). Display the source image instead of the destination image.
- \o xor - A xor B. Exclusive OR of the source image and destination image.
+ \li destination-atop - B atop A. Same as source-atop but using the destination image instead of the source image and vice versa.
+ \li destination-in - B in A. Same as source-in but using the destination image instead of the source image and vice versa.
+ \li destination-out - B out A. Same as source-out but using the destination image instead of the source image and vice versa.
+ \li destination-over - B over A. Same as source-over but using the destination image instead of the source image and vice versa.
+ \li lighter - A plus B. Display the sum of the source image and destination image, with color values approaching 255 (100%) as a limit.
+ \li copy - A (B is ignored). Display the source image instead of the destination image.
+ \li xor - A xor B. Exclusive OR of the source image and destination image.
\endlist
Additionally, this property also accepts the compositon modes listed in \a {QPainter::CompositionMode}. According to the W3C standard, these
@@ -858,12 +858,12 @@ static void ctx2d_globalCompositeOperation_set(v8::Local<v8::String>, v8::Local<
The style can be either a string containing a CSS color, a CanvasGradient or CanvasPattern object. Invalid values are ignored.
This property accepts several color syntaxes:
\list
- \o 'rgb(red, green, blue)' - for example: 'rgb(255, 100, 55)' or 'rgb(100%, 70%, 30%)'
- \o 'rgba(red, green, blue, alpha)' - for example: 'rgb(255, 100, 55, 1.0)' or 'rgb(100%, 70%, 30%, 0.5)'
- \o 'hsl(hue, saturation, lightness)'
- \o 'hsla(hue, saturation, lightness, alpha)'
- \o '#RRGGBB' - for example: '#00FFCC'
- \o Qt.rgba(red, green, blue, alpha) - for example: Qt.rgba(0.3, 0.7, 1, 1.0)
+ \li 'rgb(red, green, blue)' - for example: 'rgb(255, 100, 55)' or 'rgb(100%, 70%, 30%)'
+ \li 'rgba(red, green, blue, alpha)' - for example: 'rgb(255, 100, 55, 1.0)' or 'rgb(100%, 70%, 30%, 0.5)'
+ \li 'hsl(hue, saturation, lightness)'
+ \li 'hsla(hue, saturation, lightness, alpha)'
+ \li '#RRGGBB' - for example: '#00FFCC'
+ \li Qt.rgba(red, green, blue, alpha) - for example: Qt.rgba(0.3, 0.7, 1, 1.0)
\endlist
If the \a fillStyle or \a strokeStyle is assigned many times in a loop, the last Qt.rgba() syntax should be chosen, as it has the
best performance, because it's already a valid QColor value, does not need to be parsed everytime.
@@ -931,8 +931,8 @@ static void ctx2d_fillStyle_set(v8::Local<v8::String>, v8::Local<v8::Value> valu
\qmlproperty enumeration QtQuick2::Context2D::fillRule
Holds the current fill rule used for filling shapes. The following fill rules supported:
\list
- \o Qt.OddEvenFill
- \o Qt.WindingFill
+ \li Qt.OddEvenFill
+ \li Qt.WindingFill
\endlist
Note: Unlike the \a QPainterPath, the Canvas API uses the winding fill as the default fill rule.
The fillRule property is part of the context rendering state.
@@ -1183,20 +1183,20 @@ static v8::Handle<v8::Value> ctx2d_createConicalGradient(const v8::Arguments &ar
Returns a CanvasPattern object that uses the given \c color and \c patternMode.
The valid pattern modes are:
\list
- \o Qt.SolidPattern
- \o Qt.Dense1Pattern
- \o Qt.Dense2Pattern
- \o Qt.Dense3Pattern
- \o Qt.Dense4Pattern
- \o Qt.Dense5Pattern
- \o Qt.Dense6Pattern
- \o Qt.Dense7Pattern
- \o Qt.HorPattern
- \o Qt.VerPattern
- \o Qt.CrossPattern
- \o Qt.BDiagPattern
- \o Qt.FDiagPattern
- \o Qt.DiagCrossPattern
+ \li Qt.SolidPattern
+ \li Qt.Dense1Pattern
+ \li Qt.Dense2Pattern
+ \li Qt.Dense3Pattern
+ \li Qt.Dense4Pattern
+ \li Qt.Dense5Pattern
+ \li Qt.Dense6Pattern
+ \li Qt.Dense7Pattern
+ \li Qt.HorPattern
+ \li Qt.VerPattern
+ \li Qt.CrossPattern
+ \li Qt.BDiagPattern
+ \li Qt.FDiagPattern
+ \li Qt.DiagCrossPattern
\endlist
\sa Qt::BrushStyle
*/
@@ -1209,10 +1209,10 @@ static v8::Handle<v8::Value> ctx2d_createConicalGradient(const v8::Arguments &ar
The allowed values for \a repetition are:
\list
- \o "repeat" - both directions
- \o "repeat-x - horizontal only
- \o "repeat-y" - vertical only
- \o "no-repeat" - neither
+ \li "repeat" - both directions
+ \li "repeat-x - horizontal only
+ \li "repeat-y" - vertical only
+ \li "no-repeat" - neither
\endlist
If the repetition argument is empty or null, the value "repeat" is used.
@@ -1287,9 +1287,9 @@ static v8::Handle<v8::Value> ctx2d_createPattern(const v8::Arguments &args)
Holds the the current line cap style.
The possible line cap styles are:
\list
- \o butt - the end of each line has a flat edge perpendicular to the direction of the line, this is the default line cap value.
- \o round - a semi-circle with the diameter equal to the width of the line must then be added on to the end of the line.
- \o square - a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line.
+ \li butt - the end of each line has a flat edge perpendicular to the direction of the line, this is the default line cap value.
+ \li round - a semi-circle with the diameter equal to the width of the line must then be added on to the end of the line.
+ \li square - a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line.
\endlist
Other values are ignored.
*/
@@ -1345,9 +1345,9 @@ static void ctx2d_lineCap_set(v8::Local<v8::String>, v8::Local<v8::Value> value,
The possible line join styles are:
\list
- \o bevel - this is all that is rendered at joins.
- \o round - a filled arc connecting the two aforementioned corners of the join, abutting (and not overlapping) the aforementioned triangle, with the diameter equal to the line width and the origin at the point of the join, must be rendered at joins.
- \o miter - a second filled triangle must (if it can given the miter length) be rendered at the join, this is the default line join style.
+ \li bevel - this is all that is rendered at joins.
+ \li round - a filled arc connecting the two aforementioned corners of the join, abutting (and not overlapping) the aforementioned triangle, with the diameter equal to the line width and the origin at the point of the join, must be rendered at joins.
+ \li miter - a second filled triangle must (if it can given the miter length) be rendered at the join, this is the default line join style.
\endlist
Other values are ignored.
*/
@@ -1711,9 +1711,9 @@ static v8::Handle<v8::Value> ctx2d_arc(const v8::Arguments &args)
Adds an arc with the given control points and radius to the current subpath, connected to the previous point by a straight line.
To draw an arc, you begin with the same steps your followed to create a line:
\list
- \o Call the context.beginPath() method to set a new path.
- \o Call the context.moveTo(\c x, \c y) method to set your starting position on the canvas at the point (\c x,\c y).
- \o To draw an arc or circle, call the context.arcTo(\c x1, \c y1, \c x2, \c y2,\c radius) method.
+ \li Call the context.beginPath() method to set a new path.
+ \li Call the context.moveTo(\c x, \c y) method to set your starting position on the canvas at the point (\c x,\c y).
+ \li To draw an arc or circle, call the context.arcTo(\c x1, \c y1, \c x2, \c y2,\c radius) method.
This adds an arc with starting point (\c x1,\c y1), ending point (\c x2, \c y2), and radius \c radius to the current subpath and connects
it to the previous subpath by a straight line.
\endlist
@@ -1820,10 +1820,10 @@ static v8::Handle<v8::Value> ctx2d_bezierCurveTo(const v8::Arguments &args)
To create a complex shape using the \a clip() method:
\list 1
- \o Call the \c{context.beginPath()} method to set the clipping path.
- \o Define the clipping path by calling any combination of the \c{lineTo},
+ \li Call the \c{context.beginPath()} method to set the clipping path.
+ \li Define the clipping path by calling any combination of the \c{lineTo},
\c{arcTo}, \c{arc}, \c{moveTo}, etc and \c{closePath} methods.
- \o Call the \c{context.clip()} method.
+ \li Call the \c{context.clip()} method.
\endlist
The new shape displays. The following shows how a clipping path can
@@ -2168,11 +2168,11 @@ static void ctx2d_font_set(v8::Local<v8::String>, v8::Local<v8::Value> value, co
Holds the current text alignment settings.
The possible values are:
\list
- \o start
- \o end
- \o left
- \o right
- \o center
+ \li start
+ \li end
+ \li left
+ \li right
+ \li center
\endlist
Other values are ignored. The default value is "start".
*/
@@ -2231,12 +2231,12 @@ static void ctx2d_textAlign_set(v8::Local<v8::String>, v8::Local<v8::Value> valu
Holds the current baseline alignment settings.
The possible values are:
\list
- \o top
- \o hanging
- \o middle
- \o alphabetic
- \o ideographic
- \o bottom
+ \li top
+ \li hanging
+ \li middle
+ \li alphabetic
+ \li ideographic
+ \li bottom
\endlist
Other values are ignored. The default value is "alphabetic".
*/
diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp
index 1e07d96690..46f85417d2 100644
--- a/src/quick/items/qquickaccessibleattached.cpp
+++ b/src/quick/items/qquickaccessibleattached.cpp
@@ -113,22 +113,22 @@ QT_BEGIN_NAMESPACE
\table
\header
- \o \bold {Role}
- \o \bold {Expected property}
- \o
+ \li \b {Role}
+ \li \b {Expected property}
+ \li
\row
- \o Button
- \o function accessiblePressAction
- \o Called when the button receives a press action. The implementation should visually simulate a button click and perform the button action.
+ \li Button
+ \li function accessiblePressAction
+ \li Called when the button receives a press action. The implementation should visually simulate a button click and perform the button action.
\row
- \o CheckBox, Radiobutton
- \o checked
- \o The check state of the check box. Updated on Press, Check and Uncheck actions.
+ \li CheckBox, Radiobutton
+ \li checked
+ \li The check state of the check box. Updated on Press, Check and Uncheck actions.
\row
- \o Slider, SpinBox, Dial, ScrollBar
- \o value, minimumValue, maximumValue, stepSize
- \o value will be updated on increase and decrase actions, in accordance with the other properties
+ \li Slider, SpinBox, Dial, ScrollBar
+ \li value, minimumValue, maximumValue, stepSize
+ \li value will be updated on increase and decrase actions, in accordance with the other properties
\endtable
*/
@@ -144,7 +144,6 @@ QQuickAccessibleAttached::QQuickAccessibleAttached(QObject *parent)
// Enable accessibility for items with accessible content. This also
// enables accessibility for the ancestors of souch items.
item->d_func()->setAccessibleFlagAndListener();
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectCreated, item, 0));
}
QQuickAccessibleAttached::~QQuickAccessibleAttached()
diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h
index 5eea44b6e4..129c3ef240 100644
--- a/src/quick/items/qquickaccessibleattached_p.h
+++ b/src/quick/items/qquickaccessibleattached_p.h
@@ -85,7 +85,6 @@ public:
if (name != m_name) {
m_name = name;
emit nameChanged();
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, parent(), 0));
}
}
@@ -95,7 +94,6 @@ public:
if (m_description != description) {
m_description = description;
emit descriptionChanged();
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, parent(), 0));
}
}
diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp
index eef20db361..6567892fb4 100644
--- a/src/quick/items/qquickanimatedimage.cpp
+++ b/src/quick/items/qquickanimatedimage.cpp
@@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE
about its state, such as the current frame and total number of frames.
The result is an animated image with a simple progress indicator underneath it.
- \bold Note: Unlike images, animated images are not cached or shared internally.
+ \b Note: Unlike images, animated images are not cached or shared internally.
\clearfloat
\snippet doc/src/snippets/qml/animatedimage.qml document
diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp
index 5beb345afc..71514593a3 100644
--- a/src/quick/items/qquickborderimage.cpp
+++ b/src/quick/items/qquickborderimage.cpp
@@ -71,12 +71,12 @@ QT_BEGIN_NAMESPACE
create the displayed border image in the following way:
\list
- \i The corners (regions 1, 3, 7, and 9) are not scaled at all.
- \i Regions 2 and 8 are scaled according to
+ \li The corners (regions 1, 3, 7, and 9) are not scaled at all.
+ \li Regions 2 and 8 are scaled according to
\l{BorderImage::horizontalTileMode}{horizontalTileMode}.
- \i Regions 4 and 6 are scaled according to
+ \li Regions 4 and 6 are scaled according to
\l{BorderImage::verticalTileMode}{verticalTileMode}.
- \i The middle (region 5) is scaled according to both
+ \li The middle (region 5) is scaled according to both
\l{BorderImage::horizontalTileMode}{horizontalTileMode} and
\l{BorderImage::verticalTileMode}{verticalTileMode}.
\endlist
@@ -182,10 +182,10 @@ QQuickBorderImage::~QQuickBorderImage()
This property describes the status of image loading. It can be one of:
\list
- \o BorderImage.Null - no image has been set
- \o BorderImage.Ready - the image has been loaded
- \o BorderImage.Loading - the image is currently being loaded
- \o BorderImage.Error - an error occurred while loading the image
+ \li BorderImage.Null - no image has been set
+ \li BorderImage.Ready - the image has been loaded
+ \li BorderImage.Loading - the image is currently being loaded
+ \li BorderImage.Error - an error occurred while loading the image
\endlist
\sa progress
@@ -393,9 +393,9 @@ QQuickScaleGrid *QQuickBorderImage::border()
This property describes how to repeat or stretch the middle parts of the border image.
\list
- \o BorderImage.Stretch - Scales the image to fit to the available area.
- \o BorderImage.Repeat - Tile the image until there is no more space. May crop the last image.
- \o BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
+ \li BorderImage.Stretch - Scales the image to fit to the available area.
+ \li BorderImage.Repeat - Tile the image until there is no more space. May crop the last image.
+ \li BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
\endlist
The default tile mode for each property is BorderImage.Stretch.
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp
index f14eccd9a9..cd3bbbfa2a 100644
--- a/src/quick/items/qquickcanvas.cpp
+++ b/src/quick/items/qquickcanvas.cpp
@@ -607,7 +607,6 @@ void QQuickCanvasPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item,
{
Q_Q(QQuickCanvas);
- Q_UNUSED(item);
Q_ASSERT(item);
Q_ASSERT(scope || item == rootItem);
@@ -618,7 +617,12 @@ void QQuickCanvasPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item,
qWarning() << " activeFocusItem:" << (QObject *)activeFocusItem;
#endif
- QQuickItemPrivate *scopePrivate = scope ? QQuickItemPrivate::get(scope) : 0;
+ QQuickItemPrivate *scopePrivate = 0;
+ if (scope) {
+ scopePrivate = QQuickItemPrivate::get(scope);
+ if ( !scopePrivate->subFocusItem )
+ return;//No focus, nothing to do.
+ }
QQuickItem *oldActiveFocusItem = 0;
QQuickItem *newActiveFocusItem = 0;
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index f8c1281af5..3316169741 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -410,10 +410,10 @@ void QQuickDragAttached::start(QQmlV8Function *args)
The returned drop action may be one of:
\list
- \o Qt.CopyAction Copy the data to the target
- \o Qt.MoveAction Move the data from the source to the target
- \o Qt.LinkAction Create a link from the source to the target.
- \o Qt.IgnoreAction Ignore the action (do nothing with the data).
+ \li Qt.CopyAction Copy the data to the target
+ \li Qt.MoveAction Move the data from the source to the target
+ \li Qt.LinkAction Create a link from the source to the target.
+ \li Qt.IgnoreAction Ignore the action (do nothing with the data).
\endlist
*/
diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp
index ed5fb23658..51ba4c56ec 100644
--- a/src/quick/items/qquickdroparea.cpp
+++ b/src/quick/items/qquickdroparea.cpp
@@ -378,10 +378,10 @@ QStringList QQuickDropEvent::keys() const
The drop action may be one of:
\list
- \o Qt.CopyAction Copy the data to the target
- \o Qt.MoveAction Move the data from the source to the target
- \o Qt.LinkAction Create a link from the source to the target.
- \o Qt.IgnoreAction Ignore the action (do nothing with the data).
+ \li Qt.CopyAction Copy the data to the target
+ \li Qt.MoveAction Move the data from the source to the target
+ \li Qt.LinkAction Create a link from the source to the target.
+ \li Qt.IgnoreAction Ignore the action (do nothing with the data).
\endlist
*/
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 9222a7766d..bf58e4411d 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -117,12 +117,12 @@ Item {
It contains a bitwise combination of:
\list
- \o Qt.NoModifier - No modifier key is pressed.
- \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
- \o Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
- \o Qt.AltModifier - An Alt key on the keyboard is pressed.
- \o Qt.MetaModifier - A Meta key on the keyboard is pressed.
- \o Qt.KeypadModifier - A keypad button is pressed.
+ \li Qt.NoModifier - No modifier key is pressed.
+ \li Qt.ShiftModifier - A Shift key on the keyboard is pressed.
+ \li Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
+ \li Qt.AltModifier - An Alt key on the keyboard is pressed.
+ \li Qt.MetaModifier - A Meta key on the keyboard is pressed.
+ \li Qt.KeypadModifier - A keypad button is pressed.
\endlist
For example, to react to a Shift key + Enter key combination:
@@ -179,9 +179,9 @@ Item {
This property holds the button that caused the event. It can be one of:
\list
- \o Qt.LeftButton
- \o Qt.RightButton
- \o Qt.MiddleButton
+ \li Qt.LeftButton
+ \li Qt.RightButton
+ \li Qt.MiddleButton
\endlist
*/
@@ -202,9 +202,9 @@ Item {
It contains a bitwise combination of:
\list
- \o Qt.LeftButton
- \o Qt.RightButton
- \o Qt.MiddleButton
+ \li Qt.LeftButton
+ \li Qt.RightButton
+ \li Qt.MiddleButton
\endlist
*/
@@ -216,12 +216,12 @@ Item {
It contains a bitwise combination of:
\list
- \o Qt.NoModifier - No modifier key is pressed.
- \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
- \o Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
- \o Qt.AltModifier - An Alt key on the keyboard is pressed.
- \o Qt.MetaModifier - A Meta key on the keyboard is pressed.
- \o Qt.KeypadModifier - A keypad button is pressed.
+ \li Qt.NoModifier - No modifier key is pressed.
+ \li Qt.ShiftModifier - A Shift key on the keyboard is pressed.
+ \li Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
+ \li Qt.AltModifier - An Alt key on the keyboard is pressed.
+ \li Qt.MetaModifier - A Meta key on the keyboard is pressed.
+ \li Qt.KeypadModifier - A keypad button is pressed.
\endlist
For example, to react to a Shift key + Left mouse button click:
@@ -277,9 +277,9 @@ Item {
It contains a bitwise combination of:
\list
- \o Qt.LeftButton
- \o Qt.RightButton
- \o Qt.MiddleButton
+ \li Qt.LeftButton
+ \li Qt.RightButton
+ \li Qt.MiddleButton
\endlist
*/
@@ -317,12 +317,12 @@ Item {
It contains a bitwise combination of:
\list
- \o Qt.NoModifier - No modifier key is pressed.
- \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
- \o Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
- \o Qt.AltModifier - An Alt key on the keyboard is pressed.
- \o Qt.MetaModifier - A Meta key on the keyboard is pressed.
- \o Qt.KeypadModifier - A keypad button is pressed.
+ \li Qt.NoModifier - No modifier key is pressed.
+ \li Qt.ShiftModifier - A Shift key on the keyboard is pressed.
+ \li Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
+ \li Qt.AltModifier - An Alt key on the keyboard is pressed.
+ \li Qt.MetaModifier - A Meta key on the keyboard is pressed.
+ \li Qt.KeypadModifier - A keypad button is pressed.
\endlist
For example, to react to a Control key pressed during the wheel event:
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 82f674741f..b6d3ebd7f2 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
// The number of samples to discard when calculating the flick velocity.
// Touch panels often produce inaccurate results as the finger is lifted.
#ifndef QML_FLICK_DISCARDSAMPLES
-#define QML_FLICK_DISCARDSAMPLES 1
+#define QML_FLICK_DISCARDSAMPLES 0
#endif
// The default maximum velocity of a flick.
@@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
// FlickThreshold determines how far the "mouse" must have moved
// before we perform a flick.
-static const int FlickThreshold = 20;
+static const int FlickThreshold = 15;
// RetainGrabVelocity is the maxmimum instantaneous velocity that
// will ensure the Flickable retains the grab on consecutive flicks.
@@ -771,13 +771,13 @@ QQuickFlickableVisibleArea *QQuickFlickable::visibleArea()
This property determines which directions the view can be flicked.
\list
- \o Flickable.AutoFlickDirection (default) - allows flicking vertically if the
+ \li Flickable.AutoFlickDirection (default) - allows flicking vertically if the
\e contentHeight is not equal to the \e height of the Flickable.
Allows flicking horizontally if the \e contentWidth is not equal
to the \e width of the Flickable.
- \o Flickable.HorizontalFlick - allows flicking horizontally.
- \o Flickable.VerticalFlick - allows flicking vertically.
- \o Flickable.HorizontalAndVerticalFlick - allows flicking in both directions.
+ \li Flickable.HorizontalFlick - allows flicking horizontally.
+ \li Flickable.VerticalFlick - allows flicking vertically.
+ \li Flickable.HorizontalAndVerticalFlick - allows flicking in both directions.
\endlist
*/
QQuickFlickable::FlickableDirection QQuickFlickable::flickableDirection() const
@@ -1030,7 +1030,7 @@ void QQuickFlickablePrivate::handleMouseReleaseEvent(QMouseEvent *event)
vVelocity = (extended && extended->capabilities().testFlag(QTouchDevice::Velocity))
? extended->velocity().y() : vData.velocity;
}
- if (vData.atBeginning || vData.atEnd) {
+ if ((vData.atBeginning && vVelocity > 0.) || (vData.atEnd && vVelocity < 0.)) {
vVelocity /= 2;
} else if (vData.continuousFlickVelocity != 0.0
&& vData.viewSize/q->height() > QML_FLICK_MULTIFLICK_RATIO
@@ -1046,7 +1046,7 @@ void QQuickFlickablePrivate::handleMouseReleaseEvent(QMouseEvent *event)
hVelocity = (extended && extended->capabilities().testFlag(QTouchDevice::Velocity))
? extended->velocity().x() : hData.velocity;
}
- if (hData.atBeginning || hData.atEnd) {
+ if ((hData.atBeginning && hVelocity > 0.) || (hData.atEnd && hVelocity < 0.)) {
hVelocity /= 2;
} else if (hData.continuousFlickVelocity != 0.0
&& hData.viewSize/q->width() > QML_FLICK_MULTIFLICK_RATIO
@@ -1449,11 +1449,11 @@ QQmlListProperty<QQuickItem> QQuickFlickable::flickableChildren()
The \c boundsBehavior can be one of:
\list
- \o Flickable.StopAtBounds - the contents can not be dragged beyond the boundary
+ \li Flickable.StopAtBounds - the contents can not be dragged beyond the boundary
of the flickable, and flicks will not overshoot.
- \o Flickable.DragOverBounds - the contents can be dragged beyond the boundary
+ \li Flickable.DragOverBounds - the contents can be dragged beyond the boundary
of the Flickable, but flicks will not overshoot.
- \o Flickable.DragAndOvershootBounds (default) - the contents can be dragged
+ \li Flickable.DragAndOvershootBounds (default) - the contents can be dragged
beyond the boundary of the Flickable, and can overshoot the
boundary when flicked.
\endlist
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index 78899b27e5..1fab4a8c99 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -66,13 +66,22 @@ QT_BEGIN_NAMESPACE
class FxGridItemSG : public FxViewItem
{
public:
- FxGridItemSG(QQuickItem *i, QQuickGridView *v, bool own) : FxViewItem(i, own), view(v) {
+ FxGridItemSG(QQuickItem *i, QQuickGridView *v, bool own, bool trackGeometry) : FxViewItem(i, own, trackGeometry), view(v) {
attached = static_cast<QQuickGridViewAttached*>(qmlAttachedPropertiesObject<QQuickGridView>(item));
if (attached)
static_cast<QQuickGridViewAttached*>(attached)->setView(view);
+ if (trackGeometry) {
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->addItemChangeListener(QQuickItemViewPrivate::get(view), QQuickItemPrivate::Geometry);
+ }
}
- ~FxGridItemSG() {}
+ ~FxGridItemSG() {
+ if (trackGeom) {
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->removeItemChangeListener(QQuickItemViewPrivate::get(view), QQuickItemPrivate::Geometry);
+ }
+ }
qreal position() const {
return rowPos();
@@ -423,7 +432,7 @@ FxViewItem *QQuickGridViewPrivate::newViewItem(int modelIndex, QQuickItem *item)
{
Q_Q(QQuickGridView);
Q_UNUSED(modelIndex);
- return new FxGridItemSG(item, q, false);
+ return new FxGridItemSG(item, q, false, false);
}
void QQuickGridViewPrivate::initializeViewItem(FxViewItem *item)
@@ -685,7 +694,7 @@ void QQuickGridViewPrivate::createHighlight()
if (currentItem) {
QQuickItem *item = createHighlightItem();
if (item) {
- FxGridItemSG *newHighlight = new FxGridItemSG(item, q, true);
+ FxGridItemSG *newHighlight = new FxGridItemSG(item, q, true, true);
if (autoHighlight)
resetHighlightPosition();
highlightXAnimator = new QSmoothedAnimation;
@@ -760,11 +769,11 @@ void QQuickGridViewPrivate::updateFooter()
Q_Q(QQuickGridView);
bool created = false;
if (!footer) {
- QQuickItem *item = createComponentItem(footerComponent, true);
+ QQuickItem *item = createComponentItem(footerComponent);
if (!item)
return;
item->setZ(1);
- footer = new FxGridItemSG(item, q, true);
+ footer = new FxGridItemSG(item, q, true, true);
created = true;
}
@@ -799,11 +808,11 @@ void QQuickGridViewPrivate::updateHeader()
Q_Q(QQuickGridView);
bool created = false;
if (!header) {
- QQuickItem *item = createComponentItem(headerComponent, true);
+ QQuickItem *item = createComponentItem(headerComponent);
if (!item)
return;
item->setZ(1);
- header = new FxGridItemSG(item, q, true);
+ header = new FxGridItemSG(item, q, true, true);
created = true;
}
@@ -1344,13 +1353,13 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
Valid values for \c highlightRangeMode are:
\list
- \o GridView.ApplyRange - the view attempts to maintain the highlight within the range.
+ \li GridView.ApplyRange - the view attempts to maintain the highlight within the range.
However, the highlight can move outside of the range at the ends of the view or due
to mouse interaction.
- \o GridView.StrictlyEnforceRange - the highlight never moves outside of the range.
+ \li GridView.StrictlyEnforceRange - the highlight never moves outside of the range.
The current item changes if a keyboard or mouse action would cause the highlight to move
outside of the range.
- \o GridView.NoHighlightRange - this is the default value.
+ \li GridView.NoHighlightRange - this is the default value.
\endlist
*/
@@ -1362,13 +1371,13 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
Possible values:
\list
- \o Qt.LeftToRight (default) - Items will be laid out starting in the top, left corner. The flow is
+ \li Qt.LeftToRight (default) - Items will be laid out starting in the top, left corner. The flow is
dependent on the \l GridView::flow property.
- \o Qt.RightToLeft - Items will be laid out starting in the top, right corner. The flow is dependent
+ \li Qt.RightToLeft - Items will be laid out starting in the top, right corner. The flow is dependent
on the \l GridView::flow property.
\endlist
- \bold Note: If GridView::flow is set to GridView.LeftToRight, this is not to be confused if
+ \b Note: If GridView::flow is set to GridView.LeftToRight, this is not to be confused if
GridView::layoutDirection is set to Qt.RightToLeft. The GridView.LeftToRight flow value simply
indicates that the flow is horizontal.
*/
@@ -1437,8 +1446,8 @@ void QQuickGridView::setHighlightMoveDuration(int duration)
Possible values:
\list
- \o GridView.LeftToRight (default) - Items are laid out from left to right, and the view scrolls vertically
- \o GridView.TopToBottom - Items are laid out from top to bottom, and the view scrolls horizontally
+ \li GridView.LeftToRight (default) - Items are laid out from left to right, and the view scrolls vertically
+ \li GridView.TopToBottom - Items are laid out from top to bottom, and the view scrolls horizontally
\endlist
*/
QQuickGridView::Flow QQuickGridView::flow() const
@@ -1517,10 +1526,10 @@ void QQuickGridView::setCellHeight(qreal cellHeight)
The possible values are:
\list
- \o GridView.NoSnap (default) - the view stops anywhere within the visible area.
- \o GridView.SnapToRow - the view settles with a row (or column for \c GridView.TopToBottom flow)
+ \li GridView.NoSnap (default) - the view stops anywhere within the visible area.
+ \li GridView.SnapToRow - the view settles with a row (or column for \c GridView.TopToBottom flow)
aligned with the start of the view.
- \o GridView.SnapOneRow - the view will settle no more than one row (or column for \c GridView.TopToBottom flow)
+ \li GridView.SnapOneRow - the view will settle no more than one row (or column for \c GridView.TopToBottom flow)
away from the first visible row at the time the mouse button is released.
This mode is particularly useful for moving one page at a time.
\endlist
@@ -1590,9 +1599,9 @@ void QQuickGridView::setSnapMode(SnapMode mode)
It is applied to all items that are created when:
\list
- \o The view is first created
- \o The view's \l model changes
- \o The view's \l model is \l {QAbstractItemModel::reset}{reset}, if the model is a QAbstractItemModel subclass
+ \li The view is first created
+ \li The view's \l model changes
+ \li The view's \l model is \l {QAbstractItemModel::reset}{reset}, if the model is a QAbstractItemModel subclass
\endlist
For example, here is a view that specifies such a transition:
@@ -1971,7 +1980,7 @@ void QQuickGridView::geometryChanged(const QRectF &newGeometry, const QRectF &ol
The current index will wrap if keyNavigationWraps is true and it
is currently at the end. This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
@@ -2001,7 +2010,7 @@ void QQuickGridView::moveCurrentIndexUp()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end. This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickGridView::moveCurrentIndexDown()
{
@@ -2029,7 +2038,7 @@ void QQuickGridView::moveCurrentIndexDown()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end. This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickGridView::moveCurrentIndexLeft()
{
@@ -2072,7 +2081,7 @@ void QQuickGridView::moveCurrentIndexLeft()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end. This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickGridView::moveCurrentIndexRight()
{
@@ -2307,12 +2316,12 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
\a mode:
\list
- \o GridView.Beginning - position item at the top (or left for \c GridView.TopToBottom flow) of the view.
- \o GridView.Center - position item in the center of the view.
- \o GridView.End - position item at bottom (or right for horizontal orientation) of the view.
- \o GridView.Visible - if any part of the item is visible then take no action, otherwise
+ \li GridView.Beginning - position item at the top (or left for \c GridView.TopToBottom flow) of the view.
+ \li GridView.Center - position item in the center of the view.
+ \li GridView.End - position item at bottom (or right for horizontal orientation) of the view.
+ \li GridView.Visible - if any part of the item is visible then take no action, otherwise
bring the item into view.
- \o GridView.Contain - ensure the entire item is visible. If the item is larger than
+ \li GridView.Contain - ensure the entire item is visible. If the item is larger than
the view the item is positioned at the top (or left for \c GridView.TopToBottom flow) of the view.
\endlist
@@ -2324,7 +2333,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
of the view does not cause all other items to be repositioned.
The correct way to bring an item into view is with \c positionViewAtIndex.
- \bold Note: methods should only be called after the Component has completed. To position
+ \b Note: methods should only be called after the Component has completed. To position
the view at startup, this method should be called by Component.onCompleted. For
example, to position the view at the end:
@@ -2344,7 +2353,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
of the list does not cause all other items to be repositioned, and because
the actual start of the view can vary based on the size of the delegates.
- \bold Note: methods should only be called after the Component has completed. To position
+ \b Note: methods should only be called after the Component has completed. To position
the view at startup, this method should be called by Component.onCompleted. For
example, to position the view at the end on startup:
@@ -2363,7 +2372,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
If the item is outside the visible area, -1 is returned, regardless of
whether an item will exist at that point when scrolled into view.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
/*!
@@ -2376,7 +2385,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
If the item is outside the visible area, null is returned, regardless of
whether an item will exist at that point when scrolled into view.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
QQuickGridViewAttached *QQuickGridView::qmlAttachedProperties(QObject *obj)
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index a939365e98..2346689178 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -142,7 +142,7 @@ QQuickImagePrivate::QQuickImagePrivate()
Images are cached and shared internally, so if several Image elements have the same \l source,
only one copy of the image will be loaded.
- \bold Note: Images are often the greatest user of memory in QML user interfaces. It is recommended
+ \b Note: Images are often the greatest user of memory in QML user interfaces. It is recommended
that images which do not form part of the user interface have their
size bounded via the \l sourceSize property. This is especially important for content
that is loaded from external sources or provided by the user.
@@ -185,20 +185,20 @@ void QQuickImagePrivate::setImage(const QImage &image)
than the item.
\list
- \o Image.Stretch - the image is scaled to fit
- \o Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping
- \o Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
- \o Image.Tile - the image is duplicated horizontally and vertically
- \o Image.TileVertically - the image is stretched horizontally and tiled vertically
- \o Image.TileHorizontally - the image is stretched vertically and tiled horizontally
- \o Image.Pad - the image is not transformed
+ \li Image.Stretch - the image is scaled to fit
+ \li Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping
+ \li Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
+ \li Image.Tile - the image is duplicated horizontally and vertically
+ \li Image.TileVertically - the image is stretched horizontally and tiled vertically
+ \li Image.TileHorizontally - the image is stretched vertically and tiled horizontally
+ \li Image.Pad - the image is not transformed
\endlist
\table
\row
- \o \image declarative-qtlogo-stretch.png
- \o Stretch (default)
+ \li \image declarative-qtlogo-stretch.png
+ \li Stretch (default)
\qml
Image {
width: 130; height: 100
@@ -208,8 +208,8 @@ void QQuickImagePrivate::setImage(const QImage &image)
\endqml
\row
- \o \image declarative-qtlogo-preserveaspectfit.png
- \o PreserveAspectFit
+ \li \image declarative-qtlogo-preserveaspectfit.png
+ \li PreserveAspectFit
\qml
Image {
width: 130; height: 100
@@ -220,8 +220,8 @@ void QQuickImagePrivate::setImage(const QImage &image)
\endqml
\row
- \o \image declarative-qtlogo-preserveaspectcrop.png
- \o PreserveAspectCrop
+ \li \image declarative-qtlogo-preserveaspectcrop.png
+ \li PreserveAspectCrop
\qml
Image {
width: 130; height: 100
@@ -233,8 +233,8 @@ void QQuickImagePrivate::setImage(const QImage &image)
\endqml
\row
- \o \image declarative-qtlogo-tile.png
- \o Tile
+ \li \image declarative-qtlogo-tile.png
+ \li Tile
\qml
Image {
width: 120; height: 120
@@ -244,8 +244,8 @@ void QQuickImagePrivate::setImage(const QImage &image)
\endqml
\row
- \o \image declarative-qtlogo-tilevertically.png
- \o TileVertically
+ \li \image declarative-qtlogo-tilevertically.png
+ \li TileVertically
\qml
Image {
width: 120; height: 120
@@ -256,8 +256,8 @@ void QQuickImagePrivate::setImage(const QImage &image)
\endqml
\row
- \o \image declarative-qtlogo-tilehorizontally.png
- \o TileHorizontally
+ \li \image declarative-qtlogo-tilehorizontally.png
+ \li TileHorizontally
\qml
Image {
width: 120; height: 120
@@ -319,22 +319,22 @@ qreal QQuickImage::paintedHeight() const
This property holds the status of image loading. It can be one of:
\list
- \o Image.Null - no image has been set
- \o Image.Ready - the image has been loaded
- \o Image.Loading - the image is currently being loaded
- \o Image.Error - an error occurred while loading the image
+ \li Image.Null - no image has been set
+ \li Image.Ready - the image has been loaded
+ \li Image.Loading - the image is currently being loaded
+ \li Image.Error - an error occurred while loading the image
\endlist
Use this status to provide an update or respond to the status change in some way.
For example, you could:
\list
- \o Trigger a state change:
+ \li Trigger a state change:
\qml
State { name: 'loaded'; when: image.status == Image.Ready }
\endqml
- \o Implement an \c onStatusChanged signal handler:
+ \li Implement an \c onStatusChanged signal handler:
\qml
Image {
id: image
@@ -342,7 +342,7 @@ qreal QQuickImage::paintedHeight() const
}
\endqml
- \o Bind to the status value:
+ \li Bind to the status value:
\qml
Text { text: image.status == Image.Ready ? 'Loaded' : 'Not loaded' }
\endqml
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 8e351f1527..423fb0f40c 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -116,9 +116,9 @@ void QQuickItemPrivate::registerAccessorProperties()
The following concrete Transform types are available:
\list
- \o \l Rotation
- \o \l Scale
- \o \l Translate
+ \li \l Rotation
+ \li \l Scale
+ \li \l Translate
\endlist
The Transform elements let you create and control advanced transformations that can be configured
@@ -696,10 +696,10 @@ void QQuickKeyNavigationAttached::setBacktab(QQuickItem *i)
or after the attached item's own key handling.
\list
- \o KeyNavigation.BeforeItem - process the key events before normal
+ \li KeyNavigation.BeforeItem - process the key events before normal
item key processing. If the event is used for key navigation, it will be accepted and will not
be passed on to the item.
- \o KeyNavigation.AfterItem (default) - process the key events after normal item key
+ \li KeyNavigation.AfterItem (default) - process the key events after normal item key
handling. If the item accepts the key event it will not be
handled by the KeyNavigation attached property handler.
\endlist
@@ -933,21 +933,21 @@ bool QQuickKeysAttachedPrivate::isConnected(const char *signalName)
If \l priority is Keys.BeforeItem (default) the order of key event processing is:
\list 1
- \o Items specified in \c forwardTo
- \o specific key handlers, e.g. onReturnPressed
- \o onKeyPress, onKeyRelease handlers
- \o Item specific key handling, e.g. TextInput key handling
- \o parent item
+ \li Items specified in \c forwardTo
+ \li specific key handlers, e.g. onReturnPressed
+ \li onKeyPress, onKeyRelease handlers
+ \li Item specific key handling, e.g. TextInput key handling
+ \li parent item
\endlist
If priority is Keys.AfterItem the order of key event processing is:
\list 1
- \o Item specific key handling, e.g. TextInput key handling
- \o Items specified in \c forwardTo
- \o specific key handlers, e.g. onReturnPressed
- \o onKeyPress, onKeyRelease handlers
- \o parent item
+ \li Item specific key handling, e.g. TextInput key handling
+ \li Items specified in \c forwardTo
+ \li specific key handlers, e.g. onReturnPressed
+ \li onKeyPress, onKeyRelease handlers
+ \li parent item
\endlist
If the event is accepted during any of the above steps, key
@@ -970,10 +970,10 @@ bool QQuickKeysAttachedPrivate::isConnected(const char *signalName)
or after the attached item's own key handling.
\list
- \o Keys.BeforeItem (default) - process the key events before normal
+ \li Keys.BeforeItem (default) - process the key events before normal
item key processing. If the event is accepted it will not
be passed on to the item.
- \o Keys.AfterItem - process the key events after normal item key
+ \li Keys.AfterItem - process the key events after normal item key
handling. If the item accepts the key event it will not be
handled by the Keys attached property handler.
\endlist
@@ -2644,8 +2644,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
\table
\row
- \o \image declarative-item_stacking1.png
- \o Same \c z - later children above earlier children:
+ \li \image declarative-item_stacking1.png
+ \li Same \c z - later children above earlier children:
\qml
Item {
Rectangle {
@@ -2659,8 +2659,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
}
\endqml
\row
- \o \image declarative-item_stacking2.png
- \o Higher \c z on top:
+ \li \image declarative-item_stacking2.png
+ \li Higher \c z on top:
\qml
Item {
Rectangle {
@@ -2675,8 +2675,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
}
\endqml
\row
- \o \image declarative-item_stacking3.png
- \o Same \c z - children above parents:
+ \li \image declarative-item_stacking3.png
+ \li Same \c z - children above parents:
\qml
Item {
Rectangle {
@@ -2690,8 +2690,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
}
\endqml
\row
- \o \image declarative-item_stacking4.png
- \o Lower \c z below:
+ \li \image declarative-item_stacking4.png
+ \li Lower \c z below:
\qml
Item {
Rectangle {
@@ -2769,8 +2769,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
\table
\row
- \o \image declarative-anchors_example.png
- \o Text anchored to Image, horizontally centered and vertically below, with a margin.
+ \li \image declarative-anchors_example.png
+ \li Text anchored to Image, horizontally centered and vertically below, with a margin.
\qml
Item {
Image {
@@ -2787,8 +2787,8 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
}
\endqml
\row
- \o \image declarative-anchors_example2.png
- \o
+ \li \image declarative-anchors_example2.png
+ \li
Left of Text anchored to right of Image, with a margin. The y
property of both defaults to 0.
@@ -3018,7 +3018,6 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event)
void QQuickItem::focusInEvent(QFocusEvent *)
{
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, 0));
}
void QQuickItem::focusOutEvent(QFocusEvent *)
@@ -3734,8 +3733,8 @@ void QQuickItem::setZ(qreal v)
\table
\row
- \o \image declarative-rotation.png
- \o
+ \li \image declarative-rotation.png
+ \li
\qml
Rectangle {
color: "blue"
@@ -3768,8 +3767,8 @@ void QQuickItem::setZ(qreal v)
\table
\row
- \o \image declarative-scale.png
- \o
+ \li \image declarative-scale.png
+ \li
\qml
Rectangle {
color: "blue"
@@ -3805,8 +3804,8 @@ void QQuickItem::setZ(qreal v)
\table
\row
- \o \image declarative-item_opacity1.png
- \o
+ \li \image declarative-item_opacity1.png
+ \li
\qml
Item {
Rectangle {
@@ -3820,8 +3819,8 @@ void QQuickItem::setZ(qreal v)
}
\endqml
\row
- \o \image declarative-item_opacity2.png
- \o
+ \li \image declarative-item_opacity2.png
+ \li
\qml
Item {
Rectangle {
@@ -3990,9 +3989,6 @@ bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible)
itemChange(QQuickItem::ItemVisibleHasChanged, effectiveVisible);
- if (isAccessible)
- QAccessible::updateAccessibility(QAccessibleEvent(effectiveVisible ? QAccessible::ObjectShow : QAccessible::ObjectHide, q, 0));
-
emit q->visibleChanged();
if (childVisibilityChanged)
emit q->visibleChildrenChanged();
@@ -4445,7 +4441,7 @@ qreal QQuickItem::implicitWidth() const
}
\endqml
- \bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
+ \b Note: using implicitWidth of Text or TextEdit and setting the width explicitly
incurs a performance penalty as the text must be laid out twice.
*/
@@ -5638,9 +5634,9 @@ void QQuickItemLayer::setMipmap(bool mipmap)
allow you to save some texture memory.
\list
- \o ShaderEffectSource.Alpha - GL_ALPHA
- \o ShaderEffectSource.RGB - GL_RGB
- \o ShaderEffectSource.RGBA - GL_RGBA
+ \li ShaderEffectSource.Alpha - GL_ALPHA
+ \li ShaderEffectSource.RGB - GL_RGB
+ \li ShaderEffectSource.RGBA - GL_RGBA
\endlist
\note Some OpenGL implementations do not support the GL_ALPHA format.
@@ -5735,10 +5731,10 @@ void QQuickItemLayer::setSize(const QSize &size)
specified.
\list
- \o ShaderEffectSource.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically
- \o ShaderEffectSource.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically
- \o ShaderEffectSource.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically
- \o ShaderEffectSource.Repeat - GL_REPEAT both horizontally and vertically
+ \li ShaderEffectSource.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically
+ \li ShaderEffectSource.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically
+ \li ShaderEffectSource.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically
+ \li ShaderEffectSource.Repeat - GL_REPEAT both horizontally and vertically
\endlist
\note Some OpenGL ES 2 implementations do not support the GL_REPEAT
@@ -5747,7 +5743,7 @@ void QQuickItemLayer::setSize(const QSize &size)
void QQuickItemLayer::setWrapMode(QQuickShaderEffectSource::WrapMode mode)
{
- if (mode != m_wrapMode)
+ if (mode == m_wrapMode)
return;
m_wrapMode = mode;
diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp
index 32f1047e51..a1c398eeb6 100644
--- a/src/quick/items/qquickitemanimation.cpp
+++ b/src/quick/items/qquickitemanimation.cpp
@@ -701,12 +701,12 @@ void QQuickPathAnimation::setTargetObject(QQuickItem *target)
item to achieve the specified orientation as it travels along the path.
\list
- \o PathAnimation.Fixed (default) - the PathAnimation will not control
+ \li PathAnimation.Fixed (default) - the PathAnimation will not control
the rotation of the item.
- \o PathAnimation.RightFirst - The right side of the item will lead along the path.
- \o PathAnimation.LeftFirst - The left side of the item will lead along the path.
- \o PathAnimation.BottomFirst - The bottom of the item will lead along the path.
- \o PathAnimation.TopFirst - The top of the item will lead along the path.
+ \li PathAnimation.RightFirst - The right side of the item will lead along the path.
+ \li PathAnimation.LeftFirst - The left side of the item will lead along the path.
+ \li PathAnimation.BottomFirst - The bottom of the item will lead along the path.
+ \li PathAnimation.TopFirst - The top of the item will lead along the path.
\endlist
*/
QQuickPathAnimation::Orientation QQuickPathAnimation::orientation() const
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index 501b206ef6..50a3216bf0 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -45,11 +45,12 @@
QT_BEGIN_NAMESPACE
-FxViewItem::FxViewItem(QQuickItem *i, bool own)
+FxViewItem::FxViewItem(QQuickItem *i, bool own, bool trackGeometry)
: item(i)
, transitionableItem(0)
, ownItem(own)
, releaseAfterTransition(false)
+ , trackGeom(trackGeometry)
{
}
@@ -257,8 +258,8 @@ void QQuickItemView::setModel(const QVariant &model)
QQuickVisualModel *oldModel = d->model;
d->clear();
- d->setPosition(d->contentStartOffset());
d->model = 0;
+ d->setPosition(d->contentStartOffset());
d->modelVariant = model;
QObject *object = qvariant_cast<QObject*>(model);
@@ -2195,10 +2196,10 @@ bool QQuickItemViewPrivate::releaseItem(FxViewItem *item)
QQuickItem *QQuickItemViewPrivate::createHighlightItem()
{
- return createComponentItem(highlightComponent, true, true);
+ return createComponentItem(highlightComponent, true);
}
-QQuickItem *QQuickItemViewPrivate::createComponentItem(QQmlComponent *component, bool receiveItemGeometryChanges, bool createDefault)
+QQuickItem *QQuickItemViewPrivate::createComponentItem(QQmlComponent *component, bool createDefault)
{
Q_Q(QQuickItemView);
@@ -2222,10 +2223,6 @@ QQuickItem *QQuickItemViewPrivate::createComponentItem(QQmlComponent *component,
if (item) {
QQml_setParent_noEvent(item, q->contentItem());
item->setParentItem(q->contentItem());
- if (receiveItemGeometryChanges) {
- QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
- itemPrivate->addItemChangeListener(this, QQuickItemPrivate::Geometry);
- }
}
return item;
}
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index dfc0a8bc7e..7516761ee8 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -60,7 +60,7 @@ QT_MODULE(Quick)
class FxViewItem
{
public:
- FxViewItem(QQuickItem *, bool own);
+ FxViewItem(QQuickItem *, bool own, bool trackGeometry);
virtual ~FxViewItem();
qreal itemX() const;
@@ -92,6 +92,7 @@ public:
int index;
bool ownItem;
bool releaseAfterTransition;
+ bool trackGeom;
};
@@ -124,6 +125,8 @@ public:
QQuickItemViewPrivate();
~QQuickItemViewPrivate();
+ static inline QQuickItemViewPrivate *get(QQuickItemView *o) { return o->d_func(); }
+
struct ChangeResult {
QQmlNullableValue<qreal> visiblePos;
bool changedFirstItem;
@@ -191,7 +194,7 @@ public:
virtual bool releaseItem(FxViewItem *item);
QQuickItem *createHighlightItem();
- QQuickItem *createComponentItem(QQmlComponent *component, bool receiveItemGeometryChanges, bool createDefault = false);
+ QQuickItem *createComponentItem(QQmlComponent *component, bool createDefault = false);
void updateCurrent(int modelIndex);
void updateTrackedItem();
diff --git a/src/quick/items/qquickitemviewtransition.cpp b/src/quick/items/qquickitemviewtransition.cpp
index 823269bfc1..cdc1c19518 100644
--- a/src/quick/items/qquickitemviewtransition.cpp
+++ b/src/quick/items/qquickitemviewtransition.cpp
@@ -579,14 +579,14 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
operations:
\list
- \o \c populate - the transition to run when a view is created, or when the model changes
- \o \c add - the transition to apply to items that are added to the view
- \o \c remove - the transition to apply to items that are removed from the view
- \o \c move - the transition to apply to items that are moved within the view (i.e. as a result
+ \li \c populate - the transition to run when a view is created, or when the model changes
+ \li \c add - the transition to apply to items that are added to the view
+ \li \c remove - the transition to apply to items that are removed from the view
+ \li \c move - the transition to apply to items that are moved within the view (i.e. as a result
of a move operation in the model)
- \o \c displaced - the generic transition to be applied to any items that are displaced by an
+ \li \c displaced - the generic transition to be applied to any items that are displaced by an
add, move or remove operation
- \o \c addDisplaced, \c removeDisplaced and \c moveDisplaced - the transitions to be applied when
+ \li \c addDisplaced, \c removeDisplaced and \c moveDisplaced - the transitions to be applied when
items are displaced by add, move, or remove operations, respectively (these override the
generic displaced transition if specified)
\endlist
@@ -595,9 +595,9 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
items rather than data models, the following properties are used instead:
\list
- \o \c add - the transition to apply to items that are created for the positioner, added to
+ \li \c add - the transition to apply to items that are created for the positioner, added to
or reparented to the positioner, or items that have become \l {Item::}{visible}
- \o \c move - the transition to apply to items that have moved within the positioner, including
+ \li \c move - the transition to apply to items that have moved within the positioner, including
when they are displaced due to the addition or removal of other items, or when items are otherwise
rearranged within the positioner, or when items are repositioned due to the resizing of other
items in the positioner
@@ -612,17 +612,17 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
which the transition is applied:
\list
- \o ViewTransition.item - the item that is under transition
- \o ViewTransition.index - the index of this item
- \o ViewTransition.destination - the (x,y) point to which this item is moving for the relevant view operation
+ \li ViewTransition.item - the item that is under transition
+ \li ViewTransition.index - the index of this item
+ \li ViewTransition.destination - the (x,y) point to which this item is moving for the relevant view operation
\endlist
In addition, ViewTransition provides properties specific to the items which are the target
of the operation that triggered the transition:
\list
- \o ViewTransition.targetIndexes - the indexes of the target items
- \o ViewTransition.targetItems - the target items themselves
+ \li ViewTransition.targetIndexes - the indexes of the target items
+ \li ViewTransition.targetItems - the target items themselves
\endlist
(Note that for the \l Row, \l Column, \l Grid and \l Flow positioner elements, the \c move transition only
@@ -679,29 +679,29 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
\table
\header
- \o Property
- \o Value
- \o Explanation
+ \li Property
+ \li Value
+ \li Explanation
\row
- \o ViewTransition.item
- \o "Item 0" delegate instance
- \o The "Item 0" \l Rectangle object itself
+ \li ViewTransition.item
+ \li "Item 0" delegate instance
+ \li The "Item 0" \l Rectangle object itself
\row
- \o ViewTransition.index
- \o \c int value of 4
- \o The index of "Item 0" within the model following the add operation
+ \li ViewTransition.index
+ \li \c int value of 4
+ \li The index of "Item 0" within the model following the add operation
\row
- \o ViewTransition.destination
- \o \l point value of (0, 120)
- \o The position that "Item 0" is moving to
+ \li ViewTransition.destination
+ \li \l point value of (0, 120)
+ \li The position that "Item 0" is moving to
\row
- \o ViewTransition.targetIndexes
- \o \c int array, just contains the integer "0" (zero)
- \o The index of "Item 4", the new item added to the view
+ \li ViewTransition.targetIndexes
+ \li \c int array, just contains the integer "0" (zero)
+ \li The index of "Item 4", the new item added to the view
\row
- \o ViewTransition.targetItems
- \o object array, just contains the "Item 4" delegate instance
- \o The "Item 4" \l Rectangle object - the new item added to the view
+ \li ViewTransition.targetItems
+ \li object array, just contains the "Item 4" delegate instance
+ \li The "Item 4" \l Rectangle object - the new item added to the view
\endtable
The ViewTransition.targetIndexes and ViewTransition.targetItems lists provide the items and
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 9db2060d89..6f33545185 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -236,13 +236,22 @@ void QQuickViewSection::setLabelPositioning(int l)
class FxListItemSG : public FxViewItem
{
public:
- FxListItemSG(QQuickItem *i, QQuickListView *v, bool own) : FxViewItem(i, own), view(v) {
+ FxListItemSG(QQuickItem *i, QQuickListView *v, bool own, bool trackGeometry) : FxViewItem(i, own, trackGeometry), view(v) {
attached = static_cast<QQuickListViewAttached*>(qmlAttachedPropertiesObject<QQuickListView>(item));
if (attached)
static_cast<QQuickListViewAttached*>(attached)->setView(view);
+ if (trackGeometry) {
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->addItemChangeListener(QQuickItemViewPrivate::get(view), QQuickItemPrivate::Geometry);
+ }
}
- ~FxListItemSG() {}
+ ~FxListItemSG() {
+ if (trackGeom) {
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ itemPrivate->removeItemChangeListener(QQuickItemViewPrivate::get(view), QQuickItemPrivate::Geometry);
+ }
+ }
inline QQuickItem *section() const {
return attached ? static_cast<QQuickListViewAttached*>(attached)->m_sectionItem : 0;
@@ -524,7 +533,9 @@ void QQuickListViewPrivate::clear()
sectionCache[i] = 0;
}
visiblePos = 0;
+ releaseSectionItem(currentSectionItem);
currentSectionItem = 0;
+ releaseSectionItem(nextSectionItem);
nextSectionItem = 0;
lastVisibleSection = QString();
QQuickItemViewPrivate::clear();
@@ -534,7 +545,7 @@ FxViewItem *QQuickListViewPrivate::newViewItem(int modelIndex, QQuickItem *item)
{
Q_Q(QQuickListView);
- FxListItemSG *listItem = new FxListItemSG(item, q, false);
+ FxListItemSG *listItem = new FxListItemSG(item, q, false, false);
listItem->index = modelIndex;
// initialise attached properties
@@ -833,7 +844,7 @@ void QQuickListViewPrivate::createHighlight()
if (currentItem) {
QQuickItem *item = createHighlightItem();
if (item) {
- FxListItemSG *newHighlight = new FxListItemSG(item, q, true);
+ FxListItemSG *newHighlight = new FxListItemSG(item, q, true, true);
if (autoHighlight) {
newHighlight->setSize(static_cast<FxListItemSG*>(currentItem)->itemSize());
@@ -933,6 +944,8 @@ QQuickItem * QQuickListViewPrivate::getSectionItem(const QString &section)
void QQuickListViewPrivate::releaseSectionItem(QQuickItem *item)
{
+ if (!item)
+ return;
int i = 0;
do {
if (!sectionCache[i]) {
@@ -970,7 +983,7 @@ void QQuickListViewPrivate::updateInlineSection(FxListItemSG *listItem)
void QQuickListViewPrivate::updateStickySections()
{
- if (!sectionCriteria || visibleItems.isEmpty()
+ if (!sectionCriteria
|| (!sectionCriteria->labelPositioning() && !currentSectionItem && !nextSectionItem))
return;
@@ -1006,7 +1019,7 @@ void QQuickListViewPrivate::updateStickySections()
}
// Current section header
- if (sectionCriteria->labelPositioning() & QQuickViewSection::CurrentLabelAtStart) {
+ if (sectionCriteria->labelPositioning() & QQuickViewSection::CurrentLabelAtStart && isValid() && visibleItems.count()) {
if (!currentSectionItem) {
currentSectionItem = getSectionItem(currentSection);
} else if (currentStickySection != currentSection) {
@@ -1039,7 +1052,7 @@ void QQuickListViewPrivate::updateStickySections()
}
// Next section footer
- if (sectionCriteria->labelPositioning() & QQuickViewSection::NextLabelAtEnd) {
+ if (sectionCriteria->labelPositioning() & QQuickViewSection::NextLabelAtEnd && isValid() && visibleItems.count()) {
if (!nextSectionItem) {
nextSectionItem = getSectionItem(nextSection);
} else if (nextStickySection != nextSection) {
@@ -1077,7 +1090,7 @@ void QQuickListViewPrivate::updateSections()
QQuickItemViewPrivate::updateSections();
- if (sectionCriteria && !visibleItems.isEmpty()) {
+ if (sectionCriteria && !visibleItems.isEmpty() && isValid()) {
QString prevSection;
if (visibleIndex > 0)
prevSection = sectionAt(visibleIndex-1);
@@ -1234,11 +1247,11 @@ void QQuickListViewPrivate::updateFooter()
Q_Q(QQuickListView);
bool created = false;
if (!footer) {
- QQuickItem *item = createComponentItem(footerComponent, true);
+ QQuickItem *item = createComponentItem(footerComponent);
if (!item)
return;
item->setZ(1);
- footer = new FxListItemSG(item, q, true);
+ footer = new FxListItemSG(item, q, true, true);
created = true;
}
@@ -1265,11 +1278,11 @@ void QQuickListViewPrivate::updateHeader()
Q_Q(QQuickListView);
bool created = false;
if (!header) {
- QQuickItem *item = createComponentItem(headerComponent, true);
+ QQuickItem *item = createComponentItem(headerComponent);
if (!item)
return;
item->setZ(1);
- header = new FxListItemSG(item, q, true);
+ header = new FxListItemSG(item, q, true, true);
created = true;
}
@@ -1848,13 +1861,13 @@ QQuickListView::~QQuickListView()
Valid values for \c highlightRangeMode are:
\list
- \o ListView.ApplyRange - the view attempts to maintain the highlight within the range.
+ \li ListView.ApplyRange - the view attempts to maintain the highlight within the range.
However, the highlight can move outside of the range at the ends of the list or due
to mouse interaction.
- \o ListView.StrictlyEnforceRange - the highlight never moves outside of the range.
+ \li ListView.StrictlyEnforceRange - the highlight never moves outside of the range.
The current item changes if a keyboard or mouse action would cause the highlight to move
outside of the range.
- \o ListView.NoHighlightRange - this is the default value.
+ \li ListView.NoHighlightRange - this is the default value.
\endlist
*/
void QQuickListView::setHighlightFollowsCurrentItem(bool autoHighlight)
@@ -1902,17 +1915,17 @@ void QQuickListView::setSpacing(qreal spacing)
Possible values:
\list
- \o ListView.Horizontal - Items are laid out horizontally
- \o ListView.Vertical (default) - Items are laid out vertically
+ \li ListView.Horizontal - Items are laid out horizontally
+ \li ListView.Vertical (default) - Items are laid out vertically
\endlist
\table
\row
- \o Horizontal orientation:
+ \li Horizontal orientation:
\image ListViewHorizontal.png
\row
- \o Vertical orientation:
+ \li Vertical orientation:
\image listview-highlight.png
\endtable
*/
@@ -1948,8 +1961,8 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation)
Possible values:
\list
- \o Qt.LeftToRight (default) - Items will be laid out from left to right.
- \o Qt.RightToLeft - Items will be laid out from right to let.
+ \li Qt.LeftToRight (default) - Items will be laid out from left to right.
+ \li Qt.RightToLeft - Items will be laid out from right to let.
\endlist
\sa ListView::effectiveLayoutDirection
@@ -2020,9 +2033,9 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation)
\c section.property. This value can be one of:
\list
- \o ViewSection.FullString (default) - sections are created based on the
+ \li ViewSection.FullString (default) - sections are created based on the
\c section.property value.
- \o ViewSection.FirstCharacter - sections are created based on the first
+ \li ViewSection.FirstCharacter - sections are created based on the first
character of the \c section.property value (for example, 'A', 'B', 'C'
sections, etc. for an address book)
\endlist
@@ -2034,11 +2047,11 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation)
the labels are shown inline. This value can be a combination of:
\list
- \o ViewSection.InlineLabels - section labels are shown inline between
+ \li ViewSection.InlineLabels - section labels are shown inline between
the item delegates separating sections (default).
- \o ViewSection.CurrentLabelAtStart - the current section label sticks to the
+ \li ViewSection.CurrentLabelAtStart - the current section label sticks to the
start of the view as it is moved.
- \o ViewSection.NextLabelAtEnd - the next section label (beyond all visible
+ \li ViewSection.NextLabelAtEnd - the next section label (beyond all visible
sections) sticks to the end of the view as it is moved. \note Enabling
\c ViewSection.NextLabelAtEnd requires the view to scan ahead for the next
section, which has performance implications, especially for slower models.
@@ -2174,10 +2187,10 @@ void QQuickListView::setHighlightResizeDuration(int duration)
The possible values are:
\list
- \o ListView.NoSnap (default) - the view stops anywhere within the visible area.
- \o ListView.SnapToItem - the view settles with an item aligned with the start of
+ \li ListView.NoSnap (default) - the view stops anywhere within the visible area.
+ \li ListView.SnapToItem - the view settles with an item aligned with the start of
the view.
- \o ListView.SnapOneItem - the view settles no more than one item away from the first
+ \li ListView.SnapOneItem - the view settles no more than one item away from the first
visible item at the time the mouse button is released. This mode is particularly
useful for moving one page at a time.
\endlist
@@ -2254,9 +2267,9 @@ void QQuickListView::setSnapMode(SnapMode mode)
It is applied to all items that are created when:
\list
- \o The view is first created
- \o The view's \l model changes
- \o The view's \l model is \l {QAbstractItemModel::reset}{reset}, if the model is a QAbstractItemModel subclass
+ \li The view is first created
+ \li The view's \l model changes
+ \li The view's \l model is \l {QAbstractItemModel::reset}{reset}, if the model is a QAbstractItemModel subclass
\endlist
For example, here is a view that specifies such a transition:
@@ -2670,7 +2683,7 @@ void QQuickListView::geometryChanged(const QRectF &newGeometry, const QRectF &ol
if keyNavigationWraps is true and it is currently at the end.
This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickListView::incrementCurrentIndex()
{
@@ -2690,7 +2703,7 @@ void QQuickListView::incrementCurrentIndex()
if keyNavigationWraps is true and it is currently at the beginning.
This method has no effect if the \l count is zero.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickListView::decrementCurrentIndex()
{
@@ -2879,12 +2892,12 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
\a mode:
\list
- \o ListView.Beginning - position item at the top (or left for horizontal orientation) of the view.
- \o ListView.Center - position item in the center of the view.
- \o ListView.End - position item at bottom (or right for horizontal orientation) of the view.
- \o ListView.Visible - if any part of the item is visible then take no action, otherwise
+ \li ListView.Beginning - position item at the top (or left for horizontal orientation) of the view.
+ \li ListView.Center - position item in the center of the view.
+ \li ListView.End - position item at bottom (or right for horizontal orientation) of the view.
+ \li ListView.Visible - if any part of the item is visible then take no action, otherwise
bring the item into view.
- \o ListView.Contain - ensure the entire item is visible. If the item is larger than
+ \li ListView.Contain - ensure the entire item is visible. If the item is larger than
the view the item is positioned at the top (or left for horizontal orientation) of the view.
\endlist
@@ -2897,7 +2910,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
the actual start of the view can vary based on the size of the delegates.
The correct way to bring an item into view is with \c positionViewAtIndex.
- \bold Note: methods should only be called after the Component has completed. To position
+ \b Note: methods should only be called after the Component has completed. To position
the view at startup, this method should be called by Component.onCompleted. For
example, to position the view at the end:
@@ -2917,7 +2930,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
of the list does not cause all other items to be repositioned, and because
the actual start of the view can vary based on the size of the delegates.
- \bold Note: methods should only be called after the Component has completed. To position
+ \b Note: methods should only be called after the Component has completed. To position
the view at startup, this method should be called by Component.onCompleted. For
example, to position the view at the end on startup:
@@ -2936,7 +2949,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
If the item is outside the visible area, -1 is returned, regardless of
whether an item will exist at that point when scrolled into view.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
/*!
@@ -2949,7 +2962,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
If the item is outside the visible area, null is returned, regardless of
whether an item will exist at that point when scrolled into view.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
QQuickListViewAttached *QQuickListView::qmlAttachedProperties(QObject *obj)
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index bbc51a4d26..59cb37c15d 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -148,10 +148,10 @@ void QQuickLoaderPrivate::initResize()
accordingly to become visible.
\list
- \o If an explicit size is not specified for the Loader, the Loader
+ \li If an explicit size is not specified for the Loader, the Loader
is automatically resized to the size of the loaded item once the
component is loaded.
- \o If the size of the Loader is specified explicitly by setting
+ \li If the size of the Loader is specified explicitly by setting
the width, height or by anchoring, the loaded item will be resized
to the size of the Loader.
\endlist
@@ -162,14 +162,14 @@ void QQuickLoaderPrivate::initResize()
\table
\row
- \o sizeloader.qml
- \o sizeitem.qml
+ \li sizeloader.qml
+ \li sizeitem.qml
\row
- \o \snippet doc/src/snippets/qml/loader/sizeloader.qml 0
- \o \snippet doc/src/snippets/qml/loader/sizeitem.qml 0
+ \li \snippet doc/src/snippets/qml/loader/sizeloader.qml 0
+ \li \snippet doc/src/snippets/qml/loader/sizeitem.qml 0
\row
- \o The red rectangle will be sized to the size of the root item.
- \o The red rectangle will be 50x50, centered in the root item.
+ \li The red rectangle will be sized to the size of the root item.
+ \li The red rectangle will be 50x50, centered in the root item.
\endtable
@@ -182,11 +182,11 @@ void QQuickLoaderPrivate::initResize()
\table
\row
- \o application.qml
- \o MyItem.qml
+ \li application.qml
+ \li MyItem.qml
\row
- \o \snippet doc/src/snippets/qml/loader/connections.qml 0
- \o \snippet doc/src/snippets/qml/loader/MyItem.qml 0
+ \li \snippet doc/src/snippets/qml/loader/connections.qml 0
+ \li \snippet doc/src/snippets/qml/loader/MyItem.qml 0
\endtable
Alternatively, since \c MyItem.qml is loaded within the scope of the
@@ -209,11 +209,11 @@ void QQuickLoaderPrivate::initResize()
\table
\row
- \o application.qml
- \o KeyReader.qml
+ \li application.qml
+ \li KeyReader.qml
\row
- \o \snippet doc/src/snippets/qml/loader/focus.qml 0
- \o \snippet doc/src/snippets/qml/loader/KeyReader.qml 0
+ \li \snippet doc/src/snippets/qml/loader/focus.qml 0
+ \li \snippet doc/src/snippets/qml/loader/KeyReader.qml 0
\endtable
Once \c KeyReader.qml is loaded, it accepts key events and sets
@@ -344,7 +344,8 @@ void QQuickLoader::loadFromSource()
}
if (isComponentComplete()) {
- d->component = new QQmlComponent(qmlEngine(this), d->source, this);
+ QQmlComponent::CompilationMode mode = d->asynchronous ? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous;
+ d->component = new QQmlComponent(qmlEngine(this), d->source, mode, this);
d->load();
}
}
@@ -428,7 +429,7 @@ void QQuickLoader::loadFromSourceComponent()
the \a source component will be created with the initial \a properties set.
Setting the initial property values of an instance of a component in this manner
- will \bold{not} trigger any associated \l{Behavior}s.
+ will \b{not} trigger any associated \l{Behavior}s.
Note that the cached \a properties will be cleared if the \l source or \l sourceComponent
is changed after calling this function but prior to setting the loader \l active.
@@ -436,7 +437,7 @@ void QQuickLoader::loadFromSourceComponent()
Example:
\table
\row
- \o
+ \li
\qml
// ExampleComponent.qml
import QtQuick 2.0
@@ -456,7 +457,7 @@ void QQuickLoader::loadFromSourceComponent()
}
}
\endqml
- \o
+ \li
\qml
// example.qml
import QtQuick 2.0
@@ -633,22 +634,22 @@ void QQuickLoaderPrivate::_q_sourceLoaded()
This property holds the status of QML loading. It can be one of:
\list
- \o Loader.Null - the loader is inactive or no QML source has been set
- \o Loader.Ready - the QML source has been loaded
- \o Loader.Loading - the QML source is currently being loaded
- \o Loader.Error - an error occurred while loading the QML source
+ \li Loader.Null - the loader is inactive or no QML source has been set
+ \li Loader.Ready - the QML source has been loaded
+ \li Loader.Loading - the QML source is currently being loaded
+ \li Loader.Error - an error occurred while loading the QML source
\endlist
Use this status to provide an update or respond to the status change in some way.
For example, you could:
\list
- \o Trigger a state change:
+ \li Trigger a state change:
\qml
State { name: 'loaded'; when: loader.status == Loader.Ready }
\endqml
- \o Implement an \c onStatusChanged signal handler:
+ \li Implement an \c onStatusChanged signal handler:
\qml
Loader {
id: loader
@@ -656,7 +657,7 @@ void QQuickLoaderPrivate::_q_sourceLoaded()
}
\endqml
- \o Bind to the status value:
+ \li Bind to the status value:
\qml
Text { text: loader.status == Loader.Ready ? 'Loaded' : 'Not loaded' }
\endqml
@@ -711,7 +712,8 @@ void QQuickLoader::componentComplete()
QQuickItem::componentComplete();
if (active()) {
if (d->loadingFromSource) {
- d->component = new QQmlComponent(qmlEngine(this), d->source, this);
+ QQmlComponent::CompilationMode mode = d->asynchronous ? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous;
+ d->component = new QQmlComponent(qmlEngine(this), d->source, mode, this);
}
d->load();
}
@@ -752,6 +754,9 @@ qreal QQuickLoader::progress() const
This property holds whether the component will be instantiated asynchronously.
+When used in conjunction with the \l source property, loading and compilation
+will also be performed in a background thread.
+
Loading asynchronously creates the objects declared by the component
across multiple frames, and reduces the
likelihood of glitches in animation. When loading asynchronously the status
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index efb804bd18..b8555124eb 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -556,8 +556,8 @@ QQuickMouseArea::~QQuickMouseArea()
If hoverEnabled is true then these properties will be valid when:
\list
- \i no button is pressed, but the mouse is within the MouseArea (containsMouse is true).
- \i a button is pressed and held, even if it has since moved out of the area.
+ \li no button is pressed, but the mouse is within the MouseArea (containsMouse is true).
+ \li a button is pressed and held, even if it has since moved out of the area.
\endlist
The coordinates are relative to the MouseArea.
@@ -671,9 +671,9 @@ void QQuickMouseArea::setPropagateComposedEvents(bool prevent)
It contains a bitwise combination of:
\list
- \o Qt.LeftButton
- \o Qt.RightButton
- \o Qt.MiddleButton
+ \li Qt.LeftButton
+ \li Qt.RightButton
+ \li Qt.MiddleButton
\endlist
The code below displays "right" when the right mouse buttons is pressed:
@@ -1100,9 +1100,9 @@ void QQuickMouseArea::setHovered(bool h)
The available buttons are:
\list
- \o Qt.LeftButton
- \o Qt.RightButton
- \o Qt.MiddleButton
+ \li Qt.LeftButton
+ \li Qt.RightButton
+ \li Qt.MiddleButton
\endlist
To accept more than one button the flags can be combined with the
@@ -1174,10 +1174,10 @@ bool QQuickMouseArea::setPressed(bool p)
\c drag provides a convenient way to make an item draggable.
\list
- \i \c drag.target specifies the id of the item to drag.
- \i \c drag.active specifies if the target item is currently being dragged.
- \i \c drag.axis specifies whether dragging can be done horizontally (\c Drag.XAxis), vertically (\c Drag.YAxis), or both (\c Drag.XandYAxis)
- \i \c drag.minimum and \c drag.maximum limit how far the target can be dragged along the corresponding axes.
+ \li \c drag.target specifies the id of the item to drag.
+ \li \c drag.active specifies if the target item is currently being dragged.
+ \li \c drag.axis specifies whether dragging can be done horizontally (\c Drag.XAxis), vertically (\c Drag.YAxis), or both (\c Drag.XandYAxis)
+ \li \c drag.minimum and \c drag.maximum limit how far the target can be dragged along the corresponding axes.
\endlist
The following example displays a \l Rectangle that can be dragged along the X-axis. The opacity
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp
index 7dd6ec0589..110cc6ad7a 100644
--- a/src/quick/items/qquickmultipointtoucharea.cpp
+++ b/src/quick/items/qquickmultipointtoucharea.cpp
@@ -108,9 +108,9 @@ void QQuickTouchPoint::setY(qreal y)
These properties hold additional information about the current state of the touch point.
\list
- \i \c pressure is a value in the range of 0.0 to 1.0.
- \i \c velocity is a vector with magnitude reported in pixels per second.
- \i \c area is a rectangle covering the area of the touch point, centered on the current position of the touch point.
+ \li \c pressure is a value in the range of 0.0 to 1.0.
+ \li \c velocity is a vector with magnitude reported in pixels per second.
+ \li \c area is a rectangle covering the area of the touch point, centered on the current position of the touch point.
\endlist
Not all touch devices support velocity. If velocity is not supported, it will be reported
@@ -235,11 +235,11 @@ void QQuickTouchPoint::setSceneY(qreal sceneY)
MultiPointTouchArea can be used in two ways:
\list
- \o setting \c touchPoints to provide touch point objects with properties that can be bound to
- \o using the onTouchUpdated or onTouchPointsPressed, onTouchPointsUpdated and onTouchPointsReleased handlers
+ \li setting \c touchPoints to provide touch point objects with properties that can be bound to
+ \li using the onTouchUpdated or onTouchPointsPressed, onTouchPointsUpdated and onTouchPointsReleased handlers
\endlist
- While a MultiPointTouchArea \i can take exclusive ownership of certain touch points, it is also possible to have
+ While a MultiPointTouchArea \e can take exclusive ownership of certain touch points, it is also possible to have
multiple MultiPointTouchAreas active at the same time, each operating on a different set of touch points.
\sa TouchPoint
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index 0526187531..1fa0a90b28 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -466,7 +466,7 @@ void QQuickPathViewPrivate::regenerate()
\snippet doc/src/snippets/qml/pathview/pathview.qml 1
- \bold Note that views do not enable \e clip automatically. If the view
+ \b Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
@@ -695,7 +695,7 @@ QQuickItem *QQuickPathView::currentItem() const
Increments the current index.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickPathView::incrementCurrentIndex()
{
@@ -709,7 +709,7 @@ void QQuickPathView::incrementCurrentIndex()
Decrements the current index.
- \bold Note: methods should only be called after the Component has completed.
+ \b Note: methods should only be called after the Component has completed.
*/
void QQuickPathView::decrementCurrentIndex()
{
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index 674abdcfd8..6f79385d96 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\ingroup qml-event-elements
\brief The PinchEvent object provides information about a pinch event.
- \bold {The PinchEvent element was added in QtQuick 1.1}
+ \b {The PinchEvent element was added in QtQuick 1.1}
The \c center, \c startCenter, \c previousCenter properties provide the center position between the two touch points.
@@ -81,9 +81,9 @@ QT_BEGIN_NAMESPACE
These properties hold the position of the center point between the two touch points.
\list
- \o \c center is the current center point
- \o \c previousCenter is the center point of the previous event.
- \o \c startCenter is the center point when the gesture began
+ \li \c center is the current center point
+ \li \c previousCenter is the center point of the previous event.
+ \li \c startCenter is the center point when the gesture began
\endlist
*/
@@ -94,8 +94,8 @@ QT_BEGIN_NAMESPACE
These properties hold the scale factor determined by the change in distance between the two touch points.
\list
- \o \c scale is the current scale factor.
- \o \c previousScale is the scale factor of the previous event.
+ \li \c scale is the current scale factor.
+ \li \c previousScale is the scale factor of the previous event.
\endlist
When a pinch gesture is started, the scale is 1.0.
@@ -109,9 +109,9 @@ QT_BEGIN_NAMESPACE
These properties hold the angle between the two touch points.
\list
- \o \c angle is the current angle between the two points in the range -180 to 180.
- \o \c previousAngle is the angle of the previous event.
- \o \c rotation is the total rotation since the pinch gesture started.
+ \li \c angle is the current angle between the two points in the range -180 to 180.
+ \li \c previousAngle is the angle of the previous event.
+ \li \c rotation is the total rotation since the pinch gesture started.
\endlist
When a pinch gesture is started, the rotation is 0.0.
@@ -126,8 +126,8 @@ QT_BEGIN_NAMESPACE
These properties provide the actual touch points generating the pinch.
\list
- \o \c point1 and \c point2 hold the current positions of the points.
- \o \c startPoint1 and \c startPoint2 hold the positions of the points when the second point was touched.
+ \li \c point1 and \c point2 hold the current positions of the points.
+ \li \c startPoint1 and \c startPoint2 hold the positions of the points when the second point was touched.
\endlist
*/
@@ -166,7 +166,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate()
\brief The PinchArea item enables simple pinch gesture handling.
\inherits Item
- \bold {The PinchArea element was added in QtQuick 1.1}
+ \b {The PinchArea element was added in QtQuick 1.1}
A PinchArea is an invisible item that is typically used in conjunction with
a visible item in order to provide pinch gesture handling for that item.
@@ -178,8 +178,8 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate()
PinchArea can be used in two ways:
\list
- \o setting a \c pinch.target to provide automatic interaction with an element
- \o using the onPinchStarted, onPinchUpdated and onPinchFinished handlers
+ \li setting a \c pinch.target to provide automatic interaction with an element
+ \li using the onPinchStarted, onPinchUpdated and onPinchFinished handlers
\endlist
\sa PinchEvent
@@ -232,12 +232,12 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate()
\c pinch provides a convenient way to make an item react to pinch gestures.
\list
- \i \c pinch.target specifies the id of the item to drag.
- \i \c pinch.active specifies if the target item is currently being dragged.
- \i \c pinch.minimumScale and \c pinch.maximumScale limit the range of the Item::scale property.
- \i \c pinch.minimumRotation and \c pinch.maximumRotation limit the range of the Item::rotation property.
- \i \c pinch.dragAxis specifies whether dragging in not allowed (\c Pinch.NoDrag), can be done horizontally (\c Pinch.XAxis), vertically (\c Pinch.YAxis), or both (\c Pinch.XandYAxis)
- \i \c pinch.minimum and \c pinch.maximum limit how far the target can be dragged along the corresponding axes.
+ \li \c pinch.target specifies the id of the item to drag.
+ \li \c pinch.active specifies if the target item is currently being dragged.
+ \li \c pinch.minimumScale and \c pinch.maximumScale limit the range of the Item::scale property.
+ \li \c pinch.minimumRotation and \c pinch.maximumRotation limit the range of the Item::rotation property.
+ \li \c pinch.dragAxis specifies whether dragging in not allowed (\c Pinch.NoDrag), can be done horizontally (\c Pinch.XAxis), vertically (\c Pinch.YAxis), or both (\c Pinch.XandYAxis)
+ \li \c pinch.minimum and \c pinch.maximum limit how far the target can be dragged along the corresponding axes.
\endlist
*/
diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp
index 7c4cd18346..97a74c6765 100644
--- a/src/quick/items/qquickpositioners.cpp
+++ b/src/quick/items/qquickpositioners.cpp
@@ -608,8 +608,8 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
positioner. For a positioner, this applies to:
\list
- \o Items that are created or reparented as a child of the positioner
- \o Child items that change their \l visible property from false to true, and thus
+ \li Items that are created or reparented as a child of the positioner
+ \li Child items that change their \l visible property from false to true, and thus
are now visible
\endlist
@@ -626,9 +626,9 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
positioner. For a positioner, this applies to:
\list
- \o Child items that move when they are displaced due to the addition, removal or
+ \li Child items that move when they are displaced due to the addition, removal or
rearrangement of other items in the positioner
- \o Child items that are repositioned due to the resizing of other items in the positioner
+ \li Child items that are repositioned due to the resizing of other items in the positioner
\endlist
The transition can use the \l ViewTransition property to access more details about
@@ -741,8 +741,8 @@ void QQuickColumn::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Items that are created or reparented as a child of the positioner
- \o Child items that change their \l visible property from false to true, and thus
+ \li Items that are created or reparented as a child of the positioner
+ \li Child items that change their \l visible property from false to true, and thus
are now visible
\endlist
@@ -759,9 +759,9 @@ void QQuickColumn::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Child items that move when they are displaced due to the addition, removal or
+ \li Child items that move when they are displaced due to the addition, removal or
rearrangement of other items in the positioner
- \o Child items that are repositioned due to the resizing of other items in the positioner
+ \li Child items that are repositioned due to the resizing of other items in the positioner
\endlist
The transition can use the \l ViewTransition property to access more details about
@@ -795,9 +795,9 @@ QQuickRow::QQuickRow(QQuickItem *parent)
Possible values:
\list
- \o Qt.LeftToRight (default) - Items are laid out from left to right. If the width of the row is explicitly set,
+ \li Qt.LeftToRight (default) - Items are laid out from left to right. If the width of the row is explicitly set,
the left anchor remains to the left of the row.
- \o Qt.RightToLeft - Items are laid out from right to left. If the width of the row is explicitly set,
+ \li Qt.RightToLeft - Items are laid out from right to left. If the width of the row is explicitly set,
the right anchor remains to the right of the row.
\endlist
@@ -953,8 +953,8 @@ void QQuickRow::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Items that are created or reparented as a child of the positioner
- \o Child items that change their \l visible property from false to true, and thus
+ \li Items that are created or reparented as a child of the positioner
+ \li Child items that change their \l visible property from false to true, and thus
are now visible
\endlist
@@ -971,9 +971,9 @@ void QQuickRow::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Child items that move when they are displaced due to the addition, removal or
+ \li Child items that move when they are displaced due to the addition, removal or
rearrangement of other items in the positioner
- \o Child items that are repositioned due to the resizing of other items in the positioner
+ \li Child items that are repositioned due to the resizing of other items in the positioner
\endlist
The transition can use the \l ViewTransition property to access more details about
@@ -1059,9 +1059,9 @@ void QQuickGrid::setRows(const int rows)
Possible values are:
\list
- \o Grid.LeftToRight (default) - Items are positioned next to
+ \li Grid.LeftToRight (default) - Items are positioned next to
each other in the \l layoutDirection, then wrapped to the next line.
- \o Grid.TopToBottom - Items are positioned next to each
+ \li Grid.TopToBottom - Items are positioned next to each
other from top to bottom, then wrapped to the next column.
\endlist
*/
@@ -1131,10 +1131,10 @@ void QQuickGrid::setColumnSpacing(const qreal columnSpacing)
Possible values are:
\list
- \o Qt.LeftToRight (default) - Items are positioned from the top to bottom,
+ \li Qt.LeftToRight (default) - Items are positioned from the top to bottom,
and left to right. The flow direction is dependent on the
\l Grid::flow property.
- \o Qt.RightToLeft - Items are positioned from the top to bottom,
+ \li Qt.RightToLeft - Items are positioned from the top to bottom,
and right to left. The flow direction is dependent on the
\l Grid::flow property.
\endlist
@@ -1366,8 +1366,8 @@ void QQuickGrid::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Items that are created or reparented as a child of the positioner
- \o Child items that change their \l visible property from false to true, and thus
+ \li Items that are created or reparented as a child of the positioner
+ \li Child items that change their \l visible property from false to true, and thus
are now visible
\endlist
@@ -1384,9 +1384,9 @@ void QQuickGrid::reportConflictingAnchors()
positioner. For a positioner, this applies to:
\list
- \o Child items that move when they are displaced due to the addition, removal or
+ \li Child items that move when they are displaced due to the addition, removal or
rearrangement of other items in the positioner
- \o Child items that are repositioned due to the resizing of other items in the positioner
+ \li Child items that are repositioned due to the resizing of other items in the positioner
\endlist
The transition can use the \l ViewTransition property to access more details about
@@ -1435,10 +1435,10 @@ QQuickFlow::QQuickFlow(QQuickItem *parent)
Possible values are:
\list
- \o Flow.LeftToRight (default) - Items are positioned next to
+ \li Flow.LeftToRight (default) - Items are positioned next to
to each other according to the \l layoutDirection until the width of the Flow
is exceeded, then wrapped to the next line.
- \o Flow.TopToBottom - Items are positioned next to each
+ \li Flow.TopToBottom - Items are positioned next to each
other from top to bottom until the height of the Flow is exceeded,
then wrapped to the next column.
\endlist
@@ -1467,10 +1467,10 @@ void QQuickFlow::setFlow(Flow flow)
Possible values are:
\list
- \o Qt.LeftToRight (default) - Items are positioned from the top to bottom,
+ \li Qt.LeftToRight (default) - Items are positioned from the top to bottom,
and left to right. The flow direction is dependent on the
\l Flow::flow property.
- \o Qt.RightToLeft - Items are positioned from the top to bottom,
+ \li Qt.RightToLeft - Items are positioned from the top to bottom,
and right to left. The flow direction is dependent on the
\l Flow::flow property.
\endlist
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp
index 1f7578c583..f83b9f068a 100644
--- a/src/quick/items/qquickrepeater.cpp
+++ b/src/quick/items/qquickrepeater.cpp
@@ -162,10 +162,10 @@ QQuickRepeater::~QQuickRepeater()
This property can be set to any of the supported \l {qmlmodels}{data models}:
\list
- \o A number that indicates the number of delegates to be created by the repeater
- \o A model (e.g. a ListModel item, or a QAbstractItemModel subclass)
- \o A string list
- \o An object list
+ \li A number that indicates the number of delegates to be created by the repeater
+ \li A model (e.g. a ListModel item, or a QAbstractItemModel subclass)
+ \li A string list
+ \li An object list
\endlist
The type of model affects the properties that are exposed to the \l delegate.
@@ -243,8 +243,8 @@ void QQuickRepeater::setModel(const QVariant &model)
\table
\row
- \o \snippet doc/src/snippets/qml/repeaters/repeater.qml index
- \o \image repeater-index.png
+ \li \snippet doc/src/snippets/qml/repeaters/repeater.qml index
+ \li \image repeater-index.png
\endtable
If the \l model is a \l{QStringList-based model}{string list} or
@@ -254,8 +254,8 @@ void QQuickRepeater::setModel(const QVariant &model)
\table
\row
- \o \snippet doc/src/snippets/qml/repeaters/repeater.qml modeldata
- \o \image repeater-modeldata.png
+ \li \snippet doc/src/snippets/qml/repeaters/repeater.qml modeldata
+ \li \image repeater-modeldata.png
\endtable
If the \l model is a model object (such as a \l ListModel) the delegate
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index e66e05afb3..d7eedd42b6 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -103,15 +103,15 @@ const char *qtTexCoordAttributeName()
There are two types of input to the \l vertexShader:
uniform variables and attributes. Some are predefined:
\list
- \o uniform mat4 qt_Matrix - combined transformation
+ \li uniform mat4 qt_Matrix - combined transformation
matrix, the product of the matrices from the root item to this
ShaderEffect, and an orthogonal projection.
- \o uniform float qt_Opacity - combined opacity, the product of the
+ \li uniform float qt_Opacity - combined opacity, the product of the
opacities from the root item to this ShaderEffect.
- \o attribute vec4 qt_Vertex - vertex position, the top-left vertex has
+ \li attribute vec4 qt_Vertex - vertex position, the top-left vertex has
position (0, 0), the bottom-right (\l{Item::width}{width},
\l{Item::height}{height}).
- \o attribute vec2 qt_MultiTexCoord0 - texture coordinate, the top-left
+ \li attribute vec2 qt_MultiTexCoord0 - texture coordinate, the top-left
coordinate is (0, 0), the bottom-right (1, 1).
\endlist
@@ -119,17 +119,17 @@ const char *qtTexCoordAttributeName()
(GLSL) type is available as a uniform variable. The following list shows
how properties are mapped to GLSL uniform variables:
\list
- \o bool, int, qreal -> bool, int, float - If the type in the shader is not
+ \li bool, int, qreal -> bool, int, float - If the type in the shader is not
the same as in QML, the value is converted automatically.
- \o QColor -> vec4 - When colors are passed to the shader, they are first
+ \li QColor -> vec4 - When colors are passed to the shader, they are first
premultiplied. Thus Qt.rgba(0.2, 0.6, 1.0, 0.5) becomes
vec4(0.1, 0.3, 0.5, 0.5) in the shader, for example.
- \o QRect, QRectF -> vec4 - Qt.rect(x, y, w, h) becomes vec4(x, y, w, h) in
+ \li QRect, QRectF -> vec4 - Qt.rect(x, y, w, h) becomes vec4(x, y, w, h) in
the shader.
- \o QPoint, QPointF, QSize, QSizeF -> vec2
- \o QVector3D -> vec3
- \o QTransform -> mat4
- \o \l Image, \l ShaderEffectSource -> sampler2D - Origin is in the top-left
+ \li QPoint, QPointF, QSize, QSizeF -> vec2
+ \li QVector3D -> vec3
+ \li QTransform -> mat4
+ \li \l Image, \l ShaderEffectSource -> sampler2D - Origin is in the top-left
corner, and the color values are premultiplied.
\endlist
@@ -138,8 +138,8 @@ const char *qtTexCoordAttributeName()
blending can be achieved by outputting zero in the alpha channel.
\row
- \o \image declarative-shadereffectitem.png
- \o \qml
+ \li \image declarative-shadereffectitem.png
+ \li \qml
import QtQuick 2.0
Rectangle {
@@ -326,9 +326,9 @@ void QQuickShaderEffect::setMesh(const QVariant &mesh)
This property defines which sides of the element should be visible.
\list
- \o ShaderEffect.NoCulling - Both sides are visible
- \o ShaderEffect.BackFaceCulling - only front side is visible
- \o ShaderEffect.FrontFaceCulling - only back side is visible
+ \li ShaderEffect.NoCulling - Both sides are visible
+ \li ShaderEffect.BackFaceCulling - only front side is visible
+ \li ShaderEffect.FrontFaceCulling - only back side is visible
\endlist
The default is NoCulling.
@@ -349,9 +349,9 @@ void QQuickShaderEffect::setCullMode(CullMode face)
This property tells the current status of the OpenGL shader program.
\list
- \o ShaderEffect.Compiled - the shader program was successfully compiled and linked.
- \o ShaderEffect.Uncompiled - the shader program has not yet been compiled.
- \o ShaderEffect.Error - the shader program failed to compile or link.
+ \li ShaderEffect.Compiled - the shader program was successfully compiled and linked.
+ \li ShaderEffect.Uncompiled - the shader program has not yet been compiled.
+ \li ShaderEffect.Error - the shader program failed to compile or link.
\endlist
When setting the fragment or vertex shader source code, the status will become Uncompiled.
diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp
index eff5910a09..582e1ce92f 100644
--- a/src/quick/items/qquickshadereffectmesh.cpp
+++ b/src/quick/items/qquickshadereffectmesh.cpp
@@ -169,8 +169,8 @@ QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector
resolution higher.
\row
- \o \image declarative-gridmesh.png
- \o \qml
+ \li \image declarative-gridmesh.png
+ \li \qml
import QtQuick 2.0
ShaderEffect {
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp
index 708d75d137..33776be712 100644
--- a/src/quick/items/qquickshadereffectsource.cpp
+++ b/src/quick/items/qquickshadereffectsource.cpp
@@ -413,21 +413,21 @@ QImage QQuickShaderEffectTexture::toImage() const
ShaderEffectSource can be used as:
\list
- \o a texture source in a \l ShaderEffect.
+ \li a texture source in a \l ShaderEffect.
This allows you to apply custom shader effects to any QML element.
- \o a cache for a complex element.
+ \li a cache for a complex element.
The complex element can be rendered once into the texture, which can
then be animated freely without the need to render the complex element
again every frame.
- \o an opacity layer.
+ \li an opacity layer.
ShaderEffectSource allows you to apply an opacity to elements as a group
rather than each element individually.
\endlist
\table
\row
- \o \image declarative-shadereffectsource.png
- \o \qml
+ \li \image declarative-shadereffectsource.png
+ \li \qml
import QtQuick 2.0
Rectangle {
@@ -548,10 +548,10 @@ QSGTextureProvider *QQuickShaderEffectSource::textureProvider() const
source texture of a \l ShaderEffect.
\list
- \o ShaderEffectSource.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically
- \o ShaderEffectSource.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically
- \o ShaderEffectSource.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically
- \o ShaderEffectSource.Repeat - GL_REPEAT both horizontally and vertically
+ \li ShaderEffectSource.ClampToEdge - GL_CLAMP_TO_EDGE both horizontally and vertically
+ \li ShaderEffectSource.RepeatHorizontally - GL_REPEAT horizontally, GL_CLAMP_TO_EDGE vertically
+ \li ShaderEffectSource.RepeatVertically - GL_CLAMP_TO_EDGE horizontally, GL_REPEAT vertically
+ \li ShaderEffectSource.Repeat - GL_REPEAT both horizontally and vertically
\endlist
\note Some OpenGL ES 2 implementations do not support the GL_REPEAT
@@ -677,9 +677,9 @@ void QQuickShaderEffectSource::setTextureSize(const QSize &size)
implementation, this property might allow you to save some texture memory.
\list
- \o ShaderEffectSource.Alpha - GL_ALPHA
- \o ShaderEffectSource.RGB - GL_RGB
- \o ShaderEffectSource.RGBA - GL_RGBA
+ \li ShaderEffectSource.Alpha - GL_ALPHA
+ \li ShaderEffectSource.RGB - GL_RGB
+ \li ShaderEffectSource.RGBA - GL_RGBA
\endlist
\note Some OpenGL implementations do not support the GL_ALPHA format.
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index 668c7c07d7..a6a4e31aba 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -318,7 +318,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction xa;
xa.property = property;
- xa.toBinding = newBinding;
+ xa.toBinding = QQmlAbstractBinding::getPointer(newBinding);
xa.fromValue = xa.property.read();
xa.deletableToBinding = true;
actions << xa;
@@ -338,7 +338,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction ya;
ya.property = property;
- ya.toBinding = newBinding;
+ ya.toBinding = QQmlAbstractBinding::getPointer(newBinding);
ya.fromValue = ya.property.read();
ya.deletableToBinding = true;
actions << ya;
@@ -358,7 +358,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction sa;
sa.property = property;
- sa.toBinding = newBinding;
+ sa.toBinding = QQmlAbstractBinding::getPointer(newBinding);
sa.fromValue = sa.property.read();
sa.deletableToBinding = true;
actions << sa;
@@ -378,7 +378,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction ra;
ra.property = property;
- ra.toBinding = newBinding;
+ ra.toBinding = QQmlAbstractBinding::getPointer(newBinding);
ra.fromValue = ra.property.read();
ra.deletableToBinding = true;
actions << ra;
@@ -398,7 +398,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction wa;
wa.property = property;
- wa.toBinding = newBinding;
+ wa.toBinding = QQmlAbstractBinding::getPointer(newBinding);
wa.fromValue = wa.property.read();
wa.deletableToBinding = true;
actions << wa;
@@ -418,7 +418,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions()
newBinding->setTarget(property);
QQuickAction ha;
ha.property = property;
- ha.toBinding = newBinding;
+ ha.toBinding = QQmlAbstractBinding::getPointer(newBinding);
ha.fromValue = ha.property.read();
ha.deletableToBinding = true;
actions << ha;
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 36b902ff8c..9f22dfdd08 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -1176,11 +1176,11 @@ QQuickText::~QQuickText()
The properties of a line are:
\list
- \o number (read-only)
- \o x
- \o y
- \o width
- \o height
+ \li number (read-only)
+ \li x
+ \li y
+ \li width
+ \li height
\endlist
For example, this will move the first 5 lines of a text element by 100 pixels to the right:
@@ -1233,11 +1233,11 @@ QQuickText::~QQuickText()
The weight can be one of:
\list
- \o Font.Light
- \o Font.Normal - the default
- \o Font.DemiBold
- \o Font.Bold
- \o Font.Black
+ \li Font.Light
+ \li Font.Normal - the default
+ \li Font.DemiBold
+ \li Font.Bold
+ \li Font.Black
\endlist
\qml
@@ -1303,11 +1303,11 @@ QQuickText::~QQuickText()
Sets the capitalization for the text.
\list
- \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
- \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
- \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
- \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \li Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \li Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \li Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \li Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \li Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -1464,10 +1464,10 @@ void QQuickText::setLinkColor(const QColor &color)
Supported text styles are:
\list
- \o Text.Normal - the default
- \o Text.Outline
- \o Text.Raised
- \o Text.Sunken
+ \li Text.Normal - the default
+ \li Text.Outline
+ \li Text.Raised
+ \li Text.Sunken
\endlist
\qml
@@ -1661,10 +1661,10 @@ void QQuickText::setVAlign(VAlignment align)
wrap if an explicit width has been set. wrapMode can be one of:
\list
- \o Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l contentWidth will exceed a set width.
- \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l contentWidth will exceed a set width.
- \o Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
- \o Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
+ \li Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l contentWidth will exceed a set width.
+ \li Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l contentWidth will exceed a set width.
+ \li Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
+ \li Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
\endlist
*/
QQuickText::WrapMode QQuickText::wrapMode() const
@@ -1763,10 +1763,10 @@ void QQuickText::resetMaximumLineCount()
Supported text formats are:
\list
- \o Text.AutoText (default)
- \o Text.PlainText
- \o Text.StyledText
- \o Text.RichText
+ \li Text.AutoText (default)
+ \li Text.PlainText
+ \li Text.StyledText
+ \li Text.RichText
\endlist
If the text format is \c Text.AutoText the text element
@@ -1800,7 +1800,7 @@ void QQuickText::resetMaximumLineCount()
\table
\row
- \o
+ \li
\qml
Column {
Text {
@@ -1819,7 +1819,7 @@ Column {
}
}
\endqml
- \o \image declarative-textformat.png
+ \li \image declarative-textformat.png
\endtable
*/
QQuickText::TextFormat QQuickText::textFormat() const
@@ -1863,10 +1863,10 @@ void QQuickText::setTextFormat(TextFormat format)
Eliding can be:
\list
- \o Text.ElideNone - the default
- \o Text.ElideLeft
- \o Text.ElideMiddle
- \o Text.ElideRight
+ \li Text.ElideNone - the default
+ \li Text.ElideLeft
+ \li Text.ElideMiddle
+ \li Text.ElideRight
\endlist
If this property is set to Text.ElideRight, it can be used with \l {wrapMode}{wrapped}
@@ -1908,14 +1908,14 @@ void QQuickText::setElideMode(QQuickText::TextElideMode mode)
URL meaning any portion of the path after the last '/' will be ignored.
\table
- \header \o Base URL \o Relative URL \o Resolved URL
- \row \o http://qt-project.org/ \o images/logo.png \o http://qt-project.org/images/logo.png
- \row \o http://qt-project.org/index.html \o images/logo.png \o http://qt-project.org/images/logo.png
- \row \o http://qt-project.org/content \o images/logo.png \o http://qt-project.org/content/images/logo.png
- \row \o http://qt-project.org/content/ \o images/logo.png \o http://qt-project.org/content/images/logo.png
- \row \o http://qt-project.org/content/index.html \o images/logo.png \o http://qt-project.org/content/images/logo.png
- \row \o http://qt-project.org/content/index.html \o ../images/logo.png \o http://qt-project.org/images/logo.png
- \row \o http://qt-project.org/content/index.html \o /images/logo.png \o http://qt-project.org/images/logo.png
+ \header \li Base URL \li Relative URL \li Resolved URL
+ \row \li http://qt-project.org/ \li images/logo.png \li http://qt-project.org/images/logo.png
+ \row \li http://qt-project.org/index.html \li images/logo.png \li http://qt-project.org/images/logo.png
+ \row \li http://qt-project.org/content \li images/logo.png \li http://qt-project.org/content/images/logo.png
+ \row \li http://qt-project.org/content/ \li images/logo.png \li http://qt-project.org/content/images/logo.png
+ \row \li http://qt-project.org/content/index.html \li images/logo.png \li http://qt-project.org/content/images/logo.png
+ \row \li http://qt-project.org/content/index.html \li ../images/logo.png \li http://qt-project.org/images/logo.png
+ \row \li http://qt-project.org/content/index.html \li /images/logo.png \li http://qt-project.org/images/logo.png
\endtable
By default is the url of the Text element.
@@ -2169,9 +2169,9 @@ void QQuickText::setLineHeight(qreal lineHeight)
The possible values are:
\list
- \o Text.ProportionalHeight (default) - this sets the spacing proportional to the
+ \li Text.ProportionalHeight (default) - this sets the spacing proportional to the
line (as a multiplier). For example, set to 2 for double spacing.
- \o Text.FixedHeight - this sets the line height to a fixed line height (in pixels).
+ \li Text.FixedHeight - this sets the line height to a fixed line height (in pixels).
\endlist
*/
QQuickText::LineHeightMode QQuickText::lineHeightMode() const
@@ -2199,13 +2199,13 @@ void QQuickText::setLineHeightMode(LineHeightMode mode)
The possible values are:
\list
- \o Text.FixedSize (default) - The size specified by \l font.pixelSize
+ \li Text.FixedSize (default) - The size specified by \l font.pixelSize
or \l font.pointSize is used.
- \o Text.HorizontalFit - The largest size up to the size specified that fits
+ \li Text.HorizontalFit - The largest size up to the size specified that fits
within the width of the item without wrapping is used.
- \o Text.VerticalFit - The largest size up to the size specified that fits
+ \li Text.VerticalFit - The largest size up to the size specified that fits
the height of the item is used.
- \o Text.Fit - The largest size up to the size specified the fits within the
+ \li Text.Fit - The largest size up to the size specified the fits within the
width and height of the item is used.
\endlist
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 3db5f5a7a3..5456d3523a 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -159,11 +159,11 @@ QString QQuickTextEdit::text() const
The weight can be one of:
\list
- \o Font.Light
- \o Font.Normal - the default
- \o Font.DemiBold
- \o Font.Bold
- \o Font.Black
+ \li Font.Light
+ \li Font.Normal - the default
+ \li Font.DemiBold
+ \li Font.Bold
+ \li Font.Black
\endlist
\qml
@@ -230,11 +230,11 @@ QString QQuickTextEdit::text() const
Sets the capitalization for the text.
\list
- \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
- \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
- \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
- \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \li Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \li Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \li Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \li Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \li Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -274,9 +274,9 @@ void QQuickTextEdit::setText(const QString &text)
The way the text property should be displayed.
\list
- \o TextEdit.AutoText
- \o TextEdit.PlainText
- \o TextEdit.RichText
+ \li TextEdit.AutoText
+ \li TextEdit.PlainText
+ \li TextEdit.RichText
\endlist
The default is TextEdit.PlainText. If the text format is TextEdit.AutoText the text edit
@@ -285,7 +285,7 @@ void QQuickTextEdit::setText(const QString &text)
\table
\row
- \o
+ \li
\qml
Column {
TextEdit {
@@ -304,7 +304,7 @@ Column {
}
}
\endqml
- \o \image declarative-textformat.png
+ \li \image declarative-textformat.png
\endtable
*/
QQuickTextEdit::TextFormat QQuickTextEdit::textFormat() const
@@ -459,17 +459,17 @@ void QQuickTextEdit::setSelectedTextColor(const QColor &color)
Valid values for \c horizontalAlignment are:
\list
- \o TextEdit.AlignLeft (default)
- \o TextEdit.AlignRight
- \o TextEdit.AlignHCenter
- \o TextEdit.AlignJustify
+ \li TextEdit.AlignLeft (default)
+ \li TextEdit.AlignRight
+ \li TextEdit.AlignHCenter
+ \li TextEdit.AlignJustify
\endlist
Valid values for \c verticalAlignment are:
\list
- \o TextEdit.AlignTop (default)
- \o TextEdit.AlignBottom
- \o TextEdit.AlignVCenter
+ \li TextEdit.AlignTop (default)
+ \li TextEdit.AlignBottom
+ \li TextEdit.AlignVCenter
\endlist
When using the attached property LayoutMirroring::enabled to mirror application
@@ -591,10 +591,10 @@ void QQuickTextEdit::setVAlign(QQuickTextEdit::VAlignment alignment)
The text will only wrap if an explicit width has been set.
\list
- \o TextEdit.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
- \o TextEdit.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.
- \o TextEdit.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
- \o TextEdit.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
+ \li TextEdit.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
+ \li TextEdit.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.
+ \li TextEdit.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
+ \li TextEdit.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
\endlist
The default is TextEdit.NoWrap. If you set a width, consider using TextEdit.Wrap.
@@ -770,9 +770,9 @@ int QQuickTextEdit::positionAt(qreal x, qreal y) const
basis. If not specified the selection mode will default to TextEdit.SelectCharacters.
\list
- \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
+ \li TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
the previous cursor position) to the specified position.
- \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all
+ \li TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all
words between the specified position and the previous cursor position. Words partially in the
range are included.
\endlist
@@ -1089,36 +1089,36 @@ void QQuickTextEdit::setTextMargin(qreal margin)
Flags that alter behaviour are:
\list
- \o Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
- \o Qt.ImhSensitiveData - Typed text should not be stored by the active input method
+ \li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
+ \li Qt.ImhSensitiveData - Typed text should not be stored by the active input method
in any persistent storage like predictive user dictionary.
- \o Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
+ \li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
when a sentence ends.
- \o Qt.ImhPreferNumbers - Numbers are preferred (but not required).
- \o Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
- \o Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
- \o Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
+ \li Qt.ImhPreferNumbers - Numbers are preferred (but not required).
+ \li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
+ \li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
+ \li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
- \o Qt.ImhDate - The text editor functions as a date field.
- \o Qt.ImhTime - The text editor functions as a time field.
+ \li Qt.ImhDate - The text editor functions as a date field.
+ \li Qt.ImhTime - The text editor functions as a time field.
\endlist
Flags that restrict input (exclusive flags) are:
\list
- \o Qt.ImhDigitsOnly - Only digits are allowed.
- \o Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
- \o Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
- \o Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
- \o Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
- \o Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
- \o Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
+ \li Qt.ImhDigitsOnly - Only digits are allowed.
+ \li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
+ \li Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
+ \li Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
+ \li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
+ \li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
+ \li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
\endlist
Masks:
\list
- \o Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
+ \li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
\endlist
*/
@@ -1203,8 +1203,8 @@ void QQuickTextEdit::setSelectByMouse(bool on)
Specifies how text should be selected using a mouse.
\list
- \o TextEdit.SelectCharacters - The selection is updated with individual characters. (Default)
- \o TextEdit.SelectWords - The selection is updated with whole words.
+ \li TextEdit.SelectCharacters - The selection is updated with individual characters. (Default)
+ \li TextEdit.SelectWords - The selection is updated with whole words.
\endlist
This property only applies when \l selectByMouse is true.
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 1a93345aa2..0b21d6b169 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -201,11 +201,11 @@ QString QQuickTextInputPrivate::realText() const
The weight can be one of:
\list
- \o Font.Light
- \o Font.Normal - the default
- \o Font.DemiBold
- \o Font.Bold
- \o Font.Black
+ \li Font.Light
+ \li Font.Normal - the default
+ \li Font.DemiBold
+ \li Font.Bold
+ \li Font.Black
\endlist
\qml
@@ -271,11 +271,11 @@ QString QQuickTextInputPrivate::realText() const
Sets the capitalization for the text.
\list
- \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
- \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
- \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
- \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \li Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \li Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \li Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \li Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \li Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -512,10 +512,10 @@ void QQuickTextInput::setVAlign(QQuickTextInput::VAlignment alignment)
The text will only wrap if an explicit width has been set.
\list
- \o TextInput.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
- \o TextInput.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.
- \o TextInput.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
- \o TextInput.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
+ \li TextInput.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
+ \li TextInput.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.
+ \li TextInput.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
+ \li TextInput.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
\endlist
The default is TextInput.NoWrap. If you set a width, consider using TextInput.Wrap.
@@ -958,8 +958,8 @@ void QQuickDoubleValidator::resetLocaleName()
The possible values for this property are:
\list
- \o DoubleValidator.StandardNotation
- \o DoubleValidator.ScientificNotation (default)
+ \li DoubleValidator.StandardNotation
+ \li DoubleValidator.ScientificNotation (default)
\endlist
If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part (e.g. 1.5E-2).
@@ -1110,10 +1110,10 @@ Qt::InputMethodHints QQuickTextInputPrivate::effectiveInputMethodHints() const
Specifies how the text should be displayed in the TextInput.
\list
- \o TextInput.Normal - Displays the text as it is. (Default)
- \o TextInput.Password - Displays asterisks instead of characters.
- \o TextInput.NoEcho - Displays nothing.
- \o TextInput.PasswordEchoOnEdit - Displays characters as they are entered
+ \li TextInput.Normal - Displays the text as it is. (Default)
+ \li TextInput.Password - Displays asterisks instead of characters.
+ \li TextInput.NoEcho - Displays nothing.
+ \li TextInput.PasswordEchoOnEdit - Displays characters as they are entered
while editing, otherwise displays asterisks.
\endlist
*/
@@ -1149,37 +1149,37 @@ void QQuickTextInput::setEchoMode(QQuickTextInput::EchoMode echo)
Flags that alter behaviour are:
\list
- \o Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
+ \li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
This is automatically set when setting echoMode to \c TextInput.Password.
- \o Qt.ImhSensitiveData - Typed text should not be stored by the active input method
+ \li Qt.ImhSensitiveData - Typed text should not be stored by the active input method
in any persistent storage like predictive user dictionary.
- \o Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
+ \li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
when a sentence ends.
- \o Qt.ImhPreferNumbers - Numbers are preferred (but not required).
- \o Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
- \o Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
- \o Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
+ \li Qt.ImhPreferNumbers - Numbers are preferred (but not required).
+ \li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
+ \li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
+ \li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
- \o Qt.ImhDate - The text editor functions as a date field.
- \o Qt.ImhTime - The text editor functions as a time field.
+ \li Qt.ImhDate - The text editor functions as a date field.
+ \li Qt.ImhTime - The text editor functions as a time field.
\endlist
Flags that restrict input (exclusive flags) are:
\list
- \o Qt.ImhDigitsOnly - Only digits are allowed.
- \o Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
- \o Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
- \o Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
- \o Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
- \o Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
- \o Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
+ \li Qt.ImhDigitsOnly - Only digits are allowed.
+ \li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
+ \li Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
+ \li Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
+ \li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
+ \li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
+ \li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
\endlist
Masks:
\list
- \o Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
+ \li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
\endlist
*/
@@ -1323,8 +1323,8 @@ QRectF QQuickTextInput::positionToRectangle(int pos) const
The cursor position type specifies how the cursor position should be resolved.
\list
- \o TextInput.CursorBetweenCharacters - Returns the position between characters that is nearest x.
- \o TextInput.CursorOnCharacter - Returns the position before the character that is nearest x.
+ \li TextInput.CursorBetweenCharacters - Returns the position between characters that is nearest x.
+ \li TextInput.CursorOnCharacter - Returns the position before the character that is nearest x.
\endlist
*/
@@ -2161,8 +2161,8 @@ void QQuickTextInput::setSelectByMouse(bool on)
Specifies how text should be selected using a mouse.
\list
- \o TextInput.SelectCharacters - The selection is updated with individual characters. (Default)
- \o TextInput.SelectWords - The selection is updated with whole words.
+ \li TextInput.SelectCharacters - The selection is updated with individual characters. (Default)
+ \li TextInput.SelectWords - The selection is updated with whole words.
\endlist
This property only applies when \l selectByMouse is true.
@@ -2295,9 +2295,9 @@ void QQuickTextInput::moveCursorSelection(int position)
basis. If not specified the selection mode will default to TextInput.SelectCharacters.
\list
- \o TextInput.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
+ \li TextInput.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
the previous cursor position) to the specified position.
- \o TextInput.SelectWords - Sets the selectionStart and selectionEnd to include all
+ \li TextInput.SelectWords - Sets the selectionStart and selectionEnd to include all
words between the specified position and the previous cursor position. Words partially in the
range are included.
\endlist
@@ -2930,19 +2930,6 @@ void QQuickTextInputPrivate::setSelection(int start, int length)
/*!
\internal
- Initializes the line control with a starting text value of \a txt.
-*/
-void QQuickTextInputPrivate::init(const QString &txt)
-{
- m_text = txt;
-
- updateDisplayText();
- m_cursor = m_text.length();
-}
-
-/*!
- \internal
-
Sets the password echo editing to \a editing. If password echo editing
is true, then the text of the password is displayed even if the echo
mode is set to QLineEdit::PasswordEchoOnEdit. Password echoing editing
@@ -3274,12 +3261,7 @@ void QQuickTextInputPrivate::internalSetText(const QString &txt, int pos, bool e
m_textDirty = (oldText != m_text);
bool changed = finishChange(-1, true, edited);
-#ifdef QT_NO_ACCESSIBILITY
Q_UNUSED(changed)
-#else
- if (changed)
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextUpdated, q, 0));
-#endif
}
@@ -3903,10 +3885,6 @@ bool QQuickTextInputPrivate::emitCursorPositionChanged()
}
}
-#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextCaretMoved, q, 0));
-#endif
-
return true;
}
return false;
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index 9a59b44549..bb00600661 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -405,7 +405,6 @@ public:
void updateLayout();
private:
- void init(const QString &txt);
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);
void updateDisplayText(bool forceUpdate = false);
diff --git a/src/quick/items/qquickvisualadaptormodel.cpp b/src/quick/items/qquickvisualadaptormodel.cpp
index fb85810984..622adf4ce9 100644
--- a/src/quick/items/qquickvisualadaptormodel.cpp
+++ b/src/quick/items/qquickvisualadaptormodel.cpp
@@ -173,7 +173,7 @@ public:
VDMDelegateDataType *m_delegateDataType;
CreateModelData createItem;
StringValue stringValue;
- v8::Persistent<v8::Function> m_constructor;
+ v8::Persistent<v8::ObjectTemplate> m_constructor;
int m_ref;
int m_count;
@@ -716,9 +716,9 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
v8::HandleScope handleScope;
v8::Context::Scope contextScope(v8Engine->context());
- v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New();
- ft->InstanceTemplate()->SetHasExternalResource(true);
- ft->PrototypeTemplate()->SetAccessor(
+ v8::Local<v8::ObjectTemplate> constructor = v8::ObjectTemplate::New();
+ constructor->SetHasExternalResource(true);
+ constructor->SetAccessor(
v8::String::New("index"), QQuickVisualDataModelItemMetaObject::get_index);
if (m_listAccessor
@@ -726,9 +726,9 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
&& m_listAccessor->type() != QQuickListAccessor::Instance) {
createItem = &QQuickVDMListAccessorData::create;
stringValue = &QQuickVDMListAccessorData::stringValue;
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8::String::New("modelData"), QQuickVDMListAccessorData::get_modelData);
- m_constructor = qPersistentNew<v8::Function>(ft->GetFunction());
+ m_constructor = qPersistentNew(constructor);
return;
}
@@ -741,7 +741,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
const QString roleName = m_listModelInterface->toString(role);
const QByteArray propertyName = roleName.toUtf8();
addProperty(role, propertyId, propertyName, "QVariant");
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8Engine->toString(roleName),
QQuickVDMListModelInterfaceData::get_property,
QQuickVDMListModelInterfaceData::set_property,
@@ -751,7 +751,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
m_roleCount = m_propertyData.count();
if (m_propertyData.count() == 1) {
addProperty(roles.first(), 1, "modelData", "QVariant", true);
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8::String::New("modelData"),
QQuickVDMListModelInterfaceData::get_property,
QQuickVDMListModelInterfaceData::set_property,
@@ -764,7 +764,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
for (QHash<int, QByteArray>::const_iterator it = roleNames.begin(); it != roleNames.end(); ++it) {
const int propertyId = m_propertyData.count();
addProperty(it.key(), propertyId, it.value(), "QVariant");
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8::String::New(it.value().constData(), it.value().length()),
QQuickVDMAbstractItemModelData::get_property,
QQuickVDMAbstractItemModelData::set_property,
@@ -774,14 +774,14 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
m_roleCount = m_propertyData.count();
if (m_propertyData.count() == 1) {
addProperty(roleNames.begin().key(), 1, "modelData", "QVariant", true);
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8::String::New("modelData"),
QQuickVDMAbstractItemModelData::get_property,
QQuickVDMAbstractItemModelData::set_property,
v8::Int32::New(0));
m_roleNames.insert("modelData", roleNames.begin().key());
}
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
v8::String::New("hasModelChildren"),
QQuickVDMAbstractItemModelData::get_hasModelChildren);
} else if (m_listAccessor) {
@@ -796,7 +796,7 @@ void QQuickVisualAdaptorModelPrivate::createMetaObject()
if (!m_objectList) {
m_delegateDataType->propertyCache = new QQmlPropertyCache(
m_engine, m_delegateDataType->metaObject);
- m_constructor = qPersistentNew<v8::Function>(ft->GetFunction());
+ m_constructor = qPersistentNew(constructor);
}
}
diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp
index 70f8897b2d..88d46c60ee 100644
--- a/src/quick/items/qquickvisualdatamodel.cpp
+++ b/src/quick/items/qquickvisualdatamodel.cpp
@@ -1306,11 +1306,13 @@ QQuickVisualDataModelItemMetaType::QQuickVisualDataModelItemMetaType(
v8::HandleScope handleScope;
v8::Context::Scope contextScope(engine->context());
- v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New();
- ft->InstanceTemplate()->SetHasExternalResource(true);
- ft->PrototypeTemplate()->SetAccessor(v8::String::New("model"), get_model);
- ft->PrototypeTemplate()->SetAccessor(v8::String::New("groups"), get_groups, set_groups);
- ft->PrototypeTemplate()->SetAccessor(v8::String::New("isUnresolved"), get_member, 0, v8::Int32::New(30));
+
+ constructor = qPersistentNew(v8::ObjectTemplate::New());
+
+ constructor->SetHasExternalResource(true);
+ constructor->SetAccessor(v8::String::New("model"), get_model);
+ constructor->SetAccessor(v8::String::New("groups"), get_groups, set_groups);
+ constructor->SetAccessor(v8::String::New("isUnresolved"), get_member, 0, v8::Int32::New(30));
int notifierId = 0;
for (int i = 0; i < groupNames.count(); ++i, ++notifierId) {
@@ -1321,7 +1323,7 @@ QQuickVisualDataModelItemMetaType::QQuickVisualDataModelItemMetaType(
propertyName.toUtf8(), "bool", notifierId);
propertyBuilder.setWritable(true);
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
engine->toString(propertyName), get_member, set_member, v8::Int32::New(i + 1));
}
for (int i = 0; i < groupNames.count(); ++i, ++notifierId) {
@@ -1331,13 +1333,11 @@ QQuickVisualDataModelItemMetaType::QQuickVisualDataModelItemMetaType(
propertyName.toUtf8(), "int", notifierId);
propertyBuilder.setWritable(true);
- ft->PrototypeTemplate()->SetAccessor(
+ constructor->SetAccessor(
engine->toString(propertyName), get_index, 0, v8::Int32::New(i + 1));
}
metaObject = builder.toMetaObject();
-
- constructor = qPersistentNew<v8::Function>(ft->GetFunction());
}
QQuickVisualDataModelItemMetaType::~QQuickVisualDataModelItemMetaType()
@@ -1891,16 +1891,16 @@ void QQuickVisualDataGroup::setDefaultInclude(bool include)
VisualDataModel attached as well as the model for that item. It has the properties:
\list
- \o \b model The model data of the item. This is the same as the model context property in
+ \li \b model The model data of the item. This is the same as the model context property in
a delegate
- \o \b groups A list the of names of groups the item is a member of. This property can be
+ \li \b groups A list the of names of groups the item is a member of. This property can be
written to change the item's membership.
- \o \b inItems Whether the item belongs to the \l {QtQuick2::VisualDataModel::items}{items} group.
+ \li \b inItems Whether the item belongs to the \l {QtQuick2::VisualDataModel::items}{items} group.
Writing to this property will add or remove the item from the group.
- \o \b itemsIndex The index of the item within the \l {QtQuick2::VisualDataModel::items}{items} group.
- \o \b {in\i{GroupName}} Whether the item belongs to the dynamic group \i groupName. Writing to
+ \li \b itemsIndex The index of the item within the \l {QtQuick2::VisualDataModel::items}{items} group.
+ \li \b {in\e{GroupName}} Whether the item belongs to the dynamic group \e groupName. Writing to
this property will add or remove the item from the group.
- \o \b {\i{groupName}Index} The index of the item within the dynamic group \i groupName.
+ \li \b {\e{groupName}Index} The index of the item within the dynamic group \e groupName.
\endlist
*/
diff --git a/src/quick/items/qquickvisualdatamodel_p_p.h b/src/quick/items/qquickvisualdatamodel_p_p.h
index c53ed5bdbb..c2db04511d 100644
--- a/src/quick/items/qquickvisualdatamodel_p_p.h
+++ b/src/quick/items/qquickvisualdatamodel_p_p.h
@@ -92,7 +92,7 @@ public:
QV8Engine * const v8Engine;
QMetaObject *metaObject;
const QStringList groupNames;
- v8::Persistent<v8::Function> constructor;
+ v8::Persistent<v8::ObjectTemplate> constructor;
};
class QQuickVisualAdaptorModel;
diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp
index 12c5dbd932..64eb2bf53b 100644
--- a/src/quick/items/qquickwindowmanager.cpp
+++ b/src/quick/items/qquickwindowmanager.cpp
@@ -107,11 +107,6 @@ extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_
lock. This variable is an integer to allow for recursive calls to lockInGui()
without using a recursive mutex. See isPostingSyncEvent.
- RenderThread::isPaintComplete: This variable is cleared when rendering starts and
- set once rendering is complete. It is monitored in the paintEvent(),
- resizeEvent() and grab() functions to force them to wait for rendering to
- complete.
-
RenderThread::isPostingSyncEvent: This variable is set in the render thread just
before the sync event is sent to the GUI thread. It is used to avoid deadlocks
in the case where render thread waits while waiting for GUI to pick up the sync
@@ -160,7 +155,6 @@ public:
, allowMainThreadProcessingFlag(false)
, isGuiLocked(0)
, animationRunning(false)
- , isPaintCompleted(false)
, isPostingSyncEvent(false)
, isRenderBlocked(false)
, isExternalUpdatePending(false)
@@ -248,7 +242,6 @@ private:
int isGuiLocked;
uint animationRunning: 1;
- uint isPaintCompleted : 1;
uint isPostingSyncEvent : 1;
uint isRenderBlocked : 1;
uint isExternalUpdatePending : 1;
@@ -723,8 +716,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
handleRemovedWindows();
- isPaintCompleted = true;
-
// Update sizes...
for (QHash<QQuickCanvas *, CanvasData *>::const_iterator it = m_rendered_windows.constBegin();
it != m_rendered_windows.constEnd(); ++it) {
@@ -1077,8 +1068,7 @@ QImage QQuickRenderThreadSingleContextWindowManager::grab(QQuickCanvas *canvas)
exhaustSyncEvent();
canvasToGrab = canvas;
- isPaintCompleted = false;
- while (isRunning() && !isPaintCompleted) {
+ while (isRunning() && canvasToGrab) {
if (isRenderBlocked)
wake();
wait();