aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.13.1107
-rw-r--r--examples/HACKING23
-rw-r--r--examples/quick/imageelements/doc/src/imageelements.qdoc4
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp8
-rw-r--r--src/imports/imports.pro2
-rw-r--r--src/imports/settings/qqmlsettings.cpp2
-rw-r--r--src/particles/qquickitemparticle.cpp20
-rw-r--r--src/particles/qquickparticleaffector.cpp2
-rw-r--r--src/particles/qquickparticleemitter.cpp15
-rw-r--r--src/qml/doc/src/cppintegration/extending-tutorial.qdoc3
-rw-r--r--src/qml/doc/src/javascript/qtjavascript.qdoc7
-rw-r--r--src/qml/doc/src/javascript/string.qdoc4
-rw-r--r--src/qml/jsapi/qjsengine.cpp4
-rw-r--r--src/qml/jsruntime/qv4engine.cpp6
-rw-r--r--src/qml/qml/ftw/qintrusivelist.cpp4
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp198
-rw-r--r--src/qml/util/qqmlpropertymap.cpp4
-rw-r--r--src/qmlmodels/qqmldelegatecomponent.cpp13
-rw-r--r--src/qmlmodels/qqmldelegatemodel.cpp4
-rw-r--r--src/qmlmodels/qqmlobjectmodel.cpp8
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc2
-rw-r--r--src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc16
-rw-r--r--src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc6
-rw-r--r--src/quick/doc/src/qtquick.qdoc2
-rw-r--r--src/quick/handlers/qquickhoverhandler.cpp24
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp10
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp58
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp179
-rw-r--r--src/quick/items/qquickdrag.cpp4
-rw-r--r--src/quick/items/qquickdroparea.cpp4
-rw-r--r--src/quick/items/qquickgridview.cpp24
-rw-r--r--src/quick/items/qquickitemsmodule.cpp2
-rw-r--r--src/quick/items/qquicklistview.cpp23
-rw-r--r--src/quick/items/qquickmousearea.cpp2
-rw-r--r--src/quick/items/qquickmultipointtoucharea.cpp2
-rw-r--r--src/quick/items/qquickscreen.cpp3
-rw-r--r--src/quick/items/qquicktableview.cpp15
-rw-r--r--src/quick/items/qquicktextcontrol.cpp8
-rw-r--r--src/quick/items/qquicktextcontrol_p_p.h2
-rw-r--r--src/quick/items/qquicktextedit.cpp6
-rw-r--r--src/quick/items/qquicktextinput.cpp25
-rw-r--r--src/quick/util/qquickfontmetrics.cpp7
-rw-r--r--src/quickshapes/qquickshape.cpp12
-rw-r--r--tests/auto/qml/qmlcachegen/data/module.mjs6
-rw-r--r--tests/auto/qml/qmlcachegen/data/utils.mjs4
-rw-r--r--tests/auto/qml/qmlcachegen/qmlcachegen.pro4
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp10
-rw-r--r--tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml89
-rw-r--r--tests/auto/quick/qquicktableview/tst_qquicktableview.cpp27
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp23
-rw-r--r--tests/manual/scenegraph_lancelot/hostinfo.sh76
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp4
52 files changed, 699 insertions, 418 deletions
diff --git a/dist/changes-5.13.1 b/dist/changes-5.13.1
new file mode 100644
index 0000000000..d859a5e747
--- /dev/null
+++ b/dist/changes-5.13.1
@@ -0,0 +1,107 @@
+Qt 5.13.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.13.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.13 series is binary compatible with the 5.12.x series.
+Applications compiled for 5.12 will continue to run with 5.13.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ - [QTBUG-76871] TapHandler.point now holds the release position while the
+ tapped() signal is emitted.
+ - [QTBUG-14769][QTBUG-50482] TextEdit now uses the I-beam cursor by default,
+ and the pointing cursor for links. But if user code sets a custom cursor,
+ we restore it when the mouse is no longer hovering a link.
+
+****************************************************************************
+* QtQml *
+****************************************************************************
+
+ - [QTBUG-56264] Fixed segfault on Sparc64.
+ - [QTBUG-77102] Fix bug with singletons not being imported from modules when
+ using older versions.
+ - [QTBUG-77047] Fixed crash when creating arrays using the spread operator.
+ - [QTBUG-75983] Fixed crash in XMLHttpRequest.open.
+ - [QTBUG-77012] Fixed static build issue: multiple definitions of
+ qtPositionAttributeName().
+ - [QTBUG-71329] Fixed promise chaining.
+ - [QTBUG-76441] Fix support for import statements using qrc:/ urls.
+ - [QTBUG-55407] Fixed a crash when setData or create is called after a user
+ mistakenly used the internal constructor of QQmlComponent which does
+ not take an engine.
+ - [QTBUG-76796] Fixed late binding re-evaluation when using typeof(name).
+ - [QTBUG-76627] qmlplugindump now finds enums in composite types.
+ - [QTBUG-76656] Fixed resolution of 'this' when using the call operator on scope and context
+ properties.
+ - [QTBUG-71387] Fixed a crash after calling qmlClearTypeRegistrations().
+ - [QTBUG-75642] Fixed an invalid memory read in JIT with template literals.
+ - [QTBUG-75939] Fix crash when destroying QJSValues from other threads.
+ - [QTBUG-76085] Fixed automatic loading of translations from resources.
+ - [QTBUG-76018] Fixed grammar to permit readonly list properties.
+ - [QTBUG-75880] Fix accidental implicit creation of local variable when using anonymous functions
+ in object literals.
+ - [QTBUG-67343] Fixed assertion when having a ShaderEffect as a delegate
+ in a ComboBox.
+ - [QTBUG-75896] Fixed property lookup in QML singletons.
+ - [QTBUG-75392] Fixed a crash by working around a compiler bug.
+ - [QTBUG-48809] Print a warning when using absolute paths in qmldir files.
+ - [QTBUG-75609] Fixed a performance regression with attached properties.
+ - [QTBUG-76074] Loader now frees custom qml types when unloading.
+
+****************************************************************************
+* QtQuick *
+****************************************************************************
+
+ - Item Views:
+ * [QTBUG-76487] We now properly populate delegates with the populate
+ transition when the view is resized after componentComplete.
+ * [QTBUG-31677] A ListView footer is now positioned correctly after the
+ last item is removed.
+ * [QTBUG-76433][QTBUG-44308] Fixed a crash while doing fast flicking in
+ transitions that use Animators.
+ * [QTBUG-76254] Fixed a crash in QQmlDelegateModel.
+ * [QTBUG-71581] Fixed a crash in ListView when closing an application that
+ dynamically creates and appends items to an ObjectModel.
+
+ - Input:
+ * [QTBUG-75399] Fixed a crash when using the KeyNavigation attached property.
+ * [QTBUG-76875] DragHandler now respects acceptedButtons.
+ * [QTBUG-71218] If a Controls 2 Button has a DragHandler, the button is
+ now released when the drag begins.
+ * [QTBUG-75770] MouseArea now respects QPlatformTheme::TouchDoubleTapDistance
+ to avoid generating double-clicks while moving and clicking the mouse quickly.
+
+ - Scene graph:
+ * [QTBUG-76603] qmlscene now sets the default surface format earlier
+ and correctly.
+ * [QTBUG-68566] Fixed rendering freeze when using software rendering
+ of WebEngine in QQuickWidget.
+ * [QTBUG-73768] Fixed an assert in BorderImage when any border size
+ exceeds source image size.
+ * [QTBUG-66810] Software rendering: repaint everything when moving
+ between HiDpi and lower-resolution screens.
+ * [QTBUG-74348] Fixed leaking scene graph rendering contexts when using
+ the threaded render loop.
+ * [QTBUG-76055] Cleaned up error messages in shadereffect.
+
+ - Text:
+ * [QTBUG-74761] Added support for text color when using color fonts.
+ * [QTBUG-76528] Fixed missing glyphs and in some cases crashes when
+ displaying many characters from the same font on a system with a
+ low maximum texture size.
+ * [QTBUG-75002] Accessibility: StaticText nodes are announced as
+ read-only rather than editable in Windows Narrator.
diff --git a/examples/HACKING b/examples/HACKING
deleted file mode 100644
index 7d2a61a481..0000000000
--- a/examples/HACKING
+++ /dev/null
@@ -1,23 +0,0 @@
-Some guidelines for Qt QML examples
-
-Snippets
----
-Snippets are snatches of QML code that won't even run on their own. They don't belong here, they belong in doc/src/snippets. They should be contained in files that will compile on their own, for automated syntax validation, but don't have to look like anything.
-
-Examples
----
-
-Examples are large blocks of QML code that demonstrate a feature. You should be able to launch an example and visually see the feature take effect. Examples should be written in a small form, and should automatically activate any features. Ideally, when you run an example, you see the feature demonstrate itself over and over until you get bored and close the application using your platform's close window mechanism. Examples shouldn't contain their own close buttons or start screen, explanatory text should be kept to a minimum (show, not tell), and reserve interaction for demonstrating interactive elements. The code should be held to a high level of quality, and should be understandable by people new to QML.
-
-Unless the demonstrated feature uses it, assume no interface devices other than a screen that can show a 320x480 rectangle and a generic pointing device (with the shared subset of mouse/touch functionality).
-
-Groups of similar examples should be placed in one folder with a single launcher application, which uses the shared folder of common components.
-
-The example, or launcher application in case of groups, should contain a qdoc comment explaining the example. The example or launcher should be buildable as a full C++ application and runnable with the standard qml file launcher. Usually this will consist primarily of using the macro found in shared.h.
-
-Demos
----
-
-Demos are examples of creating full applications using QML. They should fit both a desktop and a mobile form factor, they should have their own start screen and method of exiting the application. They should be at a level of quality that you'd be comfortable submitting them to an app store for a platform of the appropriate hardware (screen size, input methods, etc.). The code should be written to a level that is easily understood and modified by a QML expert.
-
-Demos should have a qdoc file in their directory explaining the demo at a high level. The demo should be buildable as a full C++ application and preferably runnable with the standard qml file launcher.
diff --git a/examples/quick/imageelements/doc/src/imageelements.qdoc b/examples/quick/imageelements/doc/src/imageelements.qdoc
index 2c6490fb2c..4c00915e56 100644
--- a/examples/quick/imageelements/doc/src/imageelements.qdoc
+++ b/examples/quick/imageelements/doc/src/imageelements.qdoc
@@ -38,12 +38,12 @@
\section1 Scaling with BorderImage
- \e BorderImage shows off the various scaling modes of the \l BorderImage
+ \e BorderImage shows the various scaling modes of the \l BorderImage
type by setting its horizontalTileMode and verticalTileMode properties.
\section1 Image Fill
- \e Image shows off the various fill modes of the \l Image type.
+ \e Image shows the various fill modes of the \l Image type.
\section1 Shadow Effects
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 49836ad10c..6b76d63555 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -856,7 +856,7 @@ QQuickFolderListModel::Status QQuickFolderListModel::status() const
\qmlproperty bool FolderListModel::sortCaseSensitive
\since 5.12
- If set to true, the sort is case sensitive. This property is true by default.
+ If set to \c true, the sort is case sensitive. This property is \c true by default.
*/
bool QQuickFolderListModel::sortCaseSensitive() const
@@ -878,8 +878,8 @@ void QQuickFolderListModel::setSortCaseSensitive(bool on)
/*!
\qmlmethod var FolderListModel::get(int index, string property)
- Get the folder property for the given index. The following properties
- are available.
+ Returns the folder \a property for the given \a index. The following properties
+ are available:
\list
\li \c fileName
@@ -906,7 +906,7 @@ QVariant QQuickFolderListModel::get(int idx, const QString &property) const
\qmlmethod int FolderListModel::indexOf(url file)
\since 5.6
- Get the index of the given file URL if the model contains it,
+ Returns the index of the given \a file URL if the model contains it,
or -1 if not.
*/
int QQuickFolderListModel::indexOf(const QUrl &file) const
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index a87b0a59f6..9973883024 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -28,6 +28,6 @@ qtHaveModule(quick) {
qtConfig(quick-particles): \
SUBDIRS += particles
- qtConfig(quick-path):qtConfig(thread): SUBDIRS += shapes
+ qtConfig(quick-path): SUBDIRS += shapes
}
diff --git a/src/imports/settings/qqmlsettings.cpp b/src/imports/settings/qqmlsettings.cpp
index 287a70363a..d43f9bafb7 100644
--- a/src/imports/settings/qqmlsettings.cpp
+++ b/src/imports/settings/qqmlsettings.cpp
@@ -473,7 +473,7 @@ QVariant QQmlSettings::value(const QString &key, const QVariant &defaultValue) c
/*!
\qmlmethod Settings::setValue(string key, var value)
- Sets the value of setting key to value. If the key already exists,
+ Sets the value of setting \a key to \a value. If the key already exists,
the previous value is overwritten.
\since Qt 5.12
diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp
index e68ea54707..fc28864746 100644
--- a/src/particles/qquickitemparticle.cpp
+++ b/src/particles/qquickitemparticle.cpp
@@ -59,32 +59,38 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::freeze(Item item)
- Suspends the flow of time for the logical particle which item represents, allowing you to control its movement.
+ Suspends the flow of time for the logical particle which \a item represents,
+ allowing you to control its movement.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::unfreeze(Item item)
- Restarts the flow of time for the logical particle which item represents, allowing it to be moved by the particle system again.
+ Restarts the flow of time for the logical particle which \a item represents,
+ allowing it to be moved by the particle system again.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::take(Item item, bool prioritize)
- Asks the ItemParticle to take over control of item positioning temporarily.
+ Asks the ItemParticle to take over control of \a item positioning temporarily.
It will follow the movement of a logical particle when one is available.
- By default items form a queue when waiting for a logical particle, but if prioritize is true then it will go immediately to the
- head of the queue.
+ By default items form a queue when waiting for a logical particle, but if
+ \a prioritize is \c true, then it will go immediately to the head of the
+ queue.
ItemParticle does not take ownership of the item, and will relinquish
control when the logical particle expires. Commonly at this point you will
want to put it back in the queue, you can do this with the below line in
the delegate definition:
+
\code
ItemParticle.onDetached: itemParticleInstance.take(delegateRootItem);
\endcode
+
or delete it, such as with the below line in the delegate definition:
+
\code
ItemParticle.onDetached: delegateRootItem.destroy();
\endcode
@@ -93,7 +99,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::give(Item item)
- Orders the ItemParticle to give you control of the item. It will cease controlling it and the item will lose its association to the logical particle.
+ Orders the ItemParticle to give you control of the \a item. It will cease
+ controlling it and the item will lose its association to the logical
+ particle.
*/
/*!
diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp
index 3d6035c577..ffbd5674f0 100644
--- a/src/particles/qquickparticleaffector.cpp
+++ b/src/particles/qquickparticleaffector.cpp
@@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE
themselves). As this executes JavaScript code per particle, it is not recommended to use this
signal with a high-volume particle system.
- x,y is the particle's current position.
+ (\a {x}, \a {y}) is the particle's current position.
The corresponding handler is \c onAffected.
*/
diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp
index 4e36ad149a..c0d9fa941d 100644
--- a/src/particles/qquickparticleemitter.cpp
+++ b/src/particles/qquickparticleemitter.cpp
@@ -191,10 +191,10 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Particles::Emitter::emitParticles(Array particles)
- This signal is emitted when particles are emitted. particles is a JavaScript
+ This signal is emitted when particles are emitted. \a particles is a JavaScript
array of Particle objects. You can modify particle attributes directly within the handler.
- Note that JavaScript is slower to execute, so it is not recommended to use this in
+ \note JavaScript is slower to execute, so it is not recommended to use this in
high-volume particle systems.
The corresponding handler is \c onEmitParticles.
@@ -202,19 +202,20 @@ QT_BEGIN_NAMESPACE
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count)
- Emits count particles from this emitter immediately.
+ Emits a number of particles, specified by \a count, from this emitter immediately.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count, int x, int y)
- Emits count particles from this emitter immediately. The particles are emitted
- as if the Emitter was positioned at x,y but all other properties are the same.
+ Emits a number of particles, specified by \a count, from this emitter immediately.
+ The particles are emitted as if the Emitter was positioned at (\a {x}, \a {y}) but
+ all other properties are the same.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::pulse(int duration)
- If the emitter is not enabled, enables it for duration milliseconds and then switches
- it back off.
+ If the emitter is not enabled, enables it for a specified \a duration
+ (in milliseconds) and then switches it back off.
*/
QQuickParticleEmitter::QQuickParticleEmitter(QQuickItem *parent) :
diff --git a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
index 26556644d6..43987354ae 100644
--- a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
+++ b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
@@ -407,8 +407,7 @@ located at the same level as the application that uses our new import module.
This way, the QML engine will find our module as the default search path for QML
imports includes the directory of the application executable. On \macos, the
plugin binary is copied to \c Contents/PlugIns in the the application bundle;
-this path is set in \l {tutorials/extending-qml/chapter6-plugins/app.pro}
-{chapter6-plugins/app.pro}:
+this path is set in \c {chapter6-plugins/app.pro}:
\quotefromfile tutorials/extending-qml/chapter6-plugins/app.pro
\skipto osx
diff --git a/src/qml/doc/src/javascript/qtjavascript.qdoc b/src/qml/doc/src/javascript/qtjavascript.qdoc
index ad93d9d9ac..aa4dce6a37 100644
--- a/src/qml/doc/src/javascript/qtjavascript.qdoc
+++ b/src/qml/doc/src/javascript/qtjavascript.qdoc
@@ -26,13 +26,6 @@
****************************************************************************/
/*!
- \group qtjavascript
- \title Scripting Classes and Overviews
-
- \brief Classes for embedding JavaScript in Qt/C++ applications.
-*/
-
-/*!
\page qtjavascript.html
\title Making Applications Scriptable
\ingroup frameworks-technologies
diff --git a/src/qml/doc/src/javascript/string.qdoc b/src/qml/doc/src/javascript/string.qdoc
index f896af3378..47922ff17a 100644
--- a/src/qml/doc/src/javascript/string.qdoc
+++ b/src/qml/doc/src/javascript/string.qdoc
@@ -39,8 +39,8 @@
/*!
\qmlmethod string String::arg(value)
- Returns a copy of this string with the lowest numbered place marker replaced by value,
- i.e., %1, %2, ..., %99. The following example prints "There are 20 items"
+ Returns a copy of this string with the lowest numbered place marker replaced by \a value,
+ i.e., %1, %2, ..., %99. The following example prints "There are 20 items":
\code
var message = "There are %1 items"
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 1bfd72227f..065fbc1c0a 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -615,7 +615,9 @@ QJSValue QJSEngine::newObject()
/*!
\since 5.12
- Creates a JavaScript object of class Error.
+
+ Creates a JavaScript object of class Error, with \a message as the error
+ message.
The prototype of the created object will be \a errorType.
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index be0de09d79..3d3f452073 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1761,6 +1761,12 @@ ReturnedValue ExecutionEngine::global()
QQmlRefPointer<ExecutableCompilationUnit> ExecutionEngine::compileModule(const QUrl &url)
{
+ QQmlMetaType::CachedUnitLookupError cacheError = QQmlMetaType::CachedUnitLookupError::NoError;
+ if (const QV4::CompiledData::Unit *cachedUnit = QQmlMetaType::findCachedCompilationUnit(url, &cacheError)) {
+ return ExecutableCompilationUnit::create(
+ QV4::CompiledData::CompilationUnit(cachedUnit, url.fileName(), url.toString()));
+ }
+
QFile f(QQmlFile::urlToLocalFileOrQrc(url));
if (!f.open(QIODevice::ReadOnly)) {
throwError(QStringLiteral("Could not open module %1 for reading").arg(url.toString()));
diff --git a/src/qml/qml/ftw/qintrusivelist.cpp b/src/qml/qml/ftw/qintrusivelist.cpp
index eb337a4de0..2ebaffb375 100644
--- a/src/qml/qml/ftw/qintrusivelist.cpp
+++ b/src/qml/qml/ftw/qintrusivelist.cpp
@@ -150,6 +150,10 @@ Returns an STL-style iterator pointing to the imaginary item after the last item
Remove the current object from the list, and return an iterator to the next element.
*/
+/*!
+ \class QIntrusiveListNode
+ \internal
+*/
/*!
\fn QIntrusiveListNode::QIntrusiveListNode()
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 355150b786..d634a48443 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -229,8 +229,10 @@ OwnPropertyKeyIterator *QtObject::virtualOwnPropertyKeys(const Object *m, Value
}
/*!
-\qmlmethod bool Qt::isQtObject(object)
-Returns true if \c object is a valid reference to a Qt or QML object, otherwise false.
+ \qmlmethod bool Qt::isQtObject(object)
+
+ Returns \c true if \a object is a valid reference to a Qt or QML object,
+ \c false otherwise.
*/
ReturnedValue QtObject::method_isQtObject(const FunctionObject *, const Value *, const Value *argv, int argc)
{
@@ -241,10 +243,10 @@ ReturnedValue QtObject::method_isQtObject(const FunctionObject *, const Value *,
}
/*!
-\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
+ \qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
-Returns a color with the specified \c red, \c green, \c blue and \c alpha components.
-All components should be in the range 0-1 inclusive.
+ Returns a color with the specified \a red, \a green, \a blue, and \a alpha
+ components. All components should be in the range 0-1 (inclusive).
*/
ReturnedValue QtObject::method_rgba(const FunctionObject *f, const Value *, const Value *argv, int argc)
{
@@ -270,10 +272,10 @@ ReturnedValue QtObject::method_rgba(const FunctionObject *f, const Value *, cons
}
/*!
-\qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
+ \qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
-Returns a color with the specified \c hue, \c saturation, \c lightness and \c alpha components.
-All components should be in the range 0-1 inclusive.
+ Returns a color with the specified \a hue, \a saturation, \a lightness, and \a alpha
+ components. All components should be in the range 0-1 (inclusive).
*/
ReturnedValue QtObject::method_hsla(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -300,12 +302,12 @@ ReturnedValue QtObject::method_hsla(const FunctionObject *b, const Value *, cons
}
/*!
-\qmlmethod color Qt::hsva(real hue, real saturation, real value, real alpha)
+ \since 5.5
+ \qmlmethod color Qt::hsva(real hue, real saturation, real value, real alpha)
-Returns a color with the specified \c hue, \c saturation, \c value and \c alpha components.
-All components should be in the range 0-1 inclusive.
+ Returns a color with the specified \a hue, \a saturation, \a value and \a alpha
+ components. All components should be in the range 0-1 (inclusive).
-\since 5.5
*/
ReturnedValue QtObject::method_hsva(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -328,12 +330,12 @@ ReturnedValue QtObject::method_hsva(const FunctionObject *b, const Value *, cons
}
/*!
-\qmlmethod color Qt::colorEqual(color lhs, string rhs)
+ \qmlmethod color Qt::colorEqual(color lhs, string rhs)
-Returns true if both \c lhs and \c rhs yield equal color values. Both arguments
-may be either color values or string values. If a string value is supplied it
-must be convertible to a color, as described for the \l{colorbasictypedocs}{color}
-basic type.
+ Returns \c true if both \a lhs and \a rhs yield equal color values. Both
+ arguments may be either color values or string values. If a string value
+ is supplied it must be convertible to a color, as described for the
+ \l{colorbasictypedocs}{color} basic type.
*/
ReturnedValue QtObject::method_colorEqual(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -368,11 +370,9 @@ ReturnedValue QtObject::method_colorEqual(const FunctionObject *b, const Value *
}
/*!
-\qmlmethod rect Qt::rect(int x, int y, int width, int height)
-
-Returns a \c rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
+ \qmlmethod rect Qt::rect(int x, int y, int width, int height)
-The returned object has \c x, \c y, \c width and \c height attributes with the given values.
+ Returns a rect with the top-left corner at \a x, \a y and the specified \a width and \a height.
*/
ReturnedValue QtObject::method_rect(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -389,8 +389,9 @@ ReturnedValue QtObject::method_rect(const FunctionObject *b, const Value *, cons
}
/*!
-\qmlmethod point Qt::point(int x, int y)
-Returns a Point with the specified \c x and \c y coordinates.
+ \qmlmethod point Qt::point(int x, int y)
+
+ Returns a point with the specified \a x and \a y coordinates.
*/
ReturnedValue QtObject::method_point(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -405,8 +406,9 @@ ReturnedValue QtObject::method_point(const FunctionObject *b, const Value *, con
}
/*!
-\qmlmethod Qt::size(int width, int height)
-Returns a Size with the specified \c width and \c height.
+ \qmlmethod size Qt::size(int width, int height)
+
+ Returns a size with the specified \a width and \a height.
*/
ReturnedValue QtObject::method_size(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -421,12 +423,13 @@ ReturnedValue QtObject::method_size(const FunctionObject *b, const Value *, cons
}
/*!
-\qmlmethod Qt::font(object fontSpecifier)
-Returns a Font with the properties specified in the \c fontSpecifier object
-or the nearest matching font. The \c fontSpecifier object should contain
-key-value pairs where valid keys are the \l{fontbasictypedocs}{font} type's
-subproperty names, and the values are valid values for each subproperty.
-Invalid keys will be ignored.
+ \qmlmethod font Qt::font(object fontSpecifier)
+
+ Returns a font with the properties specified in the \a fontSpecifier object
+ or the nearest matching font. The \a fontSpecifier object should contain
+ key-value pairs where valid keys are the \l{fontbasictypedocs}{font} type's
+ subproperty names, and the values are valid values for each subproperty.
+ Invalid keys will be ignored.
*/
ReturnedValue QtObject::method_font(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -445,8 +448,9 @@ ReturnedValue QtObject::method_font(const FunctionObject *b, const Value *, cons
/*!
-\qmlmethod Qt::vector2d(real x, real y)
-Returns a Vector2D with the specified \c x and \c y.
+ \qmlmethod vector2d Qt::vector2d(real x, real y)
+
+ Returns a vector2d with the specified \a x and \a y values.
*/
ReturnedValue QtObject::method_vector2d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -463,8 +467,9 @@ ReturnedValue QtObject::method_vector2d(const FunctionObject *b, const Value *,
}
/*!
-\qmlmethod Qt::vector3d(real x, real y, real z)
-Returns a Vector3D with the specified \c x, \c y and \c z.
+ \qmlmethod vector3d Qt::vector3d(real x, real y, real z)
+
+ Returns a vector3d with the specified \a x, \a y, and \a z values.
*/
ReturnedValue QtObject::method_vector3d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -482,8 +487,9 @@ ReturnedValue QtObject::method_vector3d(const FunctionObject *b, const Value *,
}
/*!
-\qmlmethod Qt::vector4d(real x, real y, real z, real w)
-Returns a Vector4D with the specified \c x, \c y, \c z and \c w.
+ \qmlmethod vector4d Qt::vector4d(real x, real y, real z, real w)
+
+ Returns a vector4d with the specified \a x, \a y, \a z, and \a w values.
*/
ReturnedValue QtObject::method_vector4d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -502,8 +508,9 @@ ReturnedValue QtObject::method_vector4d(const FunctionObject *b, const Value *,
}
/*!
-\qmlmethod Qt::quaternion(real scalar, real x, real y, real z)
-Returns a Quaternion with the specified \c scalar, \c x, \c y, and \c z.
+ \qmlmethod quaternion Qt::quaternion(real scalar, real x, real y, real z)
+
+ Returns a quaternion with the specified \a scalar, \a x, \a y, and \a z values.
*/
ReturnedValue QtObject::method_quaternion(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -522,13 +529,25 @@ ReturnedValue QtObject::method_quaternion(const FunctionObject *b, const Value *
}
/*!
-\qmlmethod Qt::matrix4x4(real m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
-Returns a Matrix4x4 with the specified values.
-Alternatively, the function may be called with a single argument
-where that argument is a JavaScript array which contains the sixteen
-matrix values.
-Finally, the function may be called with no arguments and the resulting
-matrix will be the identity matrix.
+ \qmlmethod matrix4x4 Qt::matrix4x4(real m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
+
+ Returns a matrix4x4 with the specified values.
+
+ The arguments correspond to their positions in the matrix:
+
+ \table
+ \row \li \a m11 \li \a m12 \li \a m13 \li \a m14
+ \row \li \a m21 \li \a m22 \li \a m23 \li \a m24
+ \row \li \a m31 \li \a m32 \li \a m33 \li \a m34
+ \row \li \a m41 \li \a m42 \li \a m43 \li \a m44
+ \endtable
+
+ Alternatively, the function may be called with a single argument
+ where that argument is a JavaScript array which contains the sixteen
+ matrix values.
+
+ Finally, the function may be called with no arguments and the resulting
+ matrix will be the identity matrix.
*/
ReturnedValue QtObject::method_matrix4x4(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -572,18 +591,19 @@ ReturnedValue QtObject::method_matrix4x4(const FunctionObject *b, const Value *,
}
/*!
-\qmlmethod color Qt::lighter(color baseColor, real factor)
-Returns a color lighter than \c baseColor by the \c factor provided.
+ \qmlmethod color Qt::lighter(color baseColor, real factor)
+
+ Returns a color lighter than \a baseColor by the \a factor provided.
-If the factor is greater than 1.0, this functions returns a lighter color.
-Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
-the return color is darker, but we recommend using the Qt.darker() function for this purpose.
-If the factor is 0 or negative, the return value is unspecified.
+ If the factor is greater than 1.0, this functions returns a lighter color.
+ Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
+ the return color is darker, but we recommend using the Qt.darker() function for this purpose.
+ If the factor is 0 or negative, the return value is unspecified.
-The function converts the current RGB color to HSV, multiplies the value (V) component
-by factor and converts the color back to RGB.
+ The function converts the current RGB color to HSV, multiplies the value (V) component
+ by factor and converts the color back to RGB.
-If \c factor is not supplied, returns a color 50% lighter than \c baseColor (factor 1.5).
+ If \a factor is not supplied, returns a color that is 50% lighter than \a baseColor (factor 1.5).
*/
ReturnedValue QtObject::method_lighter(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -610,19 +630,20 @@ ReturnedValue QtObject::method_lighter(const FunctionObject *b, const Value *, c
}
/*!
-\qmlmethod color Qt::darker(color baseColor, real factor)
-Returns a color darker than \c baseColor by the \c factor provided.
+ \qmlmethod color Qt::darker(color baseColor, real factor)
-If the factor is greater than 1.0, this function returns a darker color.
-Setting factor to 3.0 returns a color that has one-third the brightness.
-If the factor is less than 1.0, the return color is lighter, but we recommend using
-the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
-value is unspecified.
+ Returns a color darker than \a baseColor by the \a factor provided.
-The function converts the current RGB color to HSV, divides the value (V) component
-by factor and converts the color back to RGB.
+ If the factor is greater than 1.0, this function returns a darker color.
+ Setting factor to 3.0 returns a color that has one-third the brightness.
+ If the factor is less than 1.0, the return color is lighter, but we recommend using
+ the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
+ value is unspecified.
-If \c factor is not supplied, returns a color 50% darker than \c baseColor (factor 2.0).
+ The function converts the current RGB color to HSV, divides the value (V) component
+ by factor and converts the color back to RGB.
+
+ If \a factor is not supplied, returns a color that is 50% darker than \a baseColor (factor 2.0).
*/
ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -650,7 +671,8 @@ ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, co
/*!
\qmlmethod color Qt::tint(color baseColor, color tintColor)
- This function allows tinting one color with another.
+
+ This function allows tinting one color (\a baseColor) with another (\a tintColor).
The tint color should usually be mostly transparent, or you will not be
able to see the underlying color. The below example provides a slight red
@@ -670,7 +692,8 @@ ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, co
\endqml
\image declarative-rect_tint.png
- Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.
+ Tint is most useful when a subtle change is intended to be conveyed due to some event;
+ you can then use tinting to more effectively tune the visible color.
*/
ReturnedValue QtObject::method_tint(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -708,8 +731,8 @@ ReturnedValue QtObject::method_tint(const FunctionObject *b, const Value *, cons
/*!
\qmlmethod string Qt::formatDate(datetime date, variant format)
-Returns a string representation of \c date, optionally formatted according
-to \c format.
+Returns a string representation of \a date, optionally formatted according
+to \a format.
The \a date parameter may be a JavaScript \c Date object, a \l{date}{date}
property, a QDate, or QDateTime value. The \a format parameter may be any of
@@ -752,8 +775,8 @@ ReturnedValue QtObject::method_formatDate(const FunctionObject *b, const Value *
/*!
\qmlmethod string Qt::formatTime(datetime time, variant format)
-Returns a string representation of \c time, optionally formatted according to
-\c format.
+Returns a string representation of \a time, optionally formatted according to
+\a format.
The \a time parameter may be a JavaScript \c Date object, a QTime, or QDateTime
value. The \a format parameter may be any of the possible format values as
@@ -801,10 +824,10 @@ ReturnedValue QtObject::method_formatTime(const FunctionObject *b, const Value *
/*!
\qmlmethod string Qt::formatDateTime(datetime dateTime, variant format)
-Returns a string representation of \c datetime, optionally formatted according to
-\c format.
+Returns a string representation of \a dateTime, optionally formatted according to
+\a format.
-The \a date parameter may be a JavaScript \c Date object, a \l{date}{date}
+The \a dateTime parameter may be a JavaScript \c Date object, a \l{date}{date}
property, a QDate, QTime, or QDateTime value.
If \a format is not provided, \a dateTime is formatted using
@@ -921,8 +944,8 @@ ReturnedValue QtObject::method_formatDateTime(const FunctionObject *b, const Val
/*!
\qmlmethod bool Qt::openUrlExternally(url target)
- Attempts to open the specified \c target url in an external application, based on the user's
- desktop preferences. Returns true if it succeeds, and false otherwise.
+ Attempts to open the specified \a target url in an external application, based on the user's
+ desktop preferences. Returns \c true if it succeeds, \c false otherwise.
\warning A return value of \c true indicates that the application has successfully requested
the operating system to open the URL in an external application. The external application may
@@ -942,6 +965,7 @@ ReturnedValue QtObject::method_openUrlExternally(const FunctionObject *b, const
/*!
\qmlmethod url Qt::resolvedUrl(url url)
+
Returns \a url resolved relative to the URL of the caller.
*/
ReturnedValue QtObject::method_resolvedUrl(const FunctionObject *b, const Value *, const Value *argv, int argc)
@@ -967,6 +991,7 @@ ReturnedValue QtObject::method_resolvedUrl(const FunctionObject *b, const Value
/*!
\qmlmethod list<string> Qt::fontFamilies()
+
Returns a list of the font families available to the application.
*/
ReturnedValue QtObject::method_fontFamilies(const FunctionObject *b, const Value *, const Value *, int argc)
@@ -980,7 +1005,7 @@ ReturnedValue QtObject::method_fontFamilies(const FunctionObject *b, const Value
/*!
\qmlmethod string Qt::md5(data)
-Returns a hex string of the md5 hash of \c data.
+Returns a hex string of the md5 hash of \a data.
*/
ReturnedValue QtObject::method_md5(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -995,7 +1020,7 @@ ReturnedValue QtObject::method_md5(const FunctionObject *b, const Value *, const
/*!
\qmlmethod string Qt::btoa(data)
-Binary to ASCII - this function returns a base64 encoding of \c data.
+Binary to ASCII - this function returns a base64 encoding of \a data.
*/
ReturnedValue QtObject::method_btoa(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@@ -1043,9 +1068,9 @@ ReturnedValue QtObject::method_quit(const FunctionObject *b, const Value *, cons
This function causes the QQmlEngine::exit(int) signal to be emitted.
Within the \l {Prototyping with qmlscene}, this causes the launcher application to exit
- the specified return code. To exit from the event loop with a specified return code when this
- method is called, a C++ application can connect the QQmlEngine::exit(int) signal
- to the QCoreApplication::exit(int) slot.
+ the specified return code (\a retCode). To exit from the event loop with a specified
+ return code when this method is called, a C++ application can connect the
+ QQmlEngine::exit(int) signal to the QCoreApplication::exit(int) slot.
\sa quit()
*/
@@ -1318,13 +1343,13 @@ ReturnedValue QtObject::method_createComponent(const FunctionObject *b, const Va
\qmlmethod Qt::locale(name)
Returns a JS object representing the locale with the specified
- name, which has the format "language[_territory][.codeset][@modifier]"
+ \a name, which has the format "language[_territory][.codeset][@modifier]"
or "C", where:
\list
- \li language is a lowercase, two-letter, ISO 639 language code,
- \li territory is an uppercase, two-letter, ISO 3166 country code,
- \li and codeset and modifier are ignored.
+ \li \c language is a lowercase, two-letter, ISO 639 language code,
+ \li \c territory is an uppercase, two-letter, ISO 3166 country code, and
+ \li \c codeset and \c modifier are ignored.
\endlist
If the string violates the locale format, or language is not a
@@ -1372,7 +1397,8 @@ DEFINE_OBJECT_VTABLE(QQmlBindingFunction);
/*!
\qmlmethod Qt::binding(function)
- Returns a JavaScript object representing a \l{Property Binding}{property binding}.
+ Returns a JavaScript object representing a \l{Property Binding}{property binding},
+ with a \a function that evaluates the binding.
There are two main use-cases for the function: firstly, to apply a
property binding imperatively from JavaScript code:
diff --git a/src/qml/util/qqmlpropertymap.cpp b/src/qml/util/qqmlpropertymap.cpp
index 3f78ca6b69..82f048d9d9 100644
--- a/src/qml/util/qqmlpropertymap.cpp
+++ b/src/qml/util/qqmlpropertymap.cpp
@@ -180,6 +180,10 @@ int QQmlPropertyMapMetaObject::createProperty(const char *name, const char *valu
\note When deriving a class from QQmlPropertyMap, use the
\l {QQmlPropertyMap::QQmlPropertyMap(DerivedType *derived, QObject *parent)} {protected two-argument constructor}
which ensures that the class is correctly registered with the Qt \l {Meta-Object System}.
+
+ \note The QMetaObject of a QQmlPropertyMap is dynamically generated and modified.
+ Operations on that meta object are not thread safe, so applications need to take
+ care to explicitly synchronize access to the meta object.
*/
/*!
diff --git a/src/qmlmodels/qqmldelegatecomponent.cpp b/src/qmlmodels/qqmldelegatecomponent.cpp
index ccb0d60053..cc3b38ec93 100644
--- a/src/qmlmodels/qqmldelegatecomponent.cpp
+++ b/src/qmlmodels/qqmldelegatecomponent.cpp
@@ -59,19 +59,6 @@ QVariant QQmlAbstractDelegateComponent::value(QQmlAdaptorModel *adaptorModel, in
}
/*!
- \qmlmodule Qt.labs.qmlmodels 1.0
- \title Qt Labs QML Models - QML Types
- \ingroup qmlmodules
- \brief The Qt Labs QML Models module provides various model-related types for use with views.
-
- To use this module, import the module with the following line:
-
- \qml
- import Qt.labs.qmlmodels 1.0
- \endqml
-*/
-
-/*!
\qmltype DelegateChoice
\instantiates QQmlDelegateChoice
\inqmlmodule Qt.labs.qmlmodels
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index 6c80f4a3e5..e7868517cd 100644
--- a/src/qmlmodels/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -540,10 +540,10 @@ void QQmlDelegateModel::setRootIndex(const QVariant &root)
\qmlmethod QModelIndex QtQml.Models::DelegateModel::modelIndex(int index)
QAbstractItemModel provides a hierarchical tree of data, whereas
- QML only operates on list data. This function assists in using
+ QML only operates on list data. This function assists in using
tree models in QML.
- Returns a QModelIndex for the specified index.
+ Returns a QModelIndex for the specified \a index.
This value can be assigned to rootIndex.
\sa rootIndex
diff --git a/src/qmlmodels/qqmlobjectmodel.cpp b/src/qmlmodels/qqmlobjectmodel.cpp
index b6330b4295..7409178616 100644
--- a/src/qmlmodels/qqmlobjectmodel.cpp
+++ b/src/qmlmodels/qqmlobjectmodel.cpp
@@ -328,7 +328,7 @@ QObject *QQmlObjectModel::get(int index) const
\qmlmethod QtQml.Models::ObjectModel::append(object item)
\since 5.6
- Appends a new item to the end of the model.
+ Appends a new \a item to the end of the model.
\code
objectModel.append(objectComponent.createObject())
@@ -346,7 +346,7 @@ void QQmlObjectModel::append(QObject *object)
\qmlmethod QtQml.Models::ObjectModel::insert(int index, object item)
\since 5.6
- Inserts a new item to the model at position \a index.
+ Inserts a new \a item to the model at position \a index.
\code
objectModel.insert(2, objectComponent.createObject())
@@ -371,7 +371,7 @@ void QQmlObjectModel::insert(int index, QObject *object)
\qmlmethod QtQml.Models::ObjectModel::move(int from, int to, int n = 1)
\since 5.6
- Moves \a n items \a from one position \a to another.
+ Moves \e n items \a from one position \a to another.
The from and to ranges must exist; for example, to move the first 3 items
to the end of the model:
@@ -398,7 +398,7 @@ void QQmlObjectModel::move(int from, int to, int n)
\qmlmethod QtQml.Models::ObjectModel::remove(int index, int n = 1)
\since 5.6
- Removes the items at \a index from the model.
+ Removes \e n items at \a index from the model.
\sa clear()
*/
diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
index e4d837112f..7695bb57db 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
@@ -227,7 +227,7 @@ access to the data from QML:
The QSqlQueryModel class is good enough to implement a custom read-only
model that represents data in an SQL database. The
-\l{Qt Quick Controls 2 - Chat Tutorial}{chat tutorial} example
+\l{Qt Quick Controls - Chat Tutorial}{chat tutorial} example
demonstrates this very well by implementing a custom model to fetch the
contact details from an SQLite database.
diff --git a/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc b/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc
index dd7f21e81a..f4a1616943 100644
--- a/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc
+++ b/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc
@@ -45,9 +45,9 @@ UI. It is recommended to browse this list of UI controls before creating your
own custom UI control.
Besides these basic UI controls offered by Qt Quick itself, a rich set of UI
-controls are also available with Qt Quick Controls 2. They cater to the most
+controls are also available with Qt Quick Controls. They cater to the most
common use cases without any change, and offer a lot more possibilities with their
-customization options. In particular, Qt Quick Controls 2 provides styling
+customization options. In particular, Qt Quick Controls provides styling
options that align with the latest UI design trends. If these UI controls do not
satisfy your application's needs, only then it is recommended to create a
custom control.
@@ -55,7 +55,7 @@ custom control.
\section2 Related Information
\list
-\li \l{Qt Quick Controls 2}
+\li \l{Qt Quick Controls}
\li \l{Qt Quick}
\endlist
@@ -323,7 +323,7 @@ see \l {Choosing the Correct Integration Method Between C++ and QML}.
\section2 Related Information
\list
\li \l{Integrating QML and C++}
-\li \l{Qt Quick Controls 2 - Chat Tutorial}{Chat application tutorial}
+\li \l{Qt Quick Controls - Chat Tutorial}{Chat application tutorial}
\endlist
\section1 Using Qt Quick Layouts
@@ -426,7 +426,7 @@ developers to follow these tips:
\li Use anchors or the Qt Quick Layouts module to lay out the visual items.
\li Do not specify explicit width and height for a visual item.
\li Provide UI resources such as images and icons for each display resolution
- that your application supports. The Qt Quick Controls 2 gallery example
+ that your application supports. The Qt Quick Controls gallery example
demonstrates this well by providing the \c qt-logo.png for \c @2x, \c @3x,
and \c @4x resolutions, enabling the application to cater to high
resolution displays. Qt automatically chooses the appropriate
@@ -437,7 +437,7 @@ developers to follow these tips:
versions of an image, as is necessary with bitmap images.
\li Use font-based icons, such as Font Awesome. These scale to any display
resolution, and also allow colorization. The
- Qt Quick Controls 2 Text Editor example demonstrates this well.
+ Qt Quick Controls Text Editor example demonstrates this well.
\endlist
With this in place, your application's UI should scale depending
@@ -448,8 +448,8 @@ on the display resolution on offer.
\section2 Related Information
\list
- \li \l{Qt Quick Controls 2 - Gallery}{Gallery example}
- \li \l{Qt Quick Controls 2 - Text Editor}{Text Editor example}
+ \li \l{Qt Quick Controls - Gallery}{Gallery example}
+ \li \l{Qt Quick Controls - Text Editor}{Text Editor example}
\li \l{Font Awesome}
\li \l{Scalability}
\li \l{High DPI Displays}
diff --git a/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc b/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
index 0669ec06c8..84741efa61 100644
--- a/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
+++ b/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
@@ -39,15 +39,15 @@ information about them.
The Qt Quick Designer enables designing Qt Quick-based UIs using simple
drag-n-drop gestures that most designers are familiar with. It offers UI
-elements from the Qt Quick and Qt Quick Controls 2 modules, as well as
+elements from the Qt Quick and Qt Quick Controls modules, as well as
integration for custom UI elements.
The following is a list of example applications that use UIs created by
the Qt Quick Designer:
\list
- \li \l{Qt Quick Controls 2 - Contact List}
- \li \l{Qt Quick Controls 2 - Flat Style}
+ \li \l{Qt Quick Controls - Contact List}
+ \li \l{Qt Quick Controls - Flat Style}
\endlist
\section2 QML Debugger and Profiler
diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc
index 7f72217279..4b843f366b 100644
--- a/src/quick/doc/src/qtquick.qdoc
+++ b/src/quick/doc/src/qtquick.qdoc
@@ -43,7 +43,7 @@ QML types for creating user interfaces with the QML language, and a
\l{Qt Quick C++ Classes}{C++ API} for extending QML applications with C++ code.
\note A set of Qt Quick-based UI controls is also available to create user
-interfaces. See \l{Qt Quick Controls 2} for more information.
+interfaces. See \l{Qt Quick Controls} for more information.
For those new to QML and Qt Quick, please see
\l{QML Applications}
diff --git a/src/quick/handlers/qquickhoverhandler.cpp b/src/quick/handlers/qquickhoverhandler.cpp
index d7566f0cd8..a6325e084b 100644
--- a/src/quick/handlers/qquickhoverhandler.cpp
+++ b/src/quick/handlers/qquickhoverhandler.cpp
@@ -47,14 +47,24 @@ Q_LOGGING_CATEGORY(lcHoverHandler, "qt.quick.handler.hover")
/*!
\qmltype HoverHandler
\instantiates QQuickHoverHandler
+ \inherits SinglePointHandler
\inqmlmodule QtQuick
\ingroup qtquick-input-handlers
\brief Handler for mouse and tablet hover.
- HoverHandler detects a hovering cursor. Since touchscreens don't generally
- offer hover events, in practice it detects a hovering mouse or tablet stylus.
+ HoverHandler detects a hovering mouse or tablet stylus cursor.
- \sa MouseArea
+ A binding to the \l hovered property is the easiest way to react when the
+ cursor enters or leaves the \l {PointerHandler::parent}{parent} Item.
+ The \l {SinglePointHandler::point}{point} property provides more detail,
+ including the cursor position. The
+ \l {PointerDeviceHandler::acceptedDevices}{acceptedDevices},
+ \l {PointerDeviceHandler::acceptedPointerTypes}{acceptedPointerTypes},
+ and \l {PointerDeviceHandler::acceptedModifiers}{acceptedModifiers}
+ properties can be used to narrow the behavior to detect hovering of
+ specific kinds of devices or while holding a modifier key.
+
+ \sa MouseArea, PointHandler
*/
QQuickHoverHandler::QQuickHoverHandler(QQuickItem *parent)
@@ -97,6 +107,14 @@ void QQuickHoverHandler::handleEventPoint(QQuickEventPoint *point)
setPassiveGrab(point);
}
+/*!
+ \qmlproperty bool QtQuick::HoverHandler::hovered
+ \readonly
+
+ Holds true whenever any pointing device cursor (mouse or tablet) is within
+ the bounds of the \c parent Item, extended by the
+ \l {PointerHandler::margin}{margin}, if any.
+*/
void QQuickHoverHandler::setHovered(bool hovered)
{
if (m_hovered != hovered) {
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index a10064a665..7b26adbe6f 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -386,7 +386,7 @@ void QQuickTapHandler::updateTimeHeld()
That is, if you press and release a touchpoint or button within a time
period less than \l longPressThreshold, while any movement does not exceed
the drag threshold, then the \c tapped signal will be emitted at the time
- of release. The \c eventPoint signal parameter contains information
+ of release. The \a eventPoint signal parameter contains information
from the release event about the point that was tapped:
\snippet pointerHandlers/tapHandlerOnTapped.qml 0
@@ -399,7 +399,7 @@ void QQuickTapHandler::updateTimeHeld()
This signal is emitted when the \c parent Item is tapped once.
After an amount of time greater than QStyleHints::mouseDoubleClickInterval,
it can be tapped again; but if the time until the next tap is less,
- \l tapCount will increase. The \c eventPoint signal parameter contains
+ \l tapCount will increase. The \a eventPoint signal parameter contains
information from the release event about the point that was tapped.
*/
@@ -411,13 +411,13 @@ void QQuickTapHandler::updateTimeHeld()
short span of time (QStyleHints::mouseDoubleClickInterval()) and distance
(QStyleHints::mouseDoubleClickDistance() or
QStyleHints::touchDoubleTapDistance()). This signal always occurs after
- \l singleTapped, \l tapped, and \l tapCountChanged. The \c eventPoint
+ \l singleTapped, \l tapped, and \l tapCountChanged. The \a eventPoint
signal parameter contains information from the release event about the
point that was tapped.
*/
/*!
- \qmlsignal QtQuick::TapHandler::longPressed
+ \qmlsignal QtQuick::TapHandler::longPressed()
This signal is emitted when the \c parent Item is pressed and held for a
time period greater than \l longPressThreshold. That is, if you press and
@@ -427,7 +427,7 @@ void QQuickTapHandler::updateTimeHeld()
*/
/*!
- \qmlsignal QtQuick::TapHandler::tapCountChanged
+ \qmlsignal QtQuick::TapHandler::tapCountChanged()
This signal is emitted when the \c parent Item is tapped once or more (within
a specified time and distance span) and when the present \c tapCount differs
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index ac4e86d8da..b8e6d58af4 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -848,13 +848,15 @@ QSGTextureProvider *QQuickCanvasItem::textureProvider() const
The \a contextId parameter names the required context. The Canvas item
will return a context that implements the required drawing mode. After the
first call to getContext, any subsequent call to getContext with the same
- contextId will return the same context object.
+ contextId will return the same context object. Any additional arguments
+ (\a args) are currently ignored.
If the context type is not supported or the canvas has previously been
requested to provide a different and incompatible context type, \c null
will be returned.
Canvas only supports a 2d context.
+
*/
void QQuickCanvasItem::getContext(QQmlV4Function *args)
@@ -897,7 +899,7 @@ void QQuickCanvasItem::getContext(QQmlV4Function *args)
/*!
\qmlmethod int QtQuick::Canvas::requestAnimationFrame(callback)
- This function schedules callback to be invoked before composing the Qt Quick
+ This function schedules \a callback to be invoked before composing the Qt Quick
scene.
*/
@@ -960,7 +962,7 @@ void QQuickCanvasItem::requestPaint()
/*!
\qmlmethod QtQuick::Canvas::markDirty(rect area)
- Mark the given \a area as dirty, so that when this area is visible the
+ Marks the given \a area as dirty, so that when this area is visible the
canvas renderer will redraw it. This will trigger the \c paint signal.
\sa paint, requestPaint()
@@ -984,16 +986,16 @@ void QQuickCanvasItem::checkAnimationCallbacks()
}
/*!
- \qmlmethod bool QtQuick::Canvas::save(string filename)
+ \qmlmethod bool QtQuick::Canvas::save(string filename)
- Save the current canvas content into an image file \a filename.
- The saved image format is automatically decided by the \a filename's
- suffix.
+ Saves the current canvas content into an image file \a filename.
+ The saved image format is automatically decided by the \a filename's
+ suffix. Returns \c true on success.
- Note: calling this method will force painting the whole canvas, not just the
- current canvas visible window.
+ \note Calling this method will force painting the whole canvas, not just the
+ current canvas visible window.
- \sa canvasWindow, canvasSize, toDataURL()
+ \sa canvasWindow, canvasSize, toDataURL()
*/
bool QQuickCanvasItem::save(const QString &filename) const
{
@@ -1023,15 +1025,17 @@ QQmlRefPointer<QQuickCanvasPixmap> QQuickCanvasItem::loadedPixmap(const QUrl& ur
*/
/*!
- \qmlmethod QtQuick::Canvas::loadImage(url image)
- Loads the given \c image asynchronously.
+ \qmlmethod QtQuick::Canvas::loadImage(url image)
+
+ Loads the given \a image asynchronously.
- When the image is ready, \l imageLoaded will be emitted.
- The loaded image can be unloaded by the unloadImage() method.
+ Once the image is ready, imageLoaded() signal will be emitted.
+ The loaded image can be unloaded with the unloadImage() method.
- Note: Only loaded images can be painted on the Canvas item.
- \sa unloadImage, imageLoaded, isImageLoaded(),
- Context2D::createImageData(), Context2D::drawImage()
+ \note Only loaded images can be painted on the Canvas item.
+
+ \sa unloadImage(), imageLoaded(), isImageLoaded(),
+ Context2D::createImageData(), Context2D::drawImage()
*/
void QQuickCanvasItem::loadImage(const QUrl& url)
{
@@ -1051,14 +1055,15 @@ void QQuickCanvasItem::loadImage(const QUrl& url)
}
}
/*!
- \qmlmethod QtQuick::Canvas::unloadImage(url image)
- Unloads the \c image.
+ \qmlmethod QtQuick::Canvas::unloadImage(url image)
+
+ Unloads the \a image.
- Once an image is unloaded it cannot be painted by the canvas context
- unless it is loaded again.
+ Once an image is unloaded, it cannot be painted by the canvas context
+ unless it is loaded again.
- \sa loadImage(), imageLoaded, isImageLoaded(),
- Context2D::createImageData(), Context2D::drawImage
+ \sa loadImage(), imageLoaded(), isImageLoaded(),
+ Context2D::createImageData(), Context2D::drawImage
*/
void QQuickCanvasItem::unloadImage(const QUrl& url)
{
@@ -1067,10 +1072,11 @@ void QQuickCanvasItem::unloadImage(const QUrl& url)
}
/*!
- \qmlmethod QtQuick::Canvas::isImageError(url image)
- Returns true if the \a image failed to load.
+ \qmlmethod QtQuick::Canvas::isImageError(url image)
- \sa loadImage()
+ Returns \c true if the \a image failed to load, \c false otherwise.
+
+ \sa loadImage()
*/
bool QQuickCanvasItem::isImageError(const QUrl& url) const
{
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 48e5a4d4a2..54cda72a36 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -1148,6 +1148,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_scale(const QV4::FunctionO
/*!
\qmlmethod object QtQuick::Context2D::setTransform(real a, real b, real c, real d, real e, real f)
+
Changes the transformation matrix to the matrix given by the arguments as described below.
Modifying the transformation matrix directly enables you to perform scaling,
@@ -1160,21 +1161,22 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_scale(const QV4::FunctionO
\image qml-item-canvas-math.png
where:
\list
- \li \c{a} is the scale factor in the horizontal (x) direction
+ \li \a{a} is the scale factor in the horizontal (x) direction
\image qml-item-canvas-scalex.png
- \li \c{c} is the skew factor in the x direction
+ \li \a{c} is the skew factor in the x direction
\image qml-item-canvas-skewx.png
- \li \c{e} is the translation in the x direction
+ \li \a{e} is the translation in the x direction
\image qml-item-canvas-translate.png
- \li \c{b} is the skew factor in the y (vertical) direction
+ \li \a{b} is the skew factor in the y (vertical) direction
\image qml-item-canvas-skewy.png
- \li \c{d} is the scale factor in the y direction
+ \li \a{d} is the scale factor in the y direction
\image qml-item-canvas-scaley.png
- \li \c{f} is the translation in the y direction
+ \li \a{f} is the translation in the y direction
\image qml-item-canvas-translatey.png
\li the last row remains constant
\endlist
- The scale factors and skew factors are multiples; \c{e} and \c{f} are
+
+ The scale factors and skew factors are multiples; \a{e} and \a{f} are
coordinate space units, just like the units in the translate(x,y)
method.
@@ -1202,11 +1204,14 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_setTransform(const QV4::Fu
/*!
\qmlmethod object QtQuick::Context2D::transform(real a, real b, real c, real d, real e, real f)
- This method is very similar to setTransform(), but instead of replacing the old
- transform matrix, this method applies the given tranform matrix to the current matrix by multiplying to it.
+ This method is very similar to setTransform(), but instead of replacing
+ the old transform matrix, this method applies the given tranform matrix
+ to the current matrix by multiplying to it.
- The setTransform(a, b, c, d, e, f) method actually resets the current transform to the identity matrix,
- and then invokes the transform(a, b, c, d, e, f) method with the same arguments.
+ The setTransform(\a a, \a b, \a c, \a d, \a e, \a f) method actually
+ resets the current transform to the identity matrix, and then invokes
+ the transform(\a a, \a b, \a c, \a d, \a e, \a f) method with the same
+ arguments.
\sa setTransform()
*/
@@ -1626,9 +1631,12 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createLinearGradient(const
}
/*!
- \qmlmethod object QtQuick::Context2D::createRadialGradient(real x0, real y0, real r0, real x1, real y1, real r1)
- Returns a CanvasGradient object that represents a radial gradient that paints along the cone given by the start circle with
- origin (x0, y0) and radius r0, and the end circle with origin (x1, y1) and radius r1.
+ \qmlmethod object QtQuick::Context2D::createRadialGradient(real x0, real y0, real r0, real x1, real y1, real r1)
+
+ Returns a CanvasGradient object that represents a radial gradient that
+ paints along the cone given by the start circle with origin (\a x0, \a y0)
+ and radius \a r0, and the end circle with origin (\a x1, \a y1) and radius
+ \a r1.
\sa CanvasGradient::addColorStop()
\sa createLinearGradient()
@@ -1679,8 +1687,10 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createRadialGradient(const
/*!
\qmlmethod object QtQuick::Context2D::createConicalGradient(real x, real y, real angle)
- Returns a CanvasGradient object that represents a conical gradient that interpolate colors counter-clockwise around a center point (\c x, \c y)
- with start angle \c angle in units of radians.
+
+ Returns a CanvasGradient object that represents a conical gradient that
+ interpolates colors counter-clockwise around a center point (\a x, \a y)
+ with a start angle \a angle in units of radians.
\sa CanvasGradient::addColorStop()
\sa createLinearGradient()
@@ -2263,8 +2273,10 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_path(const QV4::FunctionObject
//rects
/*!
- \qmlmethod object QtQuick::Context2D::clearRect(real x, real y, real w, real h)
- Clears all pixels on the canvas in the given rectangle to transparent black.
+ \qmlmethod object QtQuick::Context2D::clearRect(real x, real y, real w, real h)
+
+ Clears all pixels on the canvas in the rectangle specified by
+ (\a x, \a y, \a w, \a h) to transparent black.
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_clearRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2283,8 +2295,9 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_clearRect(const QV4::Funct
}
/*!
- \qmlmethod object QtQuick::Context2D::fillRect(real x, real y, real w, real h)
- Paint the specified rectangular area using the fillStyle.
+ \qmlmethod object QtQuick::Context2D::fillRect(real x, real y, real w, real h)
+
+ Paints a rectangular area specified by (\a x, \a y, \a w, \a h) using fillStyle.
\sa fillStyle
*/
@@ -2301,14 +2314,12 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillRect(const QV4::Functi
}
/*!
- \qmlmethod object QtQuick::Context2D::strokeRect(real x, real y, real w, real h)
- Stroke the specified rectangle's path using the strokeStyle, lineWidth, lineJoin,
- and (if appropriate) miterLimit attributes.
-
- \sa strokeStyle
- \sa lineWidth
- \sa lineJoin
- \sa miterLimit
+ \qmlmethod object QtQuick::Context2D::strokeRect(real x, real y, real w, real h)
+
+ Strokes the path of the rectangle specified by (\a x, \a y, \a w, \a h) using
+ strokeStyle, lineWidth, lineJoin, and (if appropriate) miterLimit attributes.
+
+ \sa strokeStyle, lineWidth, lineJoin, miterLimit
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2332,7 +2343,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeRect(const QV4::Func
circle whose center is at the point (\a x, \a y) and whose radius is
\a radius.
- Both \c startAngle and \c endAngle are measured from the x-axis in radians.
+ Both \a startAngle and \a endAngle are measured from the x-axis in radians.
\image qml-item-canvas-arc.png
@@ -2439,10 +2450,11 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_beginPath(const QV4::Funct
/*!
\qmlmethod object QtQuick::Context2D::bezierCurveTo(real cp1x, real cp1y, real cp2x, real cp2y, real x, real y)
- Adds a cubic bezier curve between the current position and the given endPoint using the control points specified by (\c cp1x, cp1y),
- and (\c cp2x, \c cp2y).
- After the curve is added, the current position is updated to be at the end point (\c x, \c y) of the curve.
+ Adds a cubic bezier curve between the current position and the given endPoint using the control points specified by (\a {cp1x}, \a {cp1y}),
+ and (\a {cp2x}, \a {cp2y}).
+ After the curve is added, the current position is updated to be at the end point (\a {x}, \a {y}) of the curve.
The following code produces the path shown below:
+
\code
ctx.strokeStyle = Qt.rgba(0, 0, 0, 1);
ctx.lineWidth = 1;
@@ -2451,7 +2463,9 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_beginPath(const QV4::Funct
ctx.bezierCurveTo(-10, 90, 210, 90, 180, 0);
ctx.stroke();
\endcode
+
\image qml-item-canvas-bezierCurveTo.png
+
\sa {http://www.w3.org/TR/2dcontext/#dom-context-2d-beziercurveto}{W3C 2d context standard for bezierCurveTo}
\sa {http://www.openrise.com/lab/FlowerPower/}{The beautiful flower demo by using bezierCurveTo}
*/
@@ -2550,7 +2564,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fill(const QV4::FunctionOb
/*!
\qmlmethod object QtQuick::Context2D::lineTo(real x, real y)
- Draws a line from the current position to the point (x, y).
+ Draws a line from the current position to the point at (\a x, \a y).
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_lineTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2574,7 +2588,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_lineTo(const QV4::Function
/*!
\qmlmethod object QtQuick::Context2D::moveTo(real x, real y)
- Creates a new subpath with the given point.
+ Creates a new subpath with a point at (\a x, \a y).
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_moveTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2595,11 +2609,12 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_moveTo(const QV4::Function
}
/*!
- \qmlmethod object QtQuick::Context2D::quadraticCurveTo(real cpx, real cpy, real x, real y)
+ \qmlmethod object QtQuick::Context2D::quadraticCurveTo(real cpx, real cpy, real x, real y)
- Adds a quadratic bezier curve between the current point and the endpoint (\c x, \c y) with the control point specified by (\c cpx, \c cpy).
+ Adds a quadratic bezier curve between the current point and the endpoint
+ (\a x, \a y) with the control point specified by (\a cpx, \a cpy).
- See \l{http://www.w3.org/TR/2dcontext/#dom-context-2d-quadraticcurveto}{W3C 2d context standard for quadraticCurveTo}
+ \sa {http://www.w3.org/TR/2dcontext/#dom-context-2d-quadraticcurveto}{W3C 2d context standard for quadraticCurveTo}
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_quadraticCurveTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2623,9 +2638,10 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_quadraticCurveTo(const QV4
}
/*!
- \qmlmethod object QtQuick::Context2D::rect(real x, real y, real w, real h)
+ \qmlmethod object QtQuick::Context2D::rect(real x, real y, real w, real h)
- Adds a rectangle at position (\c x, \c y), with the given width \c w and height \c h, as a closed subpath.
+ Adds a rectangle at position (\a x, \a y), with the given width \a w and
+ height \a h, as a closed subpath.
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_rect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2640,10 +2656,11 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_rect(const QV4::FunctionOb
}
/*!
- \qmlmethod object QtQuick::Context2D::roundedRect(real x, real y, real w, real h, real xRadius, real yRadius)
+ \qmlmethod object QtQuick::Context2D::roundedRect(real x, real y, real w, real h, real xRadius, real yRadius)
- Adds the given rectangle rect with rounded corners to the path. The \c xRadius and \c yRadius arguments specify the radius of the
- ellipses defining the corners of the rounded rectangle.
+ Adds a rounded-corner rectangle, specified by (\a x, \a y, \a w, \a h), to the path.
+ The \a xRadius and \a yRadius arguments specify the radius of the
+ ellipses defining the corners of the rounded rectangle.
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_roundedRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2663,12 +2680,14 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_roundedRect(const QV4::Fun
}
/*!
- \qmlmethod object QtQuick::Context2D::ellipse(real x, real y, real w, real h)
+ \qmlmethod object QtQuick::Context2D::ellipse(real x, real y, real w, real h)
- Creates an ellipse within the bounding rectangle defined by its top-left corner at (\a x, \ y), width \a w and height \a h,
- and adds it to the path as a closed subpath.
+ Creates an ellipse within the bounding rectangle defined by its top-left
+ corner at (\a x, \a y), width \a w and height \a h, and adds it to the
+ path as a closed subpath.
- The ellipse is composed of a clockwise curve, starting and finishing at zero degrees (the 3 o'clock position).
+ The ellipse is composed of a clockwise curve, starting and finishing at
+ zero degrees (the 3 o'clock position).
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_ellipse(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2686,8 +2705,11 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_ellipse(const QV4::Functio
/*!
\qmlmethod object QtQuick::Context2D::text(string text, real x, real y)
- Adds the given \c text to the path as a set of closed subpaths created from the current context font supplied.
- The subpaths are positioned so that the left end of the text's baseline lies at the point specified by (\c x, \c y).
+ Adds the given \a text to the path as a set of closed subpaths created
+ from the current context font supplied.
+
+ The subpaths are positioned so that the left end of the text's baseline
+ lies at the point specified by (\a x, \a y).
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_text(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -2712,9 +2734,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_text(const QV4::FunctionOb
Strokes the subpaths with the current stroke style.
- See \l{http://www.w3.org/TR/2dcontext/#dom-context-2d-stroke}{W3C 2d context standard for stroke}
-
- \sa strokeStyle
+ \sa strokeStyle, {http://www.w3.org/TR/2dcontext/#dom-context-2d-stroke}{W3C 2d context standard for stroke}
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_stroke(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)
{
@@ -2730,7 +2750,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_stroke(const QV4::Function
/*!
\qmlmethod object QtQuick::Context2D::isPointInPath(real x, real y)
- Returns true if the given point is in the current path.
+ Returns \c true if the point (\a x, \a y) is in the current path.
\sa {http://www.w3.org/TR/2dcontext/#dom-context-2d-ispointinpath}{W3C 2d context standard for isPointInPath}
*/
@@ -2948,7 +2968,9 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_textBaseline(const QV4::Functio
/*!
\qmlmethod object QtQuick::Context2D::fillText(text, x, y)
- Fills the given text at the given position.
+
+ Fills the specified \a text at the given position (\a x, \a y).
+
\sa font
\sa textAlign
\sa textBaseline
@@ -2972,13 +2994,15 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillText(const QV4::Functi
RETURN_RESULT(*thisObject);
}
/*!
- \qmlmethod object QtQuick::Context2D::strokeText(text, x, y)
- Strokes the given text at the given position.
- \sa font
- \sa textAlign
- \sa textBaseline
- \sa fillText
- */
+ \qmlmethod object QtQuick::Context2D::strokeText(text, x, y)
+
+ Strokes the given \a text at a position specified by (\a x, \a y).
+
+ \sa font
+ \sa textAlign
+ \sa textBaseline
+ \sa fillText
+*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeText(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
QV4::Scope scope(b);
@@ -3414,8 +3438,10 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createImageData(const QV4:
}
/*!
- \qmlmethod CanvasImageData QtQuick::Context2D::getImageData(real sx, real sy, real sw, real sh)
- Returns an CanvasImageData object containing the image data for the given rectangle of the canvas.
+ \qmlmethod CanvasImageData QtQuick::Context2D::getImageData(real x, real y, real w, real h)
+
+ Returns an CanvasImageData object containing the image data for the canvas
+ rectangle specified by (\a x, \a y, \a w, \a h).
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_getImageData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -3441,8 +3467,13 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_getImageData(const QV4::Fu
}
/*!
- \qmlmethod object QtQuick::Context2D::putImageData(CanvasImageData imageData, real dx, real dy, real dirtyX, real dirtyY, real dirtyWidth, real dirtyHeight)
- Paints the data from the given ImageData object onto the canvas. If a dirty rectangle (\a dirtyX, \a dirtyY, \a dirtyWidth, \a dirtyHeight) is provided, only the pixels from that rectangle are painted.
+ \qmlmethod object QtQuick::Context2D::putImageData(CanvasImageData imageData, real dx, real dy, real dirtyX, real dirtyY, real dirtyWidth, real dirtyHeight)
+
+ Paints the data from the given \a imageData object onto the canvas at
+ (\a dx, \a dy).
+
+ If a dirty rectangle (\a dirtyX, \a dirtyY, \a dirtyWidth, \a dirtyHeight)
+ is provided, only the pixels from that rectangle are painted.
*/
QV4::ReturnedValue QQuickJSContext2DPrototype::method_putImageData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
@@ -3535,16 +3566,18 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_putImageData(const QV4::Fu
*/
/*!
- \qmlmethod CanvasGradient QtQuick::CanvasGradient::addColorStop(real offsetof, string color)
- Adds a color stop with the given color to the gradient at the given offset.
- 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+ \qmlmethod CanvasGradient QtQuick::CanvasGradient::addColorStop(real offset, string color)
- For example:
- \code
- var gradient = ctx.createLinearGradient(0, 0, 100, 100);
- gradient.addColorStop(0.3, Qt.rgba(1, 0, 0, 1));
- gradient.addColorStop(0.7, 'rgba(0, 255, 255, 1');
- \endcode
+ Adds a color stop with the given \a color to the gradient at the given \a offset.
+ 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+
+ For example:
+
+ \code
+ var gradient = ctx.createLinearGradient(0, 0, 100, 100);
+ gradient.addColorStop(0.3, Qt.rgba(1, 0, 0, 1));
+ gradient.addColorStop(0.7, 'rgba(0, 255, 255, 1');
+ \endcode
*/
QV4::ReturnedValue QQuickContext2DStyle::gradient_proto_addColorStop(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
{
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index 028b2b153d..8fe1929a2c 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -752,7 +752,11 @@ void QQuickDragAttached::cancel()
This signal is emitted when a drag finishes and the drag was started with the
\l startDrag() method or started automatically using the \l dragType property.
+ \a dropAction holds the action accepted by the target item.
+
The corresponding handler is \c onDragFinished.
+
+ \sa drop()
*/
Qt::DropAction QQuickDragAttachedPrivate::startDrag(Qt::DropActions supportedActions)
diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp
index f96d6b6244..76be8cc261 100644
--- a/src/quick/items/qquickdroparea.cpp
+++ b/src/quick/items/qquickdroparea.cpp
@@ -211,7 +211,7 @@ qreal QQuickDropAreaDrag::y() const
/*!
\qmlsignal QtQuick::DropArea::positionChanged(DragEvent drag)
- This signal is emitted when the position of a drag has changed.
+ This signal is emitted when the position of a \a drag has changed.
The corresponding handler is \c onPositionChanged.
*/
@@ -313,7 +313,7 @@ void QQuickDropArea::dragLeaveEvent(QDragLeaveEvent *)
/*!
\qmlsignal QtQuick::DropArea::dropped(DragEvent drop)
- This signal is emitted when a drop event occurs within the bounds of
+ This signal is emitted when a \a drop event occurs within the bounds of
a DropArea.
The corresponding handler is \c onDropped.
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index fecfa5fd2d..e69e9cff46 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -1761,7 +1761,7 @@ void QQuickGridView::setSnapMode(SnapMode mode)
\list
\li The view is first created
- \li The view's \l model changes
+ \li The view's \l model changes in such a way that the visible delegates are completely replaced
\li The view's \l model is \l {QAbstractItemModel::reset()}{reset}, if the model is a QAbstractItemModel subclass
\endlist
@@ -1779,6 +1779,28 @@ void QQuickGridView::setSnapMode(SnapMode mode)
When the view is initialized, the view will create all the necessary items for the view,
then animate them to their correct positions within the view over one second.
+ However when scrolling the view later, the populate transition does not
+ run, even though delegates are being instantiated as they become visible.
+ When the model changes in a way that new delegates become visible, the
+ \l add transition is the one that runs. So you should not depend on the
+ \c populate transition to initialize properties in the delegate, because it
+ does not apply to every delegate. If your animation sets the \c to value of
+ a property, the property should initially have the \c to value, and the
+ animation should set the \c from value in case it is animated:
+
+ \code
+ GridView {
+ ...
+ delegate: Rectangle {
+ opacity: 1 // not necessary because it's the default; but don't set 0
+ ...
+ }
+ populate: Transition {
+ NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 1000 }
+ }
+ }
+ \endcode
+
For more details and examples on how to use view transitions, see the ViewTransition
documentation.
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index f2098f6732..7bc6eefe0a 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -470,7 +470,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor)
qRegisterMetaType<QQuickHandlerPoint>();
// The rest of the 5.12 revisions
+#if QT_CONFIG(quick_sprite)
qmlRegisterType<QQuickAnimatedSprite, 12>("QtQuick", 2, 12, "AnimatedSprite");
+#endif
qmlRegisterType<QQuickGradient, 12>(uri, 2, 12, "Gradient");
qmlRegisterType<QQuickFlickable, 12>(uri, 2, 12, "Flickable");
qmlRegisterType<QQuickText, 12>(uri, 2, 12, "Text");
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 146917c679..8b70ffd0d7 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -2727,7 +2727,7 @@ void QQuickListView::setFooterPositioning(QQuickListView::FooterPositioning posi
\list
\li The view is first created
- \li The view's \l model changes
+ \li The view's \l model changes in such a way that the visible delegates are completely replaced
\li The view's \l model is \l {QAbstractItemModel::reset()}{reset}, if the model is a QAbstractItemModel subclass
\endlist
@@ -2745,6 +2745,27 @@ void QQuickListView::setFooterPositioning(QQuickListView::FooterPositioning posi
When the view is initialized, the view will create all the necessary items for the view,
then animate them to their correct positions within the view over one second.
+ However when scrolling the view later, the populate transition does not
+ run, even though delegates are being instantiated as they become visible.
+ When the model changes in a way that new delegates become visible, the
+ \l add transition is the one that runs. So you should not depend on the
+ \c populate transition to initialize properties in the delegate, because it
+ does not apply to every delegate. If your animation sets the \c to value of
+ a property, the property should initially have the \c to value, and the
+ animation should set the \c from value in case it is animated:
+
+ \code
+ ListView {
+ ...
+ delegate: Rectangle {
+ opacity: 1 // not necessary because it's the default
+ }
+ populate: Transition {
+ NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 1000 }
+ }
+ }
+ \endcode
+
For more details and examples on how to use view transitions, see the ViewTransition
documentation.
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index a8f09dc8be..a0c46d0bc6 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -431,7 +431,7 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i
This signal is emitted in response to both mouse wheel and trackpad scroll gestures.
- The \l {WheelEvent}{wheel} parameter provides information about the event, including the x and y
+ The \a wheel parameter provides information about the event, including the x and y
position, any buttons currently pressed, and information about the wheel movement, including
angleDelta and pixelDelta.
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp
index 3eca535a67..70426a6a8c 100644
--- a/src/quick/items/qquickmultipointtoucharea.cpp
+++ b/src/quick/items/qquickmultipointtoucharea.cpp
@@ -410,7 +410,7 @@ void QQuickTouchPoint::setUniqueId(const QPointingDeviceUniqueId &id)
area should grab the current touch points. By default they will not be grabbed; to grab them call \c gesture.grab(). If the
gesture is not grabbed, the nesting Flickable, for example, would also have an opportunity to grab.
- The gesture object also includes information on the current set of \c touchPoints and the \c dragThreshold.
+ The \a gesture object also includes information on the current set of \c touchPoints and the \c dragThreshold.
The corresponding handler is \c onGestureStarted.
*/
diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp
index b057fd9d8f..b17e505f4f 100644
--- a/src/quick/items/qquickscreen.cpp
+++ b/src/quick/items/qquickscreen.cpp
@@ -229,7 +229,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmlattachedmethod int Screen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
- Returns the rotation angle, in degrees, between the two specified angles.
+ Returns the rotation angle, in degrees, between the specified screen
+ orientations \a a and \a b.
*/
/*!
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 75e0a1018f..db579c74bc 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -1823,18 +1823,9 @@ void QQuickTableViewPrivate::beginRebuildTable()
void QQuickTableViewPrivate::layoutAfterLoadingInitialTable()
{
- if (rebuildOptions.testFlag(RebuildOption::LayoutOnly)
- || rowHeightProvider.isUndefined() || columnWidthProvider.isUndefined()) {
- // Since we don't have both size providers, we need to calculate the
- // size of each row and column based on the size of the delegate items.
- // This couldn't be done while we were loading the initial rows and
- // columns, since during the process, we didn't have all the items
- // available yet for the calculation. So we do it now. The exception
- // is if we specifically only requested a relayout.
- clearEdgeSizeCache();
- relayoutTableItems();
- syncLoadedTableRectFromLoadedTable();
- }
+ clearEdgeSizeCache();
+ relayoutTableItems();
+ syncLoadedTableRectFromLoadedTable();
if (syncView || rebuildOptions.testFlag(RebuildOption::All)) {
// We try to limit how often we update the content size. The main reason is that is has a
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index 5c4ecd60aa..ab3b0c4605 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -794,8 +794,6 @@ void QQuickTextControl::timerEvent(QTimerEvent *e)
d->cursorOn = !d->cursorOn;
d->repaintCursor();
- } else if (e->timerId() == d->tripleClickTimer.timerId()) {
- d->tripleClickTimer.stop();
}
}
@@ -1058,7 +1056,7 @@ void QQuickTextControlPrivate::mousePressEvent(QMouseEvent *e, const QPointF &po
commitPreedit();
#endif
- if (tripleClickTimer.isActive()
+ if ((e->timestamp() < (timestampAtLastDoubleClick + QGuiApplication::styleHints()->mouseDoubleClickInterval()))
&& ((pos - tripleClickPoint).toPoint().manhattanLength() < QGuiApplication::styleHints()->startDragDistance())) {
cursor.movePosition(QTextCursor::StartOfBlock);
@@ -1068,7 +1066,7 @@ void QQuickTextControlPrivate::mousePressEvent(QMouseEvent *e, const QPointF &po
anchorOnMousePress = QString();
- tripleClickTimer.stop();
+ timestampAtLastDoubleClick = 0; // do not enter this condition in case of 4(!) rapid clicks
} else {
int cursorPos = q->hitTest(pos, Qt::FuzzyHit);
if (cursorPos == -1) {
@@ -1267,7 +1265,7 @@ void QQuickTextControlPrivate::mouseDoubleClickEvent(QMouseEvent *e, const QPoin
selectedWordOnDoubleClick = cursor;
tripleClickPoint = pos;
- tripleClickTimer.start(QGuiApplication::styleHints()->mouseDoubleClickInterval(), q);
+ timestampAtLastDoubleClick = e->timestamp();
if (doEmit) {
selectionChanged();
#if QT_CONFIG(clipboard)
diff --git a/src/quick/items/qquicktextcontrol_p_p.h b/src/quick/items/qquicktextcontrol_p_p.h
index 5648c31e21..d52200b49d 100644
--- a/src/quick/items/qquicktextcontrol_p_p.h
+++ b/src/quick/items/qquicktextcontrol_p_p.h
@@ -143,7 +143,7 @@ public:
QTextBlock blockWithMarkerUnderMousePress;
QBasicTimer cursorBlinkTimer;
- QBasicTimer tripleClickTimer;
+ ulong timestampAtLastDoubleClick = 0; // will only be set at a double click
#if QT_CONFIG(im)
int preeditCursor;
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 7414d7fd6a..c4e9c0d316 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -1074,7 +1074,7 @@ int QQuickTextEdit::positionAt(qreal x, qreal y) const
}
/*!
- \qmlmethod QtQuick::TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters)
+ \qmlmethod QtQuick::TextEdit::moveCursorSelection(int position, SelectionMode mode)
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
@@ -1085,7 +1085,7 @@ int QQuickTextEdit::positionAt(qreal x, qreal y) const
text range.
The selection mode specifies whether the selection is updated on a per character or a per word
- basis. If not specified the selection mode will default to TextEdit.SelectCharacters.
+ basis. If not specified the selection mode will default to \c {TextEdit.SelectCharacters}.
\list
\li TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
@@ -2828,7 +2828,7 @@ QString QQuickTextEdit::getFormattedText(int start, int end) const
/*!
\qmlmethod QtQuick::TextEdit::insert(int position, string text)
- Inserts \a text into the TextEdit at position.
+ Inserts \a text into the TextEdit at \a position.
*/
void QQuickTextEdit::insert(int position, const QString &text)
{
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 598ebb7a68..b1ad6a1c15 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -1359,8 +1359,8 @@ void QQuickTextInput::createCursor()
/*!
\qmlmethod rect QtQuick::TextInput::positionToRectangle(int pos)
- This function takes a character position and returns the rectangle that the
- cursor would occupy, if it was placed at that character position.
+ This function takes a character position \a pos and returns the rectangle
+ that the cursor would occupy, if it was placed at that character position.
This is similar to setting the cursorPosition, and then querying the cursor
rectangle, but the cursorPosition is not changed.
@@ -1390,10 +1390,10 @@ QRectF QQuickTextInput::positionToRectangle(int pos) const
}
/*!
- \qmlmethod int QtQuick::TextInput::positionAt(real x, real y, CursorPosition position = CursorBetweenCharacters)
+ \qmlmethod int QtQuick::TextInput::positionAt(real x, real y, CursorPosition position)
This function returns the character position at
- x and y pixels from the top left of the textInput. Position 0 is before the
+ \a x and \a y pixels from the top left of the textInput. Position 0 is before the
first character, position 1 is after the first character but before the second,
and so on until position text.length, which is after all characters.
@@ -1403,12 +1403,13 @@ QRectF QQuickTextInput::positionToRectangle(int pos) const
the first line and if it is below the text the position of the nearest character
on the last line will be returned.
- The cursor position type specifies how the cursor position should be resolved.
+ The cursor \a position parameter specifies how the cursor position should be resolved:
- \list
- \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
+ \value TextInput.CursorBetweenCharacters
+ Returns the position between characters that is nearest x.
+ This is the default value.
+ \value TextInput.CursorOnCharacter
+ Returns the position before the character that is nearest x.
*/
void QQuickTextInput::positionAt(QQmlV4Function *args) const
@@ -2132,7 +2133,7 @@ void QQuickTextInput::redo()
/*!
\qmlmethod QtQuick::TextInput::insert(int position, string text)
- Inserts \a text into the TextInput at position.
+ Inserts \a text into the TextInput at \a position.
*/
void QQuickTextInput::insert(int position, const QString &text)
@@ -2539,7 +2540,7 @@ void QQuickTextInput::moveCursorSelection(int position)
}
/*!
- \qmlmethod QtQuick::TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters)
+ \qmlmethod QtQuick::TextInput::moveCursorSelection(int position, SelectionMode mode)
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
@@ -2550,7 +2551,7 @@ void QQuickTextInput::moveCursorSelection(int position)
text range.
The selection mode specifies whether the selection is updated on a per character or a per word
- basis. If not specified the selection mode will default to TextInput.SelectCharacters.
+ basis. If not specified the selection mode will default to \c {TextInput.SelectCharacters}.
\list
\li TextInput.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
diff --git a/src/quick/util/qquickfontmetrics.cpp b/src/quick/util/qquickfontmetrics.cpp
index 42b3038c48..c9a9008180 100644
--- a/src/quick/util/qquickfontmetrics.cpp
+++ b/src/quick/util/qquickfontmetrics.cpp
@@ -327,10 +327,13 @@ QRectF QQuickFontMetrics::tightBoundingRect(const QString &text) const
/*!
\qmlmethod string QtQuick::FontMetrics::elidedText(string text, enumeration mode, real width, int flags)
- This method returns a returns an elided version of the string (i.e., a
+ This method returns an elided version of the string (i.e., a
string with "..." in it) if the string \a text is wider than \a width.
Otherwise, returns the original string.
+ The \a mode argument specifies the text elide mode; that is, where
+ the ellipsis should appear when displaying text that doesn't fit.
+
The \a flags argument is optional and currently only supports
\l {Qt::TextShowMnemonic}.
@@ -338,7 +341,7 @@ QRectF QQuickFontMetrics::tightBoundingRect(const QString &text) const
\l {QQuickTextMetrics::elidedText}{elidedText} property of
\l {QQuickTextMetrics::elidedText}{TextMetrics}.
- \sa {QFontMetricsF::elidedText()}
+ \sa Qt::TextElideMode, QFontMetricsF::elidedText()
*/
QString QQuickFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags) const
{
diff --git a/src/quickshapes/qquickshape.cpp b/src/quickshapes/qquickshape.cpp
index c1deb0dced..a7db65f16f 100644
--- a/src/quickshapes/qquickshape.cpp
+++ b/src/quickshapes/qquickshape.cpp
@@ -90,7 +90,7 @@ QQuickShapeStrokeFillParams::QQuickShapeStrokeFillParams()
/*!
\qmltype ShapePath
- \instantiates QQuickShapePath
+ //! \instantiates QQuickShapePath
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
@@ -517,7 +517,7 @@ void QQuickShapePath::resetFillGradient()
/*!
\qmltype Shape
- \instantiates QQuickShape
+ //! \instantiates QQuickShape
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
@@ -1142,7 +1142,7 @@ void QQuickShapePrivate::sync()
/*!
\qmltype ShapeGradient
- \instantiates QQuickShapeGradient
+ //! \instantiates QQuickShapeGradient
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
@@ -1193,7 +1193,7 @@ void QQuickShapeGradient::setSpread(SpreadMode mode)
/*!
\qmltype LinearGradient
- \instantiates QQuickShapeLinearGradient
+ //! \instantiates QQuickShapeLinearGradient
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
@@ -1284,7 +1284,7 @@ void QQuickShapeLinearGradient::setY2(qreal v)
/*!
\qmltype RadialGradient
- \instantiates QQuickShapeRadialGradient
+ //! \instantiates QQuickShapeRadialGradient
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
@@ -1437,7 +1437,7 @@ void QQuickShapeRadialGradient::setFocalRadius(qreal v)
/*!
\qmltype ConicalGradient
- \instantiates QQuickShapeConicalGradient
+ //! \instantiates QQuickShapeConicalGradient
\inqmlmodule QtQuick.Shapes
\ingroup qtquick-paths
\ingroup qtquick-views
diff --git a/tests/auto/qml/qmlcachegen/data/module.mjs b/tests/auto/qml/qmlcachegen/data/module.mjs
new file mode 100644
index 0000000000..6838766329
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/module.mjs
@@ -0,0 +1,6 @@
+
+import { helper } from "utils.mjs"
+
+export function entry() {
+ return helper()
+}
diff --git a/tests/auto/qml/qmlcachegen/data/utils.mjs b/tests/auto/qml/qmlcachegen/data/utils.mjs
new file mode 100644
index 0000000000..25a1f38709
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/utils.mjs
@@ -0,0 +1,4 @@
+
+export function helper() {
+ return "ok"
+}
diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
index 7bd4414302..53b26ccfae 100644
--- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro
+++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
@@ -15,7 +15,9 @@ RESOURCES += \
data/Enums.qml \
data/componentInItem.qml \
data/jsmoduleimport.qml \
- data/script.mjs
+ data/script.mjs \
+ data/module.mjs \
+ data/utils.mjs
workerscripts_test.files = \
data/worker.js \
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 102acf73d6..f89982f782 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -65,6 +65,7 @@ private slots:
void qrcScriptImport();
void fsScriptImport();
void moduleScriptImport();
+ void esModulesViaQJSEngine();
void enums();
@@ -605,6 +606,15 @@ void tst_qmlcachegen::moduleScriptImport()
}
}
+void tst_qmlcachegen::esModulesViaQJSEngine()
+{
+ QCOMPARE(QFileInfo(":/data/module.mjs").size(), 0);
+ QJSEngine engine;
+ QJSValue module = engine.importModule(":/data/module.mjs");
+ QJSValue result = module.property("entry").call();
+ QCOMPARE(result.toString(), "ok");
+}
+
void tst_qmlcachegen::enums()
{
QQmlEngine engine;
diff --git a/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml b/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml
new file mode 100644
index 0000000000..ecc79a9368
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.12
+import QtQuick.Window 2.3
+
+Item {
+ width: 640
+ height: 450
+
+ property alias tableView: tableView
+ property real delegateSize: 10
+ property int hideRow: -1
+
+ TableView {
+ id: tableView
+ width: 600
+ height: 400
+ anchors.margins: 1
+ clip: true
+ delegate: tableViewDelegate
+ columnSpacing: 1
+ rowSpacing: 1
+ columnWidthProvider: function(column) {
+ return -1
+ }
+ rowHeightProvider: function(row) {
+ if (row === hideRow)
+ return 0
+ return -1
+ }
+ }
+
+ Component {
+ id: tableViewDelegate
+ Rectangle {
+ objectName: "tableViewDelegate"
+ implicitWidth: row === 0 ? 10 : delegateSize
+ implicitHeight: column === 0 ? 10 : delegateSize
+ color: "lightgray"
+ border.width: 1
+
+ Text {
+ id: textItem
+ anchors.centerIn: parent
+ text: model.display
+ renderType: Text.NativeRendering
+ }
+ }
+ }
+
+}
+
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
index 19967efcd9..889175a228 100644
--- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
+++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
@@ -119,6 +119,7 @@ private slots:
void checkRowHeightProviderNegativeReturnValue();
void checkRowHeightProviderNotCallable();
void checkForceLayoutFunction();
+ void checkForceLayoutEndUpDoingALayout();
void checkContentWidthAndHeight();
void checkPageFlicking();
void checkExplicitContentWidthAndHeight();
@@ -560,6 +561,32 @@ void tst_QQuickTableView::checkForceLayoutFunction()
QCOMPARE(fxItem->item->width(), newColumnWidth);
}
+void tst_QQuickTableView::checkForceLayoutEndUpDoingALayout()
+{
+ // QTBUG-77074
+ // Check that we change the implicit size of the delegate after
+ // the initial loading, and at the same time hide some rows or
+ // columns, and then do a forceLayout(), we end up with a
+ // complete relayout that respects the new implicit size.
+ LOAD_TABLEVIEW("tweakimplicitsize.qml");
+
+ auto model = TestModelAsVariant(10, 10);
+
+ tableView->setModel(model);
+
+ WAIT_UNTIL_POLISHED;
+
+ const qreal newDelegateSize = 20;
+ view->rootObject()->setProperty("delegateSize", newDelegateSize);
+ // Hide a row, just to force the following relayout to
+ // do a complete reload (and not just a relayout)
+ view->rootObject()->setProperty("hideRow", 1);
+ tableView->forceLayout();
+
+ for (auto fxItem : tableViewPrivate->loadedItems)
+ QCOMPARE(fxItem->item->height(), newDelegateSize);
+}
+
void tst_QQuickTableView::checkContentWidthAndHeight()
{
// Check that contentWidth/Height reports the correct size of the
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index 33a6b829bc..facd63027e 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -2106,30 +2106,31 @@ void tst_qquicktextedit::mouseSelection()
textEditObject->setFocus(focus);
textEditObject->setFocusOnPress(focusOnPress);
+ // Avoid that the last click from the previous test data and the first click in the
+ // current test data happens so close in time that they are interpreted as a double click.
+ static const int moreThanDoubleClickInterval = QGuiApplication::styleHints()->mouseDoubleClickInterval() + 1;
+
// press-and-drag-and-release from x1 to x2
QPoint p1 = textEditObject->positionToRectangle(from).center().toPoint();
QPoint p2 = textEditObject->positionToRectangle(to).center().toPoint();
if (clicks == 2)
- QTest::mouseClick(&window, Qt::LeftButton, Qt::NoModifier, p1);
+ QTest::mouseClick(&window, Qt::LeftButton, Qt::NoModifier, p1, moreThanDoubleClickInterval);
else if (clicks == 3)
- QTest::mouseDClick(&window, Qt::LeftButton, Qt::NoModifier, p1);
+ QTest::mouseDClick(&window, Qt::LeftButton, Qt::NoModifier, p1, moreThanDoubleClickInterval);
+ // cancel the 500ms delta QTestLib adds in order to properly synthesize a triple click within the required interval
+ QTest::lastMouseTimestamp -= QTest::mouseDoubleClickInterval;
QTest::mousePress(&window, Qt::LeftButton, Qt::NoModifier, p1);
- if (clicks == 2) {
- // QTBUG-50022: Since qtbase commit beef975, QTestLib avoids generating
- // double click events by adding 500ms delta to release event timestamps.
- // Send a double click event by hand to ensure the correct sequence:
- // press, release, press, _dbl click_, move, release.
- QMouseEvent dblClickEvent(QEvent::MouseButtonDblClick, p1, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QGuiApplication::sendEvent(textEditObject, &dblClickEvent);
- }
QTest::mouseMove(&window, p2);
QTest::mouseRelease(&window, Qt::LeftButton, Qt::NoModifier, p2);
QTRY_COMPARE(textEditObject->selectedText(), selectedText);
// Clicking and shift to clicking between the same points should select the same text.
textEditObject->setCursorPosition(0);
- if (clicks > 1)
+ if (clicks > 1) {
QTest::mouseDClick(&window, Qt::LeftButton, Qt::NoModifier, p1);
+ // cancel the 500ms delta QTestLib adds in order to properly synthesize a triple click within the required interval
+ QTest::lastMouseTimestamp -= QTest::mouseDoubleClickInterval;
+ }
if (clicks != 2)
QTest::mouseClick(&window, Qt::LeftButton, Qt::NoModifier, p1);
QTest::mouseClick(&window, Qt::LeftButton, Qt::ShiftModifier, p2);
diff --git a/tests/manual/scenegraph_lancelot/hostinfo.sh b/tests/manual/scenegraph_lancelot/hostinfo.sh
deleted file mode 100644
index 6bad2ba467..0000000000
--- a/tests/manual/scenegraph_lancelot/hostinfo.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the QtQml module of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# printProperty(): prints a key-value pair from given key and cmd list.
-# If running cmd fails, or does not produce any stdout, nothing is printed.
-# Arguments: $1: key, $2: cmd, $3: optional, field specification as to cut(1) -f
-printProperty ()
-{
- key=$1
- val=`{ eval $2 ; } 2>/dev/null`
- [ -n "$3" ] && val=`echo $val | tr -s '[:blank:]' '\t' | cut -f$3`
- [ -n "$val" ] && echo $key: $val
-}
-
-# printEnvVar(): prints a key-value pair from given environment variable name.
-# key is printed as "Env_<varname>".
-# If the variable is undefined, nothing is printed.
-# Arguments: $1: varname
-
-printEnvVar ()
-{
- key=Env_$1
- val=`eval 'echo $'$1`
- [ -n "$val" ] && echo $key: $val
-}
-
-
-# printOnOff(): prints a key-value pair from given environment variable name.
-# If variable is defined, value is printed as "<key>-On"; otherwise "<key>-Off".
-# Arguments: $1: key $2: varname
-
-printOnOff ()
-{
- key=$1
- val=`eval 'echo $'$2`
- if [ -z "$val" ] ; then
- val=Off
- else
- val=On
- fi
- echo $key: $key-$val
-}
-
-# ------------
-
-printProperty Uname "uname -a"
-
-printProperty WlanMAC "ifconfig wlan0 | grep HWaddr" 5
-
-printEnvVar QMLSCENE_DEVICE
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
index 3f28d90e7b..95188ec0f8 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
@@ -81,6 +81,10 @@ tst_Scenegraph::tst_Scenegraph()
void tst_Scenegraph::initTestCase()
{
+ const char *backendVarName = "QT_QUICK_BACKEND";
+ const QString backend = qEnvironmentVariable(backendVarName, QString::fromLatin1("default"));
+ QBaselineTest::addClientProperty(QString::fromLatin1(backendVarName), backend);
+
QByteArray msg;
if (!QBaselineTest::connectToBaselineServer(&msg))
QSKIP(msg);