diff options
author | Ulf Hermann <[email protected]> | 2018-06-25 09:53:01 +0200 |
---|---|---|
committer | Liang Qi <[email protected]> | 2018-06-25 12:15:55 +0200 |
commit | fbf6f7400a5b5ae10267171e201391ce1ff8eb96 (patch) | |
tree | 18e22092c2764fea16442fd814f230d4fe095a49 | |
parent | c21a6a9f2c2d635aca3bf88a6431c560b16b1cc6 (diff) | |
parent | 9999591e69a0908cd3fbe14646fb98881e32061b (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
src/quick/handlers/qquickhandlerpoint.cpp
src/quick/handlers/qquicksinglepointhandler.cpp
tests/auto/qml/ecmascripttests/test262
Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
154 files changed, 723 insertions, 316 deletions
diff --git a/dist/changes-5.11.1 b/dist/changes-5.11.1 new file mode 100644 index 0000000000..ac48a4c828 --- /dev/null +++ b/dist/changes-5.11.1 @@ -0,0 +1,56 @@ +Qt 5.11.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +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. + +**************************************************************************** +* Qt 5.11.1 Changes * +**************************************************************************** + +QtQml +----- + + - Fix regression with .import in .js files not working when using + CONFIG+=qtquickcompiler. + - Fix QML declared enums with CONFIG+=qtquickcompiler. + - Enabled JIT on INTEGRITY ARM64. + - [QTBUG-68416] Fixed a crash when incubating objects with non-existent + initial properties. + - [QTBUG-68369] Fixed a crash when modifying objects used as prototypes. + - [QTBUG-68513] Fixed a crash in the modulus operation. + - [QTBUG-68522][QTBUG-68463][QTBUG-68474][QTBUG-68474] Fixed several QML + debugging issues. + - [QTBUG-68025] Fixed loading of composite singletons from resources. + - [QTBUG-65723] Fixed repeated loading of resources with slightly + different URLs. + +QtQuick +------- + + - [QTBUG-68490][QTBUG-68582] Fixed incorrect high-DPI scaling in the + sprite engine which was causing AnimatedSprite to render the wrong + region of the source image, or not at all. + - [QTBUG-65648][QTBUG-68030] Ungrabbing the touch or mouse event is now + more reliable in certain situations. + - [QTBUG-67960] Fixed an issue with Canvas Context2D createRadialGradient. + - [QTBUG-67427] Fixed a crash when changing the source of AnimatedImage + after a frame change. + - [QTBUG-40366] Fixed BorderImage high-DPI with the software renderer. + - [QTBUG-67024] Fixed a crash in mapToGlobal(). + - [QTBUG-44976] Fixed a DnD crash with Drag.Automatic when dragging + on a touchscreen. + - [QTBUG-59852] Fixed ListView.snapMode with non-zero ListView.spacing. diff --git a/examples/qml/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc index 30c074d765..e56dd90dd7 100644 --- a/examples/qml/doc/src/qml-extending.qdoc +++ b/examples/qml/doc/src/qml-extending.qdoc @@ -28,7 +28,7 @@ /*! \example referenceexamples/adding \title Extending QML - Adding Types Example -\brief Exporting C++ Classes +\brief Exporting C++ Classes. \ingroup qmlextendingexamples The Adding Types Example shows how to add a new object type, \c Person, to QML. @@ -65,7 +65,7 @@ loads and runs the QML snippet shown at the beginning of this page. /*! \example referenceexamples/extended \title Extending QML - Extension Objects Example -\brief Extension Objects +\brief Extension Objects. \ingroup qmlextendingexamples This example builds on: @@ -96,7 +96,7 @@ not be accessible to the QML engine. /*! \example referenceexamples/properties \title Extending QML - Object and List Property Types Example -\brief Exporting C++ Properties +\brief Exporting C++ Properties. \ingroup qmlextendingexamples This example builds on: @@ -146,7 +146,7 @@ loads and runs the QML snippet shown at the beginning of this page. /*! \example referenceexamples/coercion \title Extending QML - Inheritance and Coercion Example -\brief C++ Inheritance and Coercion +\brief C++ Inheritance and Coercion. \ingroup qmlextendingexamples This example builds on: @@ -211,7 +211,7 @@ loads and runs the QML snippet shown at the beginning of this page. /*! \example referenceexamples/default \title Extending QML - Default Property Example -\brief Default Property +\brief Default Property. \ingroup qmlextendingexamples This example builds on: @@ -249,7 +249,7 @@ loads and runs the QML snippet shown at the beginning of this page. /*! \example referenceexamples/grouped \title Extending QML - Grouped Properties Example -\brief Grouped Properties +\brief Grouped Properties. \ingroup qmlextendingexamples This example builds on: @@ -265,7 +265,7 @@ This example builds on: /*! \example referenceexamples/attached \title Extending QML - Attached Properties Example -\brief Attached Properties +\brief Attached Properties. \ingroup qmlextendingexamples This example builds on: @@ -282,7 +282,7 @@ This example builds on: /*! \example referenceexamples/signal \title Extending QML - Signal Support Example -\brief Signal Support +\brief Signal Support. \ingroup qmlextendingexamples This example builds on: @@ -300,7 +300,7 @@ This example builds on: /*! \example referenceexamples/methods \title Extending QML - Methods Example -\brief Methods Support +\brief Methods Support. \ingroup qmlextendingexamples This example builds on: @@ -324,7 +324,7 @@ In \c example.qml, the \c invite() method is called in the \l [QML]{QtQml::Compo /*! \example referenceexamples/valuesource \title Extending QML - Property Value Source Example -\brief Property Value Source +\brief Property Value Source. \ingroup qmlextendingexamples This example builds on: @@ -343,7 +343,7 @@ This example builds on: /*! \example referenceexamples/binding \title Extending QML - Binding Example -\brief Binding +\brief Binding. \ingroup qmlextendingexamples This example builds on: diff --git a/examples/qml/networkaccessmanagerfactory/doc/src/networkaccessmanagerfactory.qdoc b/examples/qml/networkaccessmanagerfactory/doc/src/networkaccessmanagerfactory.qdoc index f68ce138dc..443647c80b 100644 --- a/examples/qml/networkaccessmanagerfactory/doc/src/networkaccessmanagerfactory.qdoc +++ b/examples/qml/networkaccessmanagerfactory/doc/src/networkaccessmanagerfactory.qdoc @@ -28,7 +28,7 @@ /*! \example networkaccessmanagerfactory \title C++ Extensions: Network Access Manager Factory Example - \brief Implements a custom network access manager for the QML engine + \brief Implements a custom network access manager for the QML engine. This example shows how to use QQmlNetworkAccessManagerFactory to create a QNetworkAccessManager with a proxy. diff --git a/examples/qml/qml-i18n/doc/src/i18n.qdoc b/examples/qml/qml-i18n/doc/src/i18n.qdoc index e0ef452e52..dbc4efa58c 100644 --- a/examples/qml/qml-i18n/doc/src/i18n.qdoc +++ b/examples/qml/qml-i18n/doc/src/i18n.qdoc @@ -28,7 +28,7 @@ \title QML Examples - Internationalization \example qml-i18n \image qml-i18n-example.png - \brief This is an internationalization example + \brief This is an internationalization example. The QML runtime automatically loads a translation from the i18n subdirectory of the root QML file, based on the system language. diff --git a/examples/qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc b/examples/qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc index 3d215c66c3..752836e524 100644 --- a/examples/qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc +++ b/examples/qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc @@ -27,7 +27,7 @@ /*! \title Qt Quick Examples - XMLHttpRequest \example xmlhttprequest - \brief This is a collection of XMLHttpRequest examples + \brief This is a collection of XMLHttpRequest examples. \image qml-xmlhttprequest-example.png \e XMLHttpRequest contains a small QML example demonstrating \l{Qt QML}'s diff --git a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc b/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc index 5b9e2f5c9f..a45c8107cb 100644 --- a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc +++ b/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc @@ -29,7 +29,7 @@ \title TabWidget Example \example customitems/tabwidget \brief The TabWidget example shows how to create a tabwidget using property aliases - and QML Object default properties + and QML Object default properties. This example shows how to create a tab widget. It also demonstrates how \l {Property aliases}{property aliases} and diff --git a/examples/quick/draganddrop/doc/src/draganddrop.qdoc b/examples/quick/draganddrop/doc/src/draganddrop.qdoc index 437ed687a3..b740582cc4 100644 --- a/examples/quick/draganddrop/doc/src/draganddrop.qdoc +++ b/examples/quick/draganddrop/doc/src/draganddrop.qdoc @@ -27,7 +27,7 @@ /*! \title Qt Quick Examples - Drag and Drop \example draganddrop - \brief This is a collection of QML drag and drop examples + \brief This is a collection of QML drag and drop examples. \image qml-draganddrop-example.png \ingroup qtquickexamples diff --git a/examples/quick/imageprovider/imageprovider.cpp b/examples/quick/imageprovider/imageprovider.cpp index 662bd8bb70..2d927ea79a 100644 --- a/examples/quick/imageprovider/imageprovider.cpp +++ b/examples/quick/imageprovider/imageprovider.cpp @@ -56,7 +56,6 @@ #include <QImage> #include <QPainter> -//![0] class ColorImageProvider : public QQuickImageProvider { public: @@ -75,7 +74,6 @@ public: QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width, requestedSize.height() > 0 ? requestedSize.height() : height); pixmap.fill(QColor(id).rgba()); -//![0] // write the color name QPainter painter(&pixmap); @@ -87,11 +85,9 @@ public: painter.scale(requestedSize.width() / width, requestedSize.height() / height); painter.drawText(QRectF(0, 0, width, height), Qt::AlignCenter, id); -//![1] return pixmap; } }; -//![1] class ImageProviderExtensionPlugin : public QQmlExtensionPlugin diff --git a/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc b/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc index b2c91e05bb..deb1d62b2b 100644 --- a/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc +++ b/examples/quick/layouts/doc/src/qtquicklayouts-examples.qdoc @@ -27,7 +27,7 @@ /*! \title Qt Quick Layouts - Basic Example \example layouts - \brief Demonstrates how to use layout types to arrange a UI + \brief Demonstrates how to use layout types to arrange a UI. \image qtquicklayouts-example-layouts.png \ingroup qtquickexamples diff --git a/examples/quick/rendercontrol/doc/src/rendercontrol.qdoc b/examples/quick/rendercontrol/doc/src/rendercontrol.qdoc index 33c0a6712d..026a6f5a09 100644 --- a/examples/quick/rendercontrol/doc/src/rendercontrol.qdoc +++ b/examples/quick/rendercontrol/doc/src/rendercontrol.qdoc @@ -28,6 +28,6 @@ /*! \title QQuickRenderControl Example \example rendercontrol - \brief Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based OpenGL renderer + \brief Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based OpenGL renderer. \image rendercontrol-example.jpg */ diff --git a/examples/quick/window/doc/src/window.qdoc b/examples/quick/window/doc/src/window.qdoc index 207321f762..26caafce9a 100644 --- a/examples/quick/window/doc/src/window.qdoc +++ b/examples/quick/window/doc/src/window.qdoc @@ -27,7 +27,7 @@ /*! \title Qt Quick Examples - Window and Screen \example window - \brief This example demonstrates the Window and Screen types in QML + \brief This example demonstrates the Window and Screen types in QML. \image qml-window-example.png \ingroup qtquickexamples diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 32c709830a..7b2884df77 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -415,14 +415,14 @@ QModelIndex QQuickFolderListModel::index(int row, int , const QModelIndex &) con } /*! - \qmlproperty string FolderListModel::folder + \qmlproperty url FolderListModel::folder - The \a folder property holds a URL for the folder that the model is - currently providing. + The \a folder property holds a URL for the folder that the model + currently provides. The value must be a \c file: or \c qrc: URL, or a relative URL. - By default, the value is an invalid URL. + The default value is an invalid URL. */ QUrl QQuickFolderListModel::folder() const { diff --git a/src/imports/testlib/SignalSpy.qml b/src/imports/testlib/SignalSpy.qml index 85908091a0..52ed83e261 100644 --- a/src/imports/testlib/SignalSpy.qml +++ b/src/imports/testlib/SignalSpy.qml @@ -43,7 +43,7 @@ import QtTest 1.1 /*! \qmltype SignalSpy \inqmlmodule QtTest - \brief Enables introspection of signal emission + \brief Enables introspection of signal emission. \since 4.8 \ingroup qtquicktest diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index e1dee1e74d..535e29ee70 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -46,7 +46,7 @@ import Qt.test.qtestroot 1.0 /*! \qmltype TestCase \inqmlmodule QtTest - \brief Represents a unit test case + \brief Represents a unit test case. \since 4.8 \ingroup qtquicktest diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index dbfdd5cfb4..df0881092b 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -92,7 +92,7 @@ typedef QPair<int, int> QQuickXmlListRange; \qmltype XmlRole \instantiates QQuickXmlListModelRole \inqmlmodule QtQuick.XmlListModel - \brief For specifying a role to an XmlListModel + \brief For specifying a role to an XmlListModel. \ingroup qtquick-models \sa {Qt QML} @@ -628,7 +628,7 @@ void QQuickXmlListModelPrivate::clear_role(QQmlListProperty<QQuickXmlListModelRo \qmltype XmlListModel \instantiates QQuickXmlListModel \inqmlmodule QtQuick.XmlListModel - \brief For specifying a read-only model using XPath expressions + \brief For specifying a read-only model using XPath expressions. \ingroup qtquick-models diff --git a/src/particles/qquickage.cpp b/src/particles/qquickage.cpp index bf3d042e32..e8f760b37c 100644 --- a/src/particles/qquickage.cpp +++ b/src/particles/qquickage.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickAgeAffector \inqmlmodule QtQuick.Particles \inherits Affector - \brief For altering particle ages + \brief For altering particle ages. \ingroup qtquick-particles The Age affector allows you to alter where the particle is in its lifecycle. Common uses diff --git a/src/particles/qquickangledirection.cpp b/src/particles/qquickangledirection.cpp index 34afd9ce84..bc84865804 100644 --- a/src/particles/qquickangledirection.cpp +++ b/src/particles/qquickangledirection.cpp @@ -49,7 +49,7 @@ const qreal CONV = 0.017453292519943295; \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Direction - \brief For specifying a direction that varies in angle + \brief For specifying a direction that varies in angle. The AngledDirection element allows both the specification of a direction by angle and magnitude, as well as varying the parameters by angle or magnitude. diff --git a/src/particles/qquickcumulativedirection.cpp b/src/particles/qquickcumulativedirection.cpp index 447baf01d4..905d44cae9 100644 --- a/src/particles/qquickcumulativedirection.cpp +++ b/src/particles/qquickcumulativedirection.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickCumulativeDirection \inqmlmodule QtQuick.Particles \inherits Direction - \brief For specifying a direction made of other directions + \brief For specifying a direction made of other directions. \ingroup qtquick-particles The CumulativeDirection element will act as a direction that sums the directions within it. diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp index 0e3c656762..8528a6f750 100644 --- a/src/particles/qquickcustomparticle.cpp +++ b/src/particles/qquickcustomparticle.cpp @@ -88,7 +88,7 @@ struct PlainVertices { \instantiates QQuickCustomParticle \inqmlmodule QtQuick.Particles \inherits ParticlePainter - \brief For specifying shaders to paint particles + \brief For specifying shaders to paint particles. \ingroup qtquick-particles \note The maximum number of custom particles is limited to 16383. diff --git a/src/particles/qquickdirection.cpp b/src/particles/qquickdirection.cpp index 5439930a0e..2688b560cb 100644 --- a/src/particles/qquickdirection.cpp +++ b/src/particles/qquickdirection.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE \qmltype Direction \instantiates QQuickDirection \inqmlmodule QtQuick.Particles - \brief For specifying a vector space + \brief For specifying a vector space. \ingroup qtquick-particles diff --git a/src/particles/qquickellipseextruder.cpp b/src/particles/qquickellipseextruder.cpp index 52fccd6da9..c7aa138ff0 100644 --- a/src/particles/qquickellipseextruder.cpp +++ b/src/particles/qquickellipseextruder.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Shape - \brief Represents an ellipse to other particle system elements + \brief Represents an ellipse to other particle system elements. This shape can be used by Emitter subclasses and Affector subclasses to have them act upon an ellipse shaped area. diff --git a/src/particles/qquickfriction.cpp b/src/particles/qquickfriction.cpp index 718c1a0bf9..0b46b94d10 100644 --- a/src/particles/qquickfriction.cpp +++ b/src/particles/qquickfriction.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief For applying friction proportional to the particle's current velocity + \brief For applying friction proportional to the particle's current velocity. */ diff --git a/src/particles/qquickgravity.cpp b/src/particles/qquickgravity.cpp index 5ca126e64e..6def43896d 100644 --- a/src/particles/qquickgravity.cpp +++ b/src/particles/qquickgravity.cpp @@ -48,7 +48,7 @@ const qreal CONV = 0.017453292520444443; \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief For applying acceleration in an angle + \brief For applying acceleration in an angle. This element will accelerate all affected particles to a vector of the specified magnitude in the specified angle. If the angle and acceleration do diff --git a/src/particles/qquickgroupgoal.cpp b/src/particles/qquickgroupgoal.cpp index 02cbe5a621..67356ba8f6 100644 --- a/src/particles/qquickgroupgoal.cpp +++ b/src/particles/qquickgroupgoal.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief For changing the state of a group of a particle + \brief For changing the state of a group of a particle. */ /*! diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index abd7793a74..0b1de08ea3 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -471,7 +471,7 @@ void fillUniformArrayFromImage(float* array, const QImage& img, int size) \instantiates QQuickImageParticle \inqmlmodule QtQuick.Particles \inherits ParticlePainter - \brief For visualizing logical particles using an image + \brief For visualizing logical particles using an image. \ingroup qtquick-particles This element renders a logical particle as an image. The image can be diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp index 412390dffc..c5c18a201c 100644 --- a/src/particles/qquickitemparticle.cpp +++ b/src/particles/qquickitemparticle.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickItemParticle \inqmlmodule QtQuick.Particles \inherits ParticlePainter - \brief For specifying a delegate to paint particles + \brief For specifying a delegate to paint particles. \ingroup qtquick-particles */ diff --git a/src/particles/qquicklineextruder.cpp b/src/particles/qquicklineextruder.cpp index 670e656b8e..0fdba02734 100644 --- a/src/particles/qquicklineextruder.cpp +++ b/src/particles/qquicklineextruder.cpp @@ -45,7 +45,7 @@ \instantiates QQuickLineExtruder \inqmlmodule QtQuick.Particles \inherits Shape - \brief Represents a line for affectors and emitters + \brief Represents a line for affectors and emitters. \ingroup qtquick-particles */ diff --git a/src/particles/qquickmaskextruder.cpp b/src/particles/qquickmaskextruder.cpp index 6ab6dcc6a4..4c5d9e9d88 100644 --- a/src/particles/qquickmaskextruder.cpp +++ b/src/particles/qquickmaskextruder.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickMaskExtruder \inqmlmodule QtQuick.Particles \inherits Shape - \brief For representing an image as a shape to affectors and emitters + \brief For representing an image as a shape to affectors and emitters. \ingroup qtquick-particles */ diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp index 76089c1abd..3d6035c577 100644 --- a/src/particles/qquickparticleaffector.cpp +++ b/src/particles/qquickparticleaffector.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickParticleAffector \inqmlmodule QtQuick.Particles \brief Applies alterations to the attributes of logical particles at any - point in their lifetime + point in their lifetime. \ingroup qtquick-particles The base Affector does not alter any attributes, but can be used to emit a signal diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp index 78409d3a44..cd4cdcf3ef 100644 --- a/src/particles/qquickparticleemitter.cpp +++ b/src/particles/qquickparticleemitter.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \qmltype Emitter \instantiates QQuickParticleEmitter \inqmlmodule QtQuick.Particles - \brief Emits logical particles + \brief Emits logical particles. \ingroup qtquick-particles This element emits logical particles into the ParticleSystem, with the diff --git a/src/particles/qquickparticleextruder.cpp b/src/particles/qquickparticleextruder.cpp index 816ff34960..f56e288e09 100644 --- a/src/particles/qquickparticleextruder.cpp +++ b/src/particles/qquickparticleextruder.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE \qmltype Shape \instantiates QQuickParticleExtruder \inqmlmodule QtQuick.Particles - \brief For specifying an area for affectors and emitters + \brief For specifying an area for affectors and emitters. \ingroup qtquick-particles The base class is just a rectangle. diff --git a/src/particles/qquickparticlegroup.cpp b/src/particles/qquickparticlegroup.cpp index a42d2bcb13..052fda6eff 100644 --- a/src/particles/qquickparticlegroup.cpp +++ b/src/particles/qquickparticlegroup.cpp @@ -43,7 +43,7 @@ \qmltype ParticleGroup \instantiates QQuickParticleGroup \inqmlmodule QtQuick.Particles - \brief For setting attributes on a logical particle group + \brief For setting attributes on a logical particle group. \ingroup qtquick-particles This element allows you to set timed transitions on particle groups. diff --git a/src/particles/qquickparticlepainter.cpp b/src/particles/qquickparticlepainter.cpp index 13591be97a..e762b3ae1d 100644 --- a/src/particles/qquickparticlepainter.cpp +++ b/src/particles/qquickparticlepainter.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickParticlePainter \inqmlmodule QtQuick.Particles \inherits Item - \brief For specifying how to paint particles + \brief For specifying how to paint particles. \ingroup qtquick-particles The default implementation paints nothing. See the subclasses if you want to diff --git a/src/particles/qquickparticlesystem.cpp b/src/particles/qquickparticlesystem.cpp index 612675fec7..1499df0360 100644 --- a/src/particles/qquickparticlesystem.cpp +++ b/src/particles/qquickparticlesystem.cpp @@ -102,7 +102,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG) \qmltype ParticleSystem \instantiates QQuickParticleSystem \inqmlmodule QtQuick.Particles - \brief A system which includes particle painter, emitter, and affector types + \brief A system which includes particle painter, emitter, and affector types. \ingroup qtquick-particles */ diff --git a/src/particles/qquickpointattractor.cpp b/src/particles/qquickpointattractor.cpp index d7446842f2..cbc16f3a06 100644 --- a/src/particles/qquickpointattractor.cpp +++ b/src/particles/qquickpointattractor.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief For attracting particles towards a specific point + \brief For attracting particles towards a specific point. Note that the size and position of this element affects which particles it affects. The size of the point attracted to is always 0x0, and the location of that point diff --git a/src/particles/qquickpointdirection.cpp b/src/particles/qquickpointdirection.cpp index f22eea2a76..7b47fedf6b 100644 --- a/src/particles/qquickpointdirection.cpp +++ b/src/particles/qquickpointdirection.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Direction - \brief For specifying a direction that varies in x and y components + \brief For specifying a direction that varies in x and y components. The PointDirection element allows both the specification of a direction by x and y components, as well as varying the parameters by x or y component. diff --git a/src/particles/qquickrectangleextruder.cpp b/src/particles/qquickrectangleextruder.cpp index 36e4871d29..35207d34d2 100644 --- a/src/particles/qquickrectangleextruder.cpp +++ b/src/particles/qquickrectangleextruder.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE \qmltype RectangleShape \instantiates QQuickRectangleExtruder \inqmlmodule QtQuick.Particles - \brief For specifying an area for affectors and emitter + \brief For specifying an area for affectors and emitter. \ingroup qtquick-particles Just a rectangle. diff --git a/src/particles/qquickspritegoal.cpp b/src/particles/qquickspritegoal.cpp index 75d6f8bdf6..d372fd961c 100644 --- a/src/particles/qquickspritegoal.cpp +++ b/src/particles/qquickspritegoal.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-images-sprites \inherits Affector - \brief For changing the state of a sprite particle + \brief For changing the state of a sprite particle. */ /*! diff --git a/src/particles/qquicktargetdirection.cpp b/src/particles/qquicktargetdirection.cpp index 5d84f9dc2b..0a0eeb4a24 100644 --- a/src/particles/qquicktargetdirection.cpp +++ b/src/particles/qquicktargetdirection.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Direction - \brief For specifying a direction towards the target point + \brief For specifying a direction towards the target point. */ /*! diff --git a/src/particles/qquicktrailemitter.cpp b/src/particles/qquicktrailemitter.cpp index fde5eab617..f0a0b297e2 100644 --- a/src/particles/qquicktrailemitter.cpp +++ b/src/particles/qquicktrailemitter.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickTrailEmitter \inqmlmodule QtQuick.Particles \inherits QQuickParticleEmitter - \brief Emits logical particles from other logical particles + \brief Emits logical particles from other logical particles. \ingroup qtquick-particles This element emits logical particles into the ParticleSystem, with the diff --git a/src/particles/qquickturbulence.cpp b/src/particles/qquickturbulence.cpp index dc72d884bc..dff266a6ea 100644 --- a/src/particles/qquickturbulence.cpp +++ b/src/particles/qquickturbulence.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief Provides fluid-like forces from a noise image + \brief Provides fluid-like forces from a noise image. The Turbulence Element scales the noise source over the area it affects, and uses the curl of that source to generate force vectors. diff --git a/src/particles/qquickv4particledata.cpp b/src/particles/qquickv4particledata.cpp index cf05245f5b..fe0c92bf06 100644 --- a/src/particles/qquickv4particledata.cpp +++ b/src/particles/qquickv4particledata.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype Particle \inqmlmodule QtQuick.Particles - \brief Represents particles manipulated by emitters and affectors + \brief Represents particles manipulated by emitters and affectors. \ingroup qtquick-particles Particle elements are always managed internally by the ParticleSystem and cannot be created in QML. diff --git a/src/particles/qquickwander.cpp b/src/particles/qquickwander.cpp index a78482ec84..182bf4a099 100644 --- a/src/particles/qquickwander.cpp +++ b/src/particles/qquickwander.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick.Particles \ingroup qtquick-particles \inherits Affector - \brief For applying random particle trajectory + \brief For applying random particle trajectory. */ /*! diff --git a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp index c736b6414d..c256501301 100644 --- a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp +++ b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp @@ -40,6 +40,8 @@ #include "qpacketprotocol_p.h" #include <QtCore/QElapsedTimer> +#include <QtCore/QtEndian> + #include <private/qiodevice_p.h> #include <private/qobject_p.h> @@ -107,7 +109,7 @@ public: bool writeToDevice(const char *bytes, qint64 size); bool readFromDevice(char *buffer, qint64 size); - QList<qint64> sendingPackets; + QList<qint32> sendingPackets; QList<QByteArray> packets; QByteArray inProgress; qint32 inProgressSize; @@ -138,16 +140,23 @@ QPacketProtocol::QPacketProtocol(QIODevice *dev, QObject *parent) void QPacketProtocol::send(const QByteArray &data) { Q_D(QPacketProtocol); + static const qint32 maxSize = std::numeric_limits<qint32>::max() - sizeof(qint32); if (data.isEmpty()) return; // We don't send empty packets - const qint32 sendSize = data.size() + static_cast<qint32>(sizeof(qint32)); + if (data.size() > maxSize) { + emit error(); + return; + } + + const qint32 sendSize = data.size() + static_cast<qint32>(sizeof(qint32)); d->sendingPackets.append(sendSize); - if (!d->writeToDevice((const char *)&sendSize, sizeof(qint32)) + + qint32 sendSizeLE = qToLittleEndian(sendSize); + if (!d->writeToDevice((const char *)&sendSizeLE, sizeof(qint32)) || !d->writeToDevice(data.data(), data.size())) { emit error(); - return; } } @@ -238,10 +247,12 @@ void QPacketProtocol::readyToRead() return; // Read size header - if (!d->readFromDevice((char *)&d->inProgressSize, sizeof(qint32))) { + qint32 inProgressSizeLE; + if (!d->readFromDevice((char *)&inProgressSizeLE, sizeof(qint32))) { emit error(); return; } + d->inProgressSize = qFromLittleEndian(inProgressSizeLE); // Check sizing constraints if (d->inProgressSize < qint32(sizeof(qint32))) { diff --git a/src/qml/doc/snippets/code/doc_src_qtqml.cpp b/src/qml/doc/snippets/code/doc_src_qtqml.cpp new file mode 100644 index 0000000000..745e2f8f94 --- /dev/null +++ b/src/qml/doc/snippets/code/doc_src_qtqml.cpp @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] +#include <QtQml> +//! [0] diff --git a/src/qml/doc/snippets/code/doc_src_qtqml.pro b/src/qml/doc/snippets/code/doc_src_qtqml.pro new file mode 100644 index 0000000000..48dc3ebf6c --- /dev/null +++ b/src/qml/doc/snippets/code/doc_src_qtqml.pro @@ -0,0 +1,3 @@ +#! [0] +QT += qml +#! [0] diff --git a/src/qml/doc/src/javascript/date.qdoc b/src/qml/doc/src/javascript/date.qdoc index 7b574e7c3b..431f9649a0 100644 --- a/src/qml/doc/src/javascript/date.qdoc +++ b/src/qml/doc/src/javascript/date.qdoc @@ -28,7 +28,7 @@ /*! \qmltype Date \inqmlmodule QtQml - \brief Provides date functions + \brief Provides date functions. The QML Date object extends the \l{Mozilla Developer Network Date Reference}{JS Date object} with diff --git a/src/qml/doc/src/javascript/number.qdoc b/src/qml/doc/src/javascript/number.qdoc index 5230d08bc9..b6f80f474a 100644 --- a/src/qml/doc/src/javascript/number.qdoc +++ b/src/qml/doc/src/javascript/number.qdoc @@ -28,7 +28,7 @@ /*! \qmltype Number \inqmlmodule QtQml - \brief The Number object provides represents a number value + \brief The Number object provides represents a number value. The QML Number object extends the JS Number object with locale aware functions. diff --git a/src/qml/doc/src/javascript/string.qdoc b/src/qml/doc/src/javascript/string.qdoc index c434bb867d..f896af3378 100644 --- a/src/qml/doc/src/javascript/string.qdoc +++ b/src/qml/doc/src/javascript/string.qdoc @@ -28,7 +28,7 @@ /*! \qmltype String \inqmlmodule QtQml - \brief The String object represents a string value + \brief The String object represents a string value. The QML String object extends the JS String object with the arg() function. diff --git a/src/qml/doc/src/qtqml-cpp.qdoc b/src/qml/doc/src/qtqml-cpp.qdoc index fd45222d85..971bb88825 100644 --- a/src/qml/doc/src/qtqml-cpp.qdoc +++ b/src/qml/doc/src/qtqml-cpp.qdoc @@ -29,21 +29,17 @@ \title Qt QML C++ Classes \ingroup modules \qtvariable qml -\brief The C++ API provided by the Qt QML module +\brief The C++ API provided by the Qt QML module. To include the definitions of the module's classes, use the following directive: -\code -#include <QtQml> -\endcode +\snippet code/doc_src_qtqml.cpp 0 To link against the module, add this line to your \l qmake \c .pro file: -\code -QT += qml -\endcode +\snippet code/doc_src_qtqml.pro 0 For more information on the Qt QML module, see the \l{Qt QML} module documentation. diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index 6718f2637c..ecc0b138c0 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -162,8 +162,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt } newData->setAlloc(alloc); newData->setType(newType); - if (d) - newData->d()->needsMark = d->d()->needsMark; newData->setAttrs(enforceAttributes ? reinterpret_cast<PropertyAttributes *>(newData->d()->values.values + alloc) : nullptr); o->setArrayData(newData); @@ -186,8 +184,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt memcpy(newData->d()->values.values, d->d()->values.values + offset, sizeof(Value)*toCopy); } - if (newType != Heap::ArrayData::Simple) - newData->d()->needsMark = true; if (newType != Heap::ArrayData::Sparse) return; diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h index 887b8f283f..ac5b430356 100644 --- a/src/qml/jsruntime/qv4arraydata_p.h +++ b/src/qml/jsruntime/qv4arraydata_p.h @@ -92,7 +92,7 @@ namespace Heap { #define ArrayDataMembers(class, Member) \ Member(class, NoMark, ushort, type) \ - Member(class, NoMark, ushort, needsMark) \ + Member(class, NoMark, ushort, unused) \ Member(class, NoMark, uint, offset) \ Member(class, NoMark, PropertyAttributes *, attrs) \ Member(class, NoMark, SparseArray *, sparse) \ @@ -135,8 +135,6 @@ struct SimpleArrayData : public ArrayData { uint mappedIndex(uint index) const { index += offset; if (index >= values.alloc) index -= values.alloc; return index; } const Value &data(uint index) const { return values[mappedIndex(index)]; } void setData(EngineBase *e, uint index, Value newVal) { - if (newVal.isManaged()) - needsMark = true; values.set(e, mappedIndex(index), newVal); } diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a8331f153e..1073a2abab 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -709,12 +709,6 @@ Heap::ArrayObject *ExecutionEngine::newArrayObject(const Value *values, int leng // this doesn't require a write barrier, things will be ok, when the new array data gets inserted into // the parent object memcpy(&d->values.values, values, length*sizeof(Value)); - for (int i = 0; i < length; ++i) { - if (values[i].isManaged()) { - d->needsMark = true; - break; - } - } a->d()->arrayData.set(this, d); a->setArrayLengthUnchecked(length); } diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 516e9b3c65..79a63d1ee6 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -250,11 +250,8 @@ void Heap::Object::markObjects(Heap::Base *b, MarkStack *stack) Object *o = static_cast<Object *>(b); if (o->memberData) o->memberData->mark(stack); - if (o->arrayData) { - o->arrayData->setMarkBit(); - if (o->arrayData->needsMark) - ArrayData::markObjects(o->arrayData, stack); - } + if (o->arrayData) + o->arrayData->mark(stack); uint nInline = o->vtable()->nInlineProperties; Value *v = reinterpret_cast<Value *>(o) + o->vtable()->inlinePropertyOffset; const Value *end = v + nInline; diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index ca6e4c50b1..efd528860f 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -91,9 +91,10 @@ void Script::parse() Module module(v4->debugger() != nullptr); if (sourceCode.startsWith(QLatin1String("function("))) { - qWarning() << "Warning: Using function expressions as statements in scripts in not compliant with the ECMAScript specification at\n" - << (sourceCode.leftRef(70) + QLatin1String("...")) - << "\nThis will throw a syntax error in Qt 5.12. If you want a function expression, surround it by parentheses."; + static const int snippetLength = 70; + qWarning() << "Warning: Using function expressions as statements in scripts is not compliant with the ECMAScript specification:\n" + << (sourceCode.leftRef(snippetLength) + QLatin1String("...")) + << "\nThis will throw a syntax error in Qt 5.12. If you want a function expression, surround it by parentheses."; } Engine ee, *engine = ⅇ diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 22e20de8d7..96f6c6aed6 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -89,7 +89,7 @@ V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); \since 5.0 \inmodule QtQml - \brief The QQmlComponent class encapsulates a QML component definition + \brief The QQmlComponent class encapsulates a QML component definition. Components are reusable, encapsulated QML types with well-defined interfaces. @@ -183,7 +183,7 @@ V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); \instantiates QQmlComponent \ingroup qml-utility-elements \inqmlmodule QtQml - \brief Encapsulates a QML component definition + \brief Encapsulates a QML component definition. Components are reusable, encapsulated QML types with well-defined interfaces. diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 61cf2a8994..759d86c789 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -159,7 +159,7 @@ int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, \instantiates QObject \inqmlmodule QtQml \ingroup qml-utility-elements - \brief A basic QML type + \brief A basic QML type. The QtObject type is a non-visual element which contains only the objectName property. diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp index 8666144096..32dce8b4bc 100644 --- a/src/qml/qml/qqmlfileselector.cpp +++ b/src/qml/qml/qqmlfileselector.cpp @@ -52,7 +52,7 @@ Q_GLOBAL_STATIC(interceptorSelectorMap, interceptorInstances); \class QQmlFileSelector \since 5.2 \inmodule QtQml - \brief A class for applying a QFileSelector to QML file loading + \brief A class for applying a QFileSelector to QML file loading. QQmlFileSelector will automatically apply a QFileSelector to qml file and asset paths. diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index df168960c6..e18ce71902 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -176,7 +176,7 @@ void QQmlIncubatorPrivate::clear() /*! \class QQmlIncubationController -\brief QQmlIncubationController instances drive the progress of QQmlIncubators +\brief QQmlIncubationController instances drive the progress of QQmlIncubators. \inmodule QtQml In order to behave asynchronously and not introduce stutters or freezes in an application, diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index f17f0fb77a..c5a85dd4d3 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -715,7 +715,7 @@ V4_DEFINE_EXTENSION(QV4LocaleDataDeletable, localeV4Data); \qmltype Locale \instantiates QQmlLocale \inqmlmodule QtQml - \brief Provides locale specific properties and formatted data + \brief Provides locale specific properties and formatted data. The Locale object may only be created via the \l{QtQml::Qt::locale()}{Qt.locale()} function. It cannot be created directly. diff --git a/src/qml/qml/qqmlloggingcategory.cpp b/src/qml/qml/qqmlloggingcategory.cpp index 08f8552ab6..597fe458fa 100644 --- a/src/qml/qml/qqmlloggingcategory.cpp +++ b/src/qml/qml/qqmlloggingcategory.cpp @@ -45,7 +45,7 @@ \qmltype LoggingCategory \ingroup qml-utility-elements \inqmlmodule QtQml - \brief Defines a logging category in QML + \brief Defines a logging category in QML. \since 5.8 A logging category can be passed to console.log() and friends as the first argument. diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index bff16441d0..e4fe84bf25 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1361,7 +1361,10 @@ void Heap::QQmlBindingFunction::init(const QV4::FunctionObject *bindingFunction) QQmlSourceLocation QQmlBindingFunction::currentLocation() const { QV4::CppStackFrame *frame = engine()->currentStackFrame; - return QQmlSourceLocation(frame->source(), frame->lineNumber(), 0); + if (frame->v4Function) // synchronous loading: + return QQmlSourceLocation(frame->source(), frame->lineNumber(), 0); + else // async loading: + return bindingFunction()->function->sourceLocation(); } DEFINE_OBJECT_VTABLE(QQmlBindingFunction); diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp index 2ae3df6ebb..183bb1bf74 100644 --- a/src/qml/types/qqmlconnections.cpp +++ b/src/qml/types/qqmlconnections.cpp @@ -75,7 +75,7 @@ public: \instantiates QQmlConnections \inqmlmodule QtQml \ingroup qtquick-interceptors - \brief Describes generalized connections to signals + \brief Describes generalized connections to signals. A Connections object creates a connection to a QML signal. diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 33fe5f3438..62ccf0d66c 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -164,7 +164,7 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent) \instantiates QQmlDelegateModel \inqmlmodule QtQuick \ingroup qtquick-models - \brief Encapsulates a model and delegate + \brief Encapsulates a model and delegate. The VisualDataModel type encapsulates a model and the delegate that will be instantiated for items in a model. @@ -179,7 +179,7 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent) \qmltype DelegateModel \instantiates QQmlDelegateModel \inqmlmodule QtQml.Models - \brief Encapsulates a model and delegate + \brief Encapsulates a model and delegate. The DelegateModel type encapsulates a model and the delegate that will be instantiated for items in the model. @@ -2369,7 +2369,7 @@ void QQmlDelegateModelGroupPrivate::destroyingPackage(QQuickPackage *package) \instantiates QQmlDelegateModelGroup \inqmlmodule QtQuick \ingroup qtquick-models - \brief Encapsulates a filtered set of visual data items + \brief Encapsulates a filtered set of visual data items. The VisualDataGroup type provides a means to address the model data of a model's delegate items, as well as sort and filter these delegate items. @@ -2385,7 +2385,7 @@ void QQmlDelegateModelGroupPrivate::destroyingPackage(QQuickPackage *package) \instantiates QQmlDelegateModelGroup \inqmlmodule QtQml.Models \ingroup qtquick-models - \brief Encapsulates a filtered set of visual data items + \brief Encapsulates a filtered set of visual data items. The DelegateModelGroup type provides a means to address the model data of a DelegateModel's delegate items, as well as sort and filter these delegate diff --git a/src/qml/types/qqmlinstantiator.cpp b/src/qml/types/qqmlinstantiator.cpp index 030758fa3b..a23ec0f2b4 100644 --- a/src/qml/types/qqmlinstantiator.cpp +++ b/src/qml/types/qqmlinstantiator.cpp @@ -221,7 +221,7 @@ void QQmlInstantiatorPrivate::makeModel() \qmltype Instantiator \instantiates QQmlInstantiator \inqmlmodule QtQml - \brief Dynamically creates objects + \brief Dynamically creates objects. A Instantiator can be used to control the dynamic creation of objects, or to dynamically create multiple objects from a template. diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index b4507cb264..0a9540bf4b 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1791,7 +1791,7 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index) \instantiates QQmlListModel \inqmlmodule QtQml.Models \ingroup qtquick-models - \brief Defines a free-form list data source + \brief Defines a free-form list data source. The ListModel is a simple container of ListElement definitions, each containing data roles. The contents can be defined dynamically, or @@ -2828,7 +2828,7 @@ bool QQmlListModelParser::definesEmptyList(const QString &s) \qmltype ListElement \instantiates QQmlListElement \inqmlmodule QtQml.Models - \brief Defines a data item in a ListModel + \brief Defines a data item in a ListModel. \ingroup qtquick-models List elements are defined inside ListModel definitions, and represent items in a diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qml/types/qqmlobjectmodel.cpp index 08740b4a6f..d94af64fde 100644 --- a/src/qml/types/qqmlobjectmodel.cpp +++ b/src/qml/types/qqmlobjectmodel.cpp @@ -176,7 +176,7 @@ public: \instantiates QQmlObjectModel \inqmlmodule QtQml.Models \ingroup qtquick-models - \brief Defines a set of items to be used as a model + \brief Defines a set of items to be used as a model. An ObjectModel contains the visual items to be used in a view. When an ObjectModel is used in a view, the view does not require @@ -214,7 +214,7 @@ public: \qmltype VisualItemModel \instantiates QQmlObjectModel \inqmlmodule QtQuick - \brief Defines a set of objects to be used as a model + \brief Defines a set of objects to be used as a model. The VisualItemModel type contains the objects to be used as a model. diff --git a/src/qml/types/qqmltimer.cpp b/src/qml/types/qqmltimer.cpp index 6554010f36..af2ff56f2a 100644 --- a/src/qml/types/qqmltimer.cpp +++ b/src/qml/types/qqmltimer.cpp @@ -87,7 +87,7 @@ public: \instantiates QQmlTimer \inqmlmodule QtQml \ingroup qtquick-interceptors - \brief Triggers a handler at a specified interval + \brief Triggers a handler at a specified interval. A Timer can be used to trigger an action either once, or repeatedly at a given interval. diff --git a/src/qml/types/qquickpackage.cpp b/src/qml/types/qquickpackage.cpp index e8e897bab9..03539d8737 100644 --- a/src/qml/types/qquickpackage.cpp +++ b/src/qml/types/qquickpackage.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPackage \inqmlmodule QtQuick \ingroup qtquick-views - \brief Specifies a collection of named items + \brief Specifies a collection of named items. The Package type is used in conjunction with DelegateModel to enable delegates with a shared context diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 501de392e3..f8879160b2 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -578,7 +578,7 @@ void QQuickWorkerScriptEngine::run() \instantiates QQuickWorkerScript \ingroup qtquick-threading \inqmlmodule QtQuick - \brief Enables the use of threads in a Qt Quick application + \brief Enables the use of threads in a Qt Quick application. Use WorkerScript to run operations in a new thread. This is useful for running operations in the background so diff --git a/src/quick/doc/snippets/code/doc_src_qtquick.cpp b/src/quick/doc/snippets/code/doc_src_qtquick.cpp new file mode 100644 index 0000000000..0e9b2a2196 --- /dev/null +++ b/src/quick/doc/snippets/code/doc_src_qtquick.cpp @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] +#include <QtQuick> +//! [0] diff --git a/src/quick/doc/snippets/code/doc_src_qtquick.pro b/src/quick/doc/snippets/code/doc_src_qtquick.pro new file mode 100644 index 0000000000..bdd4cd9a9c --- /dev/null +++ b/src/quick/doc/snippets/code/doc_src_qtquick.pro @@ -0,0 +1,3 @@ +#! [0] +QT += quick +#! [0] diff --git a/src/quick/doc/snippets/imgprovider/imageprovider-example.qml b/src/quick/doc/snippets/imgprovider/imageprovider-example.qml new file mode 100644 index 0000000000..388afad257 --- /dev/null +++ b/src/quick/doc/snippets/imgprovider/imageprovider-example.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +//![0] +Column { + Image { source: "image://colors/yellow" } + Image { source: "image://colors/red" } +} +//![0] diff --git a/src/quick/doc/snippets/imgprovider/imageprovider.cpp b/src/quick/doc/snippets/imgprovider/imageprovider.cpp new file mode 100644 index 0000000000..cc1256cda5 --- /dev/null +++ b/src/quick/doc/snippets/imgprovider/imageprovider.cpp @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui/QGuiApplication> +#include <QtQml/QQmlEngine> +#include <QtQuick/QQuickImageProvider> +#include <QtQuick/QQuickView> +#include <QtCore/QUrl> +#include <QtCore/QSize> +#include <QtGui/QPixmap> +#include <QtGui/QColor> + +//![0] +class ColorImageProvider : public QQuickImageProvider +{ +public: + ColorImageProvider() + : QQuickImageProvider(QQuickImageProvider::Pixmap) + { + } + + QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override + { + int width = 100; + int height = 50; + + if (size) + *size = QSize(width, height); + QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width, + requestedSize.height() > 0 ? requestedSize.height() : height); + pixmap.fill(QColor(id).rgba()); + return pixmap; + } +}; +//![0] +//![1] +int main(int argc, char *argv[]) +{ +//![1] + QGuiApplication app(argc, argv); +//![2] + QQuickView view; + QQmlEngine *engine = view.engine(); + engine->addImageProvider(QLatin1String("colors"), new ColorImageProvider); + view.setSource(QUrl::fromLocalFile(QStringLiteral("imageprovider-example.qml"))); + view.show(); + return app.exec(); +} +//![2] diff --git a/src/quick/doc/snippets/qquickview-ex.cpp b/src/quick/doc/snippets/qquickview-ex.cpp new file mode 100644 index 0000000000..32406f8f2f --- /dev/null +++ b/src/quick/doc/snippets/qquickview-ex.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//![0] +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQuickView *view = new QQuickView; + view->setSource(QUrl::fromLocalFile("myqmlfile.qml")); + view->show(); + return app.exec(); +} +//![0] diff --git a/src/quick/doc/src/qtquick-cpp.qdoc b/src/quick/doc/src/qtquick-cpp.qdoc index 1a4eda6d2f..ca6fe3d0c0 100644 --- a/src/quick/doc/src/qtquick-cpp.qdoc +++ b/src/quick/doc/src/qtquick-cpp.qdoc @@ -36,16 +36,12 @@ To include the definitions of the module's classes, use the following directive: - \code - #include <QtQuick> - \endcode + \snippet code/doc_src_qtquick.cpp 0 To link against the module, add this line to your \l qmake \c .pro file: - \code - QT += quick - \endcode + \snippet code/doc_src_qtquick.pro 0 For more information on the Qt Quick module, see the \l{Qt Quick} module documentation. diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index 041780257a..5e540b3615 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \inherits SinglePointHandler \inqmlmodule Qt.labs.handlers \ingroup qtquick-handlers - \brief Handler for dragging + \brief Handler for dragging. DragHandler is a handler that is used to interactively move an Item. Like other Pointer Handlers, by default it is fully functional, and diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp index b40164d3ec..4bd5d2cbfb 100644 --- a/src/quick/handlers/qquickhandlerpoint.cpp +++ b/src/quick/handlers/qquickhandlerpoint.cpp @@ -48,7 +48,7 @@ Q_DECLARE_LOGGING_CATEGORY(DBG_TOUCH_TARGET) \instantiates QQuickHandlerPoint \inqmlmodule Qt.labs.handlers \ingroup qtquick-handlers - \brief An event point + \brief An event point. A QML representation of a QQuickEventPoint. diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index 7dafb16d3f..412ad6227d 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -58,7 +58,7 @@ Q_LOGGING_CATEGORY(lcPinchHandler, "qt.quick.handler.pinch") \inherits MultiPointHandler \inqmlmodule Qt.labs.handlers \ingroup qtquick-handlers - \brief Handler for pinch gestures + \brief Handler for pinch gestures. PinchHandler is a handler that interprets a multi-finger gesture to interactively rotate, zoom, and drag an Item. Like other Pointer Handlers, diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 59917ce531..eee64c9663 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -213,7 +213,7 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() \inherits Item \ingroup qtquick-canvas \ingroup qtquick-visual - \brief Provides a 2D canvas item enabling drawing via JavaScript + \brief Provides a 2D canvas item enabling drawing via JavaScript. The Canvas item allows drawing of straight and curved lines, simple and complex shapes, graphs, and referenced graphic images. It can also add diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 07d5f6d39b..ef6f5fa716 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \ingroup qtquick-canvas \since 5.0 - \brief Provides 2D context for shapes on a Canvas item + \brief Provides 2D context for shapes on a Canvas item. The Context2D object can be created by \c Canvas item's \c getContext() method: @@ -3044,7 +3044,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_drawImage(const QV4::Funct \qmltype CanvasImageData \inqmlmodule QtQuick \ingroup qtquick-canvas - \brief Contains image pixel data in RGBA order + \brief Contains image pixel data in RGBA order. The CanvasImageData object holds the image pixel data. @@ -3106,7 +3106,7 @@ QV4::ReturnedValue QQuickJSContext2DImageData::method_get_data(const QV4::Functi \qmltype CanvasPixelArray \inqmlmodule QtQuick \ingroup qtquick-canvas - \brief Provides ordered and indexed access to the components of each pixel in image data + \brief Provides ordered and indexed access to the components of each pixel in image data. The CanvasPixelArray object provides ordered, indexed access to the color components of each pixel of the image data. The CanvasPixelArray can be accessed as normal Javascript array. @@ -3372,7 +3372,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_putImageData(const QV4::Fu \inqmlmodule QtQuick \since 5.0 \ingroup qtquick-canvas - \brief Provides an opaque CanvasGradient interface + \brief Provides an opaque CanvasGradient interface. */ /*! diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp index 252d6538e2..0168c3160c 100644 --- a/src/quick/items/qquickaccessibleattached.cpp +++ b/src/quick/items/qquickaccessibleattached.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype Accessible \instantiates QQuickAccessibleAttached - \brief Enables accessibility of QML items + \brief Enables accessibility of QML items. \inqmlmodule QtQuick \ingroup qtquick-visual-utility diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp index 075c4a7d72..fe445425e7 100644 --- a/src/quick/items/qquickanimatedimage.cpp +++ b/src/quick/items/qquickanimatedimage.cpp @@ -86,7 +86,7 @@ QQuickPixmap* QQuickAnimatedImagePrivate::infoForCurrentFrame(QQmlEngine *engine \instantiates QQuickAnimatedImage \inqmlmodule QtQuick \inherits Image - \brief Plays animations stored as a series of images + \brief Plays animations stored as a series of images. \ingroup qtquick-visual The AnimatedImage type extends the features of the \l Image type, providing diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp index c2f1390ada..18adb4e992 100644 --- a/src/quick/items/qquickanimatedsprite.cpp +++ b/src/quick/items/qquickanimatedsprite.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \inherits Item \ingroup qtquick-visual - \brief Draws a sprite animation + \brief Draws a sprite animation. AnimatedSprite provides rendering and control over animations which are provided as multiple frames in the same image file. You can play it at a fixed speed, at the diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp index 4bf34f0417..d49829096f 100644 --- a/src/quick/items/qquickborderimage.cpp +++ b/src/quick/items/qquickborderimage.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE \qmltype BorderImage \instantiates QQuickBorderImage \inqmlmodule QtQuick - \brief Paints a border based on an image + \brief Paints a border based on an image. \inherits Item \ingroup qtquick-visual diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp index d377b1dad4..91f45894a0 100644 --- a/src/quick/items/qquickdrag.cpp +++ b/src/quick/items/qquickdrag.cpp @@ -123,7 +123,7 @@ public: \instantiates QQuickDrag \inqmlmodule QtQuick \ingroup qtquick-input - \brief For specifying drag and drop events for moved Items + \brief For specifying drag and drop events for moved Items. Using the Drag attached property, any Item can be made a source of drag and drop events within a scene. diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp index b77fb40cb1..cb87bdce76 100644 --- a/src/quick/items/qquickdroparea.cpp +++ b/src/quick/items/qquickdroparea.cpp @@ -93,7 +93,7 @@ QQuickDropAreaPrivate::~QQuickDropAreaPrivate() \instantiates QQuickDropArea \inqmlmodule QtQuick \ingroup qtquick-input - \brief For specifying drag and drop handling in an area + \brief For specifying drag and drop handling in an area. A DropArea is an invisible item which receives events when other items are dragged over it. @@ -339,7 +339,7 @@ void QQuickDropArea::dropEvent(QDropEvent *event) \instantiates QQuickDropEvent \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about a drag event + \brief Provides information about a drag event. The position of the drag event can be obtained from the \l x and \l y properties, and the \l keys property identifies the drag keys of the event diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 1f10afcc08..31c56b7cb7 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -57,7 +57,7 @@ Q_LOGGING_CATEGORY(lcPointerGrab, "qt.quick.pointer.grab") \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about a key event + \brief Provides information about a key event. For example, the following changes the Item's state property when the Enter key is pressed: @@ -182,7 +182,7 @@ Item { \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about a mouse event + \brief Provides information about a mouse event. The position of the mouse can be found via the \l {Item::x} {x} and \l {Item::y} {y} properties. The button that caused the event is available via the \l button property. @@ -349,7 +349,7 @@ Item { \instantiates QQuickWheelEvent \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about a mouse wheel event + \brief Provides information about a mouse wheel event. The position of the mouse can be found via the \l {Item::x} {x} and \l {Item::y} {y} properties. @@ -474,7 +474,7 @@ Item { \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about a pointing device + \brief Provides information about a pointing device. A pointing device can be a mouse, a touchscreen, or a stylus on a graphics tablet. @@ -673,7 +673,7 @@ QQuickPointerDevice *QQuickPointerDevice::tabletDevice(qint64 id) \instantiates QQuickEventPoint \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about an individual point within a PointerEvent + \brief Provides information about an individual point within a PointerEvent. A PointerEvent contains an EventPoint for each point of contact: one corresponding to the mouse cursor, or one for each finger touching a touchscreen. @@ -1036,7 +1036,7 @@ void QQuickEventPoint::setAccepted(bool accepted) \instantiates QQuickEventTouchPoint \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about an individual touch point within a PointerEvent + \brief Provides information about an individual touch point within a PointerEvent. \sa PointerEvent, PointerHandler */ @@ -1191,7 +1191,7 @@ QVector2D QQuickEventPoint::estimatedVelocity() const \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Provides information about an event from a pointing device + \brief Provides information about an event from a pointing device. A PointerEvent is an event describing contact or movement across a surface, provided by a mouse, a touchpoint (single finger on a touchscreen), or a diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 9c775f7e93..d892e3b490 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -594,7 +594,7 @@ void QQuickFlickablePrivate::updateBeginningEnd() \ingroup qtquick-input \ingroup qtquick-containers - \brief Provides a surface that can be "flicked" + \brief Provides a surface that can be "flicked". \inherits Item The Flickable item places its children on a surface that can be dragged @@ -2678,15 +2678,13 @@ void QQuickFlickable::movementEnding(bool hMovementEnding, bool vMovementEnding) if (hMovementEnding && d->hData.moving && (!d->pressed && !d->stealMouse)) { d->hData.moving = false; - if (!d->scrollingPhase) - d->hMoved = false; + d->hMoved = false; emit movingHorizontallyChanged(); } if (vMovementEnding && d->vData.moving && (!d->pressed && !d->stealMouse)) { d->vData.moving = false; - if (!d->scrollingPhase) - d->vMoved = false; + d->vMoved = false; emit movingVerticallyChanged(); } if (wasMoving && !isMoving()) { diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp index fbba8eed89..a338985622 100644 --- a/src/quick/items/qquickflipable.cpp +++ b/src/quick/items/qquickflipable.cpp @@ -91,7 +91,7 @@ public: \inherits Item \ingroup qtquick-input \ingroup qtquick-containers - \brief Provides a surface that can be flipped + \brief Provides a surface that can be flipped. Flipable is an item that can be visibly "flipped" between its front and back sides, like a card. It may used together with \l Rotation, \l State diff --git a/src/quick/items/qquickfocusscope.cpp b/src/quick/items/qquickfocusscope.cpp index de4494a521..667d4d7b1d 100644 --- a/src/quick/items/qquickfocusscope.cpp +++ b/src/quick/items/qquickfocusscope.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \ingroup qtquick-input - \brief Explicitly creates a focus scope + \brief Explicitly creates a focus scope. \inherits Item Focus scopes assist in keyboard focus handling when building reusable QML diff --git a/src/quick/items/qquickgraphicsinfo.cpp b/src/quick/items/qquickgraphicsinfo.cpp index e809bdd827..cd1012c690 100644 --- a/src/quick/items/qquickgraphicsinfo.cpp +++ b/src/quick/items/qquickgraphicsinfo.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \ingroup qtquick-visual \since 5.8 \since QtQuick 2.8 - \brief Provides information about the used Qt Quick backend + \brief Provides information about the used Qt Quick backend. The GraphicsInfo attached type provides information about the scenegraph backend used to render the contents of the associated window. diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index 1f5cda9d18..f2fa66332c 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -1114,7 +1114,7 @@ bool QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte \ingroup qtquick-views \inherits Flickable - \brief For specifying a grid view of items provided by a model + \brief For specifying a grid view of items provided by a model. A GridView displays data from models created from built-in QML types like ListModel and XmlListModel, or custom model classes defined in C++ that inherit from diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index db5cfd2526..49e5b7b1fa 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -107,7 +107,7 @@ QQuickImagePrivate::QQuickImagePrivate() \inqmlmodule QtQuick \ingroup qtquick-visual \inherits Item - \brief Displays an image + \brief Displays an image. The Image type displays an image. diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 73fc12babd..01413385d9 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -114,7 +114,7 @@ void debugFocusTree(QQuickItem *item, QQuickItem *scope = nullptr, int depth = 1 \instantiates QQuickTransform \inqmlmodule QtQuick \ingroup qtquick-visual-transforms - \brief For specifying advanced transformations on Items + \brief For specifying advanced transformations on Items. The Transform type is a base type which cannot be instantiated directly. The following concrete Transform types are available: @@ -357,7 +357,7 @@ void QQuickItemKeyFilter::componentComplete() \instantiates QQuickKeyNavigationAttached \inqmlmodule QtQuick \ingroup qtquick-input - \brief Supports key navigation by arrow keys + \brief Supports key navigation by arrow keys. Key-based user interfaces commonly allow the use of arrow keys to navigate between focusable items. The KeyNavigation attached property enables this behavior by providing a @@ -816,7 +816,7 @@ bool QQuickKeysAttached::isConnected(const char *signalName) const \instantiates QQuickKeysAttached \inqmlmodule QtQuick \ingroup qtquick-input - \brief Provides key handling to Items + \brief Provides key handling to Items. All visual primitives support key handling via the Keys attached property. Keys can be handled via the onPressed @@ -1507,7 +1507,7 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj) \inqmlmodule QtQuick \ingroup qtquick-positioners \ingroup qml-utility-elements - \brief Property used to mirror layout behavior + \brief Property used to mirror layout behavior. The LayoutMirroring attached property is used to horizontally mirror \l {anchor-layout}{Item anchors}, \l{Item Positioners}{positioner} types (such as \l Row and \l Grid) @@ -1924,7 +1924,7 @@ void QQuickItemPrivate::updateSubFocusItem(QQuickItem *scope, bool focus) \inherits QtObject \inqmlmodule QtQuick \ingroup qtquick-visual - \brief A basic visual QML type + \brief A basic visual QML type. The Item type is the base type for all visual items in Qt Quick. diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp index e913e5ba05..8251282736 100644 --- a/src/quick/items/qquickitemanimation.cpp +++ b/src/quick/items/qquickitemanimation.cpp @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE \ingroup qtquick-animation-properties \since 5.0 \inherits Animation - \brief Animates changes in parent values + \brief Animates changes in parent values. ParentAnimation is used to animate a parent change for an \l Item. @@ -418,7 +418,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits Animation - \brief Animates changes in anchor values + \brief Animates changes in anchor values. AnchorAnimation is used to animate an anchor change. @@ -565,7 +565,7 @@ QAbstractAnimationJob* QQuickAnchorAnimation::transition(QQuickStateActions &act \ingroup qtquick-animation-properties \inherits Animation \since 5.0 - \brief Animates an item along a path + \brief Animates an item along a path. When used in a transition, the path can be specified without start or end points, for example: diff --git a/src/quick/items/qquickitemviewtransition.cpp b/src/quick/items/qquickitemviewtransition.cpp index 5cd28d0acb..c06dcce0d9 100644 --- a/src/quick/items/qquickitemviewtransition.cpp +++ b/src/quick/items/qquickitemviewtransition.cpp @@ -571,7 +571,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) \instantiates QQuickViewTransitionAttached \inqmlmodule QtQuick \ingroup qtquick-transitions-animations - \brief Specifies items under transition in a view + \brief Specifies items under transition in a view. With ListView and GridView, it is possible to specify transitions that should be applied whenever the items in the view change as a result of modifications to the view's model. They both have the diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 60f7efae12..19033e03f1 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -1743,7 +1743,7 @@ bool QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte \inqmlmodule QtQuick \ingroup qtquick-views \inherits Flickable - \brief Provides a list view of items provided by a model + \brief Provides a list view of items provided by a model. A ListView displays data from models created from built-in QML types like ListModel and XmlListModel, or custom model classes defined in C++ that inherit from diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index ae73a78e8d..0de9d6c49a 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -169,7 +169,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \ingroup qtquick-dynamic \inherits Item - \brief Allows dynamic loading of a subtree from a URL or Component + \brief Allows dynamic loading of a subtree from a URL or Component. Loader is used to dynamically load QML components. diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index c9316c0406..0b345697ec 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -196,7 +196,7 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i \instantiates QQuickMouseArea \inqmlmodule QtQuick \ingroup qtquick-input - \brief Enables simple mouse handling + \brief Enables simple mouse handling. \inherits Item A MouseArea is an invisible item that is typically used in conjunction with diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp index dc168073e4..b1438d7541 100644 --- a/src/quick/items/qquickmultipointtoucharea.cpp +++ b/src/quick/items/qquickmultipointtoucharea.cpp @@ -56,7 +56,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlVisualTouchDebugging, QML_VISUAL_TOUCH_DEBUGGING) \instantiates QQuickTouchPoint \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief Describes a touch point in a MultiPointTouchArea + \brief Describes a touch point in a MultiPointTouchArea. The TouchPoint type contains information about a touch point, such as the current position, pressure, and area. @@ -291,7 +291,7 @@ void QQuickTouchPoint::setUniqueId(const QPointingDeviceUniqueId &id) \instantiates QQuickGrabGestureEvent \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief The parameter given with the gestureStarted signal + \brief The parameter given with the gestureStarted signal. The GestureEvent object has the current touch points, which you may choose to interpret as a gesture, and an invokable method to grab the involved @@ -328,7 +328,7 @@ void QQuickTouchPoint::setUniqueId(const QPointingDeviceUniqueId &id) \inqmlmodule QtQuick \inherits Item \ingroup qtquick-input - \brief Enables handling of multiple touch points + \brief Enables handling of multiple touch points. A MultiPointTouchArea is an invisible item that is used to track multiple touch points. diff --git a/src/quick/items/qquickopenglinfo.cpp b/src/quick/items/qquickopenglinfo.cpp index 73f9c85e94..3e634725f4 100644 --- a/src/quick/items/qquickopenglinfo.cpp +++ b/src/quick/items/qquickopenglinfo.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \ingroup qtquick-effects \since 5.4 - \brief Provides information about the used OpenGL version + \brief Provides information about the used OpenGL version. The OpenGLInfo attached type provides information about the OpenGL version being used to render the surface of the attachee item. diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index be94cdef42..74c8eaa169 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -475,7 +475,7 @@ void QQuickPathViewPrivate::setDragging(bool d) \ingroup qtquick-paths \ingroup qtquick-views \inherits Item - \brief Lays out model-provided items on a path + \brief Lays out model-provided items on a path. A PathView displays data from models created from built-in QML types like ListModel and XmlListModel, or custom model classes defined in C++ that inherit from diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp index 7ae0f9b7e3..3d4f195380 100644 --- a/src/quick/items/qquickpincharea.cpp +++ b/src/quick/items/qquickpincharea.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPinchEvent \inqmlmodule QtQuick \ingroup qtquick-input-events - \brief For specifying information about a pinch event + \brief For specifying information about a pinch event. \b {The PinchEvent type was added in QtQuick 1.1} @@ -169,7 +169,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate() \inqmlmodule QtQuick \ingroup qtquick-input \inherits Item - \brief Enables simple pinch gesture handling + \brief Enables simple pinch gesture handling. \b {The PinchArea type was added in QtQuick 1.1} diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp index 493db51666..55bafd9f83 100644 --- a/src/quick/items/qquickpositioners.cpp +++ b/src/quick/items/qquickpositioners.cpp @@ -705,7 +705,7 @@ void QQuickBasePositionerPrivate::setBottomPadding(qreal value, bool reset) \instantiates QQuickPositionerAttached \inqmlmodule QtQuick \ingroup qtquick-positioners - \brief Provides attached properties that contain details on where an item exists in a positioner + \brief Provides attached properties that contain details on where an item exists in a positioner. An object of type Positioner is attached to the top-level child item within a Column, Row, Flow or Grid. It provides properties that allow a child item to determine @@ -789,7 +789,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) \inqmlmodule QtQuick \inherits Item \ingroup qtquick-positioners - \brief Positions its children in a column + \brief Positions its children in a column. Column is a type that positions its child items along a single column. It can be used as a convenient way to vertically position a series of items without @@ -993,7 +993,7 @@ void QQuickColumn::reportConflictingAnchors() \inqmlmodule QtQuick \inherits Item \ingroup qtquick-positioners - \brief Positions its children in a row + \brief Positions its children in a row. Row is a type that positions its child items along a single row. It can be used as a convenient way to horizontally position a series of items without @@ -1281,7 +1281,7 @@ void QQuickRow::reportConflictingAnchors() \inqmlmodule QtQuick \inherits Item \ingroup qtquick-positioners - \brief Positions its children in grid formation + \brief Positions its children in grid formation. Grid is a type that positions its child items in grid formation. @@ -1885,7 +1885,7 @@ void QQuickGrid::reportConflictingAnchors() \inqmlmodule QtQuick \inherits Item \ingroup qtquick-positioners - \brief Positions its children side by side, wrapping as necessary + \brief Positions its children side by side, wrapping as necessary. The Flow item positions its child items like words on a page, wrapping them to create rows or columns of items. diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp index f619d3b85a..ab8203d0a8 100644 --- a/src/quick/items/qquickrectangle.cpp +++ b/src/quick/items/qquickrectangle.cpp @@ -132,7 +132,7 @@ bool QQuickPen::isValid() const \instantiates QQuickGradientStop \inqmlmodule QtQuick \ingroup qtquick-visual-utility - \brief Defines the color at a position in a Gradient + \brief Defines the color at a position in a Gradient. \sa Gradient */ @@ -184,7 +184,7 @@ void QQuickGradientStop::updateGradient() \instantiates QQuickGradient \inqmlmodule QtQuick \ingroup qtquick-visual-utility - \brief Defines a gradient fill + \brief Defines a gradient fill. A gradient is defined by two or more colors, which will be blended seamlessly. @@ -303,7 +303,7 @@ int QQuickRectanglePrivate::doUpdateSlotIdx = -1; \inqmlmodule QtQuick \inherits Item \ingroup qtquick-visual - \brief Paints a filled rectangle with an optional border + \brief Paints a filled rectangle with an optional border. Rectangle items are used to fill areas with solid color or gradients, and/or to provide a rectangular border. diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index b95fa3c410..805b6fe190 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -72,7 +72,7 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() \ingroup qtquick-models \ingroup qtquick-positioning \inherits Item - \brief Instantiates a number of Item-based components using a provided model + \brief Instantiates a number of Item-based components using a provided model. The Repeater type is used to create a large number of similar items. Like other view types, a Repeater has a \l model and a \l delegate: diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp index 592485d6fa..ab79b69c8c 100644 --- a/src/quick/items/qquickshadereffect.cpp +++ b/src/quick/items/qquickshadereffect.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \inherits Item \ingroup qtquick-effects - \brief Applies custom shaders to a rectangle + \brief Applies custom shaders to a rectangle. The ShaderEffect type applies a custom \l{vertexShader}{vertex} and \l{fragmentShader}{fragment (pixel)} shader to a diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp index 4ea976a272..77b7cbc78d 100644 --- a/src/quick/items/qquickshadereffectmesh.cpp +++ b/src/quick/items/qquickshadereffectmesh.cpp @@ -70,7 +70,7 @@ QQuickShaderEffectMesh::QQuickShaderEffectMesh(QObject *parent) \inqmlmodule QtQuick \since 5.0 \ingroup qtquick-effects - \brief Defines a mesh with vertices arranged in a grid + \brief Defines a mesh with vertices arranged in a grid. GridMesh defines a rectangular mesh consisting of vertices arranged in an evenly spaced grid. It is used to generate \l{QSGGeometry}{geometry}. diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp index 4782672858..505940e673 100644 --- a/src/quick/items/qquickshadereffectsource.cpp +++ b/src/quick/items/qquickshadereffectsource.cpp @@ -102,7 +102,7 @@ public: \since 5.0 \inherits Item \ingroup qtquick-effects - \brief Renders a \l {Qt Quick} item into a texture and displays it + \brief Renders a \l {Qt Quick} item into a texture and displays it. The ShaderEffectSource type renders \l sourceItem into a texture and displays it in the scene. \l sourceItem is drawn into the texture as though diff --git a/src/quick/items/qquicksprite.cpp b/src/quick/items/qquicksprite.cpp index 8c59a68982..58f3de8b7b 100644 --- a/src/quick/items/qquicksprite.cpp +++ b/src/quick/items/qquicksprite.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickSprite \inqmlmodule QtQuick \ingroup qtquick-visual-utility - \brief Specifies sprite animations + \brief Specifies sprite animations. Sprite defines a series of one or more frames to be animated and rendered by SpriteSequence. The sprites can be in the middle of an image file, or split along multiple rows, as long as they form diff --git a/src/quick/items/qquickspritesequence.cpp b/src/quick/items/qquickspritesequence.cpp index df6a6e336e..cff9b6ab02 100644 --- a/src/quick/items/qquickspritesequence.cpp +++ b/src/quick/items/qquickspritesequence.cpp @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \ingroup qtquick-visual-utility \inherits Item - \brief Draws a sprite animation + \brief Draws a sprite animation. SpriteSequence renders and controls a list of animations defined by \l Sprite types. diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp index a85b9663d3..fe1dfd349e 100644 --- a/src/quick/items/qquickstateoperations.cpp +++ b/src/quick/items/qquickstateoperations.cpp @@ -149,7 +149,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s \instantiates QQuickParentChange \inqmlmodule QtQuick \ingroup qtquick-states - \brief Specifies how to reparent an Item in a state change + \brief Specifies how to reparent an Item in a state change. ParentChange reparents an item while preserving its visual appearance (position, size, rotation, and scale) on screen. You can then specify a transition to move/resize/rotate/scale @@ -555,7 +555,7 @@ void QQuickParentChange::rewind() \instantiates QQuickAnchorChanges \inqmlmodule QtQuick \ingroup qtquick-states - \brief Specifies how to change the anchors of an item in a state + \brief Specifies how to change the anchors of an item in a state. The AnchorChanges type is used to modify the anchors of an item in a \l State. diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index dd66930ef7..3c260165f7 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1249,7 +1249,7 @@ void QQuickTextPrivate::ensureDoc() \inqmlmodule QtQuick \ingroup qtquick-visual \inherits Item - \brief Specifies how to add formatted text to a scene + \brief Specifies how to add formatted text to a scene. Text items can display both plain and rich text. For example, red text with a specific font and size can be defined like this: diff --git a/src/quick/items/qquicktextdocument.cpp b/src/quick/items/qquicktextdocument.cpp index 5d2034defe..06ac5804c4 100644 --- a/src/quick/items/qquicktextdocument.cpp +++ b/src/quick/items/qquicktextdocument.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE /*! \class QQuickTextDocument \since 5.1 - \brief The QQuickTextDocument class provides access to the QTextDocument of QQuickTextEdit + \brief The QQuickTextDocument class provides access to the QTextDocument of QQuickTextEdit. \inmodule QtQuick This class provides access to the QTextDocument of QQuickTextEdit elements. diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 352fc48970..bfc9f4c769 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE \ingroup qtquick-visual \ingroup qtquick-input \inherits Item - \brief Displays multiple lines of editable formatted text + \brief Displays multiple lines of editable formatted text. The TextEdit item displays a block of editable, formatted text. diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index b19c13c5ee..a0ac884fef 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -75,7 +75,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) \ingroup qtquick-visual \ingroup qtquick-input \inherits Item - \brief Displays an editable line of text + \brief Displays an editable line of text. The TextInput type displays a single line of editable plain text. diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp index 1c8dd02b92..872fe25a18 100644 --- a/src/quick/items/qquicktranslate.cpp +++ b/src/quick/items/qquicktranslate.cpp @@ -58,7 +58,7 @@ public: \instantiates QQuickTranslate \inqmlmodule QtQuick \ingroup qtquick-visual-transforms - \brief Provides a way to move an Item without changing its x or y properties + \brief Provides a way to move an Item without changing its x or y properties. The Translate type provides independent control over position in addition to the Item's x and y properties. @@ -162,7 +162,7 @@ public: \instantiates QQuickScale \inqmlmodule QtQuick \ingroup qtquick-visual-transforms - \brief Provides a way to scale an Item + \brief Provides a way to scale an Item. The Scale type provides a way to scale an \l Item through a scale-type transform. @@ -304,7 +304,7 @@ public: \instantiates QQuickRotation \inqmlmodule QtQuick \ingroup qtquick-visual-transforms - \brief Provides a way to rotate an Item + \brief Provides a way to rotate an Item. The Rotation type provides a way to rotate an \l Item through a rotation-type transform. @@ -468,7 +468,7 @@ public: \inqmlmodule QtQuick \ingroup qtquick-visual-transforms \since 5.3 - \brief Provides a way to apply a 4x4 tranformation matrix to an \l Item + \brief Provides a way to apply a 4x4 tranformation matrix to an \l Item. The Matrix4x4 type provides a way to apply a transformation to an \l Item through a 4x4 matrix. diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp index 1ac6c768e8..c411da9519 100644 --- a/src/quick/items/qquickview.cpp +++ b/src/quick/items/qquickview.cpp @@ -136,11 +136,7 @@ void QQuickViewPrivate::itemGeometryChanged(QQuickItem *resizeItem, QQuickGeomet Typical usage: - \code - QQuickView *view = new QQuickView; - view->setSource(QUrl::fromLocalFile("myqmlfile.qml")); - view->show(); - \endcode + \snippet qquickview-ex.cpp 0 To receive errors related to loading and executing QML with QQuickView, you can connect to the statusChanged() signal and monitor for QQuickView::Error. diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index a8785136cb..c80e052dad 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1142,7 +1142,7 @@ void QQuickWindowPrivate::cleanup(QSGNode *n) \instantiates QQuickWindow \inqmlmodule QtQuick.Window \ingroup qtquick-visual - \brief Creates a new top-level window + \brief Creates a new top-level window. The Window object creates a new top-level window for a Qt Quick scene. It automatically sets up the window for use with \c {QtQuick 2.x} graphical types. @@ -1179,7 +1179,7 @@ void QQuickWindowPrivate::cleanup(QSGNode *n) \inmodule QtQuick - \brief The QQuickWindow class provides the window for displaying a graphical QML scene + \brief The QQuickWindow class provides the window for displaying a graphical QML scene. QQuickWindow provides the graphical scene management needed to interact with and display a scene of QQuickItems. @@ -3617,7 +3617,7 @@ bool QQuickWindow::isSceneGraphInitialized() const \instantiates QQuickCloseEvent \inqmlmodule QtQuick.Window \ingroup qtquick-visual - \brief Notification that a \l Window is about to be closed + \brief Notification that a \l Window is about to be closed. \since 5.1 Notification that a window is about to be closed by the windowing system diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index 226709094d..dd701fba5f 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -115,7 +115,7 @@ const QSGGeometry::AttributeSet &QSGGeometry::defaultAttributes_ColoredPoint2D() /*! \class QSGGeometry::Attribute - \brief The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry + \brief The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry. \inmodule QtQuick The QSGGeometry::Attribute struct describes the attribute register position, diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index 9717862baa..1976538aec 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -1144,7 +1144,7 @@ void QSGClipNode::setClipRect(const QRectF &rect) /*! \class QSGTransformNode - \brief The QSGTransformNode class implements transformations in the scene graph + \brief The QSGTransformNode class implements transformations in the scene graph. \inmodule QtQuick \ingroup qtquick-scenegraph-nodes diff --git a/src/quick/scenegraph/util/qsgtexturereader.cpp b/src/quick/scenegraph/util/qsgtexturereader.cpp index 8af2c8e7cd..8e95f27120 100644 --- a/src/quick/scenegraph/util/qsgtexturereader.cpp +++ b/src/quick/scenegraph/util/qsgtexturereader.cpp @@ -41,6 +41,8 @@ #include <private/qtquickglobal_p.h> +#include <private/qsgtexturefilehandler_p.h> + #if QT_CONFIG(opengl) #include <private/qsgpkmhandler_p.h> #include <private/qsgktxhandler_p.h> diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp index 9bbf70b3a4..02be9daac0 100644 --- a/src/quick/util/qquickanimation.cpp +++ b/src/quick/util/qquickanimation.cpp @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickAbstractAnimation \inqmlmodule QtQuick \ingroup qtquick-transitions-animations - \brief Is the base of all QML animations + \brief Is the base of all QML animations. The Animation type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the @@ -691,7 +691,7 @@ QQuickAbstractAnimation::ThreadingModel QQuickAbstractAnimation::threadingModel( \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits Animation - \brief Provides a pause for an animation + \brief Provides a pause for an animation. When used in a SequentialAnimation, PauseAnimation is a step when nothing happens, for a specified duration. @@ -762,7 +762,7 @@ QAbstractAnimationJob* QQuickPauseAnimation::transition(QQuickStateActions &acti \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits PropertyAnimation - \brief Animates changes in color values + \brief Animates changes in color values. ColorAnimation is a specialized PropertyAnimation that defines an animation to be applied when a color value changes. @@ -920,7 +920,7 @@ void QActionAnimation::debugAnimation(QDebug d) const \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits Animation - \brief Defines scripts to be run during an animation + \brief Defines scripts to be run during an animation. ScriptAction can be used to run a script at a specific point in an animation. @@ -1063,7 +1063,7 @@ QAbstractAnimationJob* QQuickScriptAction::transition(QQuickStateActions &action \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits Animation - \brief Specifies immediate property changes during animation + \brief Specifies immediate property changes during animation. PropertyAction is used to specify an immediate property change during an animation. The property change is not animated. @@ -1324,7 +1324,7 @@ QAbstractAnimationJob* QQuickPropertyAction::transition(QQuickStateActions &acti \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits PropertyAnimation - \brief Animates changes in qreal-type values + \brief Animates changes in qreal-type values. NumberAnimation is a specialized PropertyAnimation that defines an animation to be applied when a numerical value changes. @@ -1437,7 +1437,7 @@ void QQuickNumberAnimation::setTo(qreal t) \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits PropertyAnimation - \brief Animates changes in QVector3d values + \brief Animates changes in QVector3d values. Vector3dAnimation is a specialized PropertyAnimation that defines an animation to be applied when a Vector3d value changes. @@ -1514,7 +1514,7 @@ void QQuickVector3dAnimation::setTo(QVector3D t) \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits PropertyAnimation - \brief Animates changes in rotation values + \brief Animates changes in rotation values. RotationAnimation is a specialized PropertyAnimation that gives control over the direction of rotation during an animation. @@ -1756,7 +1756,7 @@ QQmlListProperty<QQuickAbstractAnimation> QQuickAnimationGroup::animations() \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits Animation - \brief Allows animations to be run sequentially + \brief Allows animations to be run sequentially. The SequentialAnimation and ParallelAnimation types allow multiple animations to be run together. Animations defined in a SequentialAnimation @@ -1850,7 +1850,7 @@ QAbstractAnimationJob* QQuickSequentialAnimation::transition(QQuickStateActions \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits Animation - \brief Enables animations to be run in parallel + \brief Enables animations to be run in parallel. The SequentialAnimation and ParallelAnimation types allow multiple animations to be run together. Animations defined in a SequentialAnimation @@ -2013,7 +2013,7 @@ void QQuickBulkValueAnimator::debugAnimation(QDebug d) const \inqmlmodule QtQuick \ingroup qtquick-animation-properties \inherits Animation - \brief Animates changes in property values + \brief Animates changes in property values. PropertyAnimation provides a way to animate changes to a property's value. diff --git a/src/quick/util/qquickanimationcontroller.cpp b/src/quick/util/qquickanimationcontroller.cpp index 63373541a6..bfe96755c5 100644 --- a/src/quick/util/qquickanimationcontroller.cpp +++ b/src/quick/util/qquickanimationcontroller.cpp @@ -96,7 +96,7 @@ void QQuickAnimationControllerPrivate::animationCurrentTimeChanged(QAbstractAnim \instantiates QQuickAnimationController \inqmlmodule QtQuick \ingroup qtquick-animation-control - \brief Enables manual control of animations + \brief Enables manual control of animations. Normally animations are driven by an internal timer, but the AnimationController allows the given \a animation to be driven by a \a progress value explicitly. diff --git a/src/quick/util/qquickbehavior.cpp b/src/quick/util/qquickbehavior.cpp index 8a4ff6a779..d024c0099b 100644 --- a/src/quick/util/qquickbehavior.cpp +++ b/src/quick/util/qquickbehavior.cpp @@ -77,7 +77,7 @@ public: \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \ingroup qtquick-interceptors - \brief Defines a default animation for a property change + \brief Defines a default animation for a property change. A Behavior defines the default animation to be applied whenever a particular property value changes. diff --git a/src/quick/util/qquickfontloader.cpp b/src/quick/util/qquickfontloader.cpp index 2da541304d..2de9768243 100644 --- a/src/quick/util/qquickfontloader.cpp +++ b/src/quick/util/qquickfontloader.cpp @@ -198,7 +198,7 @@ static void q_QFontLoaderFontsStaticReset() \instantiates QQuickFontLoader \inqmlmodule QtQuick \ingroup qtquick-text-utility - \brief Allows fonts to be loaded by name or URL + \brief Allows fonts to be loaded by name or URL. The FontLoader type is used to load fonts by name or URL. diff --git a/src/quick/util/qquickfontmetrics.cpp b/src/quick/util/qquickfontmetrics.cpp index 8c44150486..f1278c366f 100644 --- a/src/quick/util/qquickfontmetrics.cpp +++ b/src/quick/util/qquickfontmetrics.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \since 5.4 \ingroup qtquick-text-utility - \brief Provides metrics for a given font + \brief Provides metrics for a given font. FontMetrics calculates the size of characters and strings for a given font. diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index 7c61affe75..5d7664433b 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -266,7 +266,7 @@ void QQuickImageResponse::cancel() an image provider named "colors", and the images to be loaded are "yellow" and "red", respectively: - \snippet imageprovider/imageprovider-example.qml 0 + \snippet imgprovider/imageprovider-example.qml 0 When these images are loaded by QML, it looks for a matching image provider and calls its requestImage() or requestPixmap() method (depending on its @@ -277,25 +277,14 @@ void QQuickImageResponse::cancel() requested by the above QML. This implementation dynamically generates QPixmap images that are filled with the requested color: - \snippet imageprovider/imageprovider.cpp 0 - \codeline - \snippet imageprovider/imageprovider.cpp 1 + \snippet imgprovider/imageprovider.cpp 0 To make this provider accessible to QML, it is registered with the QML engine with a "colors" identifier: - \code - int main(int argc, char *argv[]) - { - ... - - QQuickView view; - QQmlEngine *engine = view.engine(); - engine->addImageProvider(QLatin1String("colors"), new ColorPixmapProvider); - - ... - } - \endcode + \snippet imgprovider/imageprovider.cpp 1 + \codeline + \snippet imgprovider/imageprovider.cpp 2 Now the images can be successfully loaded in QML: diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp index 56eafcd12a..53b72d1e58 100644 --- a/src/quick/util/qquickpath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPathElement \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief PathElement is the base path type + \brief PathElement is the base path type. This type is the base for all path types. It cannot be instantiated. @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPath \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a path for use by \l PathView and \l Shape + \brief Defines a path for use by \l PathView and \l Shape. A Path is composed of one or more path segments - PathLine, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg. @@ -998,7 +998,7 @@ bool QQuickCurve::hasRelativeY() \instantiates QQuickPathAttribute \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Specifies how to set an attribute at a given position in a Path + \brief Specifies how to set an attribute at a given position in a Path. The PathAttribute object allows attributes consisting of a name and a value to be specified for various points along a path. The @@ -1115,7 +1115,7 @@ void QQuickPathAttribute::setValue(qreal value) \instantiates QQuickPathLine \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a straight line + \brief Defines a straight line. The example below creates a path consisting of a straight line from 0,100 to 200,100: @@ -1174,7 +1174,7 @@ void QQuickPathLine::addToPath(QPainterPath &path, const QQuickPathData &data) \instantiates QQuickPathMove \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Moves the Path's position + \brief Moves the Path's position. The example below creates a path consisting of two horizontal lines with some empty space between them. All three segments have a width of 100: @@ -1232,7 +1232,7 @@ void QQuickPathMove::addToPath(QPainterPath &path, const QQuickPathData &data) \instantiates QQuickPathQuad \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a quadratic Bezier curve with a control point + \brief Defines a quadratic Bezier curve with a control point. The following QML produces the path shown below: \table @@ -1384,7 +1384,7 @@ void QQuickPathQuad::addToPath(QPainterPath &path, const QQuickPathData &data) \instantiates QQuickPathCubic \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a cubic Bezier curve with two control points + \brief Defines a cubic Bezier curve with two control points. The following QML produces the path shown below: \table @@ -1608,7 +1608,7 @@ void QQuickPathCubic::addToPath(QPainterPath &path, const QQuickPathData &data) \instantiates QQuickPathCatmullRomCurve \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a point on a Catmull-Rom curve + \brief Defines a point on a Catmull-Rom curve. PathCurve provides an easy way to specify a curve passing directly through a set of points. Typically multiple PathCurves are used in a series, as the following example demonstrates: @@ -1754,7 +1754,7 @@ void QQuickPathCatmullRomCurve::addToPath(QPainterPath &path, const QQuickPathDa \instantiates QQuickPathArc \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines an arc with the given radius + \brief Defines an arc with the given radius. PathArc provides a simple way of specifying an arc that ends at a given position and uses the specified radius. It is modeled after the SVG elliptical arc command. @@ -1965,7 +1965,7 @@ void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data) \instantiates QQuickPathAngleArc \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines an arc with the given radii and center + \brief Defines an arc with the given radii and center. PathAngleArc provides a simple way of specifying an arc. While PathArc is designed to work as part of a larger path (specifying start and end), PathAngleArc is designed @@ -2138,7 +2138,7 @@ void QQuickPathAngleArc::addToPath(QPainterPath &path, const QQuickPathData &) \instantiates QQuickPathSvg \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a path using an SVG path data string + \brief Defines a path using an SVG path data string. The following QML produces the path shown below: \table @@ -2197,7 +2197,7 @@ void QQuickPathSvg::addToPath(QPainterPath &path, const QQuickPathData &) \instantiates QQuickPathPercent \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Manipulates the way a path is interpreted + \brief Manipulates the way a path is interpreted. PathPercent allows you to manipulate the spacing between items on a PathView's path. You can use it to bunch together items on part of diff --git a/src/quick/util/qquickpathinterpolator.cpp b/src/quick/util/qquickpathinterpolator.cpp index bb47ca0205..c27ca795e8 100644 --- a/src/quick/util/qquickpathinterpolator.cpp +++ b/src/quick/util/qquickpathinterpolator.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPathInterpolator \inqmlmodule QtQuick \ingroup qtquick-animation-control - \brief Specifies how to manually animate along a path + \brief Specifies how to manually animate along a path. PathInterpolator provides \c x, \c y, and \c angle information for a particular \c progress along a path. diff --git a/src/quick/util/qquickshortcut.cpp b/src/quick/util/qquickshortcut.cpp index 78dc855326..730a14369e 100644 --- a/src/quick/util/qquickshortcut.cpp +++ b/src/quick/util/qquickshortcut.cpp @@ -51,7 +51,7 @@ \inqmlmodule QtQuick \since 5.5 \ingroup qtquick-input - \brief Provides keyboard shortcuts + \brief Provides keyboard shortcuts. The Shortcut type provides a way of handling keyboard shortcuts. The shortcut can be set to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp index 607f39768b..bae57172d1 100644 --- a/src/quick/util/qquicksmoothedanimation.cpp +++ b/src/quick/util/qquicksmoothedanimation.cpp @@ -324,7 +324,7 @@ void QSmoothedAnimation::debugAnimation(QDebug d) const \inqmlmodule QtQuick \ingroup qtquick-transitions-animations \inherits NumberAnimation - \brief Allows a property to smoothly track a value + \brief Allows a property to smoothly track a value. A SmoothedAnimation animates a property's value to a set target value using an ease in/out quad easing curve. When the target value changes, diff --git a/src/quick/util/qquickspringanimation.cpp b/src/quick/util/qquickspringanimation.cpp index 4389d941fd..9012d20f9a 100644 --- a/src/quick/util/qquickspringanimation.cpp +++ b/src/quick/util/qquickspringanimation.cpp @@ -352,7 +352,7 @@ void QQuickSpringAnimationPrivate::updateMode() \ingroup qtquick-transitions-animations \inherits NumberAnimation - \brief Allows a property to track a value in a spring-like motion + \brief Allows a property to track a value in a spring-like motion. SpringAnimation mimics the oscillatory behavior of a spring, with the appropriate \l spring constant to control the acceleration and the \l damping to control how quickly the effect dies away. diff --git a/src/quick/util/qquickstate.cpp b/src/quick/util/qquickstate.cpp index 02c1efb62f..3ca6440784 100644 --- a/src/quick/util/qquickstate.cpp +++ b/src/quick/util/qquickstate.cpp @@ -121,7 +121,7 @@ QQuickStateOperation::QQuickStateOperation(QObjectPrivate &dd, QObject *parent) \instantiates QQuickState \inqmlmodule QtQuick \ingroup qtquick-states - \brief Defines configurations of objects and properties + \brief Defines configurations of objects and properties. A \e state is a set of batched changes from the default configuration. diff --git a/src/quick/util/qquickstatechangescript.cpp b/src/quick/util/qquickstatechangescript.cpp index a70fa1a676..f971d7e551 100644 --- a/src/quick/util/qquickstatechangescript.cpp +++ b/src/quick/util/qquickstatechangescript.cpp @@ -69,7 +69,7 @@ public: \instantiates QQuickStateChangeScript \inqmlmodule QtQuick \ingroup qtquick-states - \brief Specifies how to run a script in a state + \brief Specifies how to run a script in a state. A StateChangeScript is run upon entering a state. You can optionally use ScriptAction to specify the point in the transition at which diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp index 1b99baed9a..c852c16509 100644 --- a/src/quick/util/qquickstategroup.cpp +++ b/src/quick/util/qquickstategroup.cpp @@ -94,7 +94,7 @@ public: \instantiates QQuickStateGroup \inqmlmodule QtQuick \ingroup qtquick-states - \brief Provides built-in state support for non-Item types + \brief Provides built-in state support for non-Item types. Item (and all derived types) provides built in support for states and transitions via its \l{Item::state}{state}, \l{Item::states}{states} and \l{Item::transitions}{transitions} properties. StateGroup provides an easy way to diff --git a/src/quick/util/qquicksystempalette.cpp b/src/quick/util/qquicksystempalette.cpp index c5768a5d9f..413b87aa93 100644 --- a/src/quick/util/qquicksystempalette.cpp +++ b/src/quick/util/qquicksystempalette.cpp @@ -58,7 +58,7 @@ public: \instantiates QQuickSystemPalette \inqmlmodule QtQuick \ingroup qtquick-visual-utility - \brief Provides access to the Qt palettes + \brief Provides access to the Qt palettes. The SystemPalette type provides access to the Qt application palettes. This provides information about the standard colors used diff --git a/src/quick/util/qquicktextmetrics.cpp b/src/quick/util/qquicktextmetrics.cpp index 43945b0f5a..81088b5cd6 100644 --- a/src/quick/util/qquicktextmetrics.cpp +++ b/src/quick/util/qquicktextmetrics.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \inqmlmodule QtQuick \since 5.4 \ingroup qtquick-text-utility - \brief Provides metrics for a given font and text + \brief Provides metrics for a given font and text. TextMetrics calculates various properties of a given string of text for a particular font. diff --git a/src/quick/util/qquicktransition.cpp b/src/quick/util/qquicktransition.cpp index fd6415dffb..c8699426f2 100644 --- a/src/quick/util/qquicktransition.cpp +++ b/src/quick/util/qquicktransition.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickTransition \inqmlmodule QtQuick \ingroup qtquick-transitions-animations - \brief Defines animated transitions that occur on state changes + \brief Defines animated transitions that occur on state changes. A Transition defines the animations to be applied when a \l State change occurs. diff --git a/src/quick/util/qquickvalidator.cpp b/src/quick/util/qquickvalidator.cpp index c3ce149dcf..b2b773cd94 100644 --- a/src/quick/util/qquickvalidator.cpp +++ b/src/quick/util/qquickvalidator.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \instantiates QIntValidator \inqmlmodule QtQuick \ingroup qtquick-text-utility - \brief Defines a validator for integer values + \brief Defines a validator for integer values. The IntValidator type provides a validator for integer values. @@ -111,7 +111,7 @@ void QQuickIntValidator::resetLocaleName() \instantiates QDoubleValidator \inqmlmodule QtQuick \ingroup qtquick-text-utility - \brief Defines a validator for non-integer numbers + \brief Defines a validator for non-integer numbers. The DoubleValidator type provides a validator for non-integer numbers. @@ -205,7 +205,7 @@ void QQuickDoubleValidator::resetLocaleName() \instantiates QRegExpValidator \inqmlmodule QtQuick \ingroup qtquick-text-utility - \brief Provides a string validator + \brief Provides a string validator. The RegExpValidator type provides a validator, which counts as valid any string which matches a specified regular expression. diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 920b400eac..a098c94670 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -372,7 +372,7 @@ QImage QQuickWidgetPrivate::grabFramebuffer() \module QtQuickWidgets \title Qt Quick Widgets C++ Classes \ingroup modules - \brief The C++ API provided by the Qt Quick Widgets module + \brief The C++ API provided by the Qt Quick Widgets module. \qtvariable quickwidgets To link against the module, add this line to your \l qmake diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt deleted file mode 100644 index 4135b23608..0000000000 --- a/tests/auto/compilerwarnings/data/test_cpp.txt +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite 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$ -** -****************************************************************************/ - -#ifndef QT_NO_DECLARATIVE -#include <QtQml/QtQml> -#endif - -#ifndef Q_OS_MAC -int main(int, char **) -{ - return 0; -} -#endif diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro index 40de4548a7..6dee2a0454 100644 --- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro +++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro @@ -16,4 +16,7 @@ RESOURCES += jsimport.qml script.js library.js RESOURCES += Enums.qml +# QTBUG-46375 +!win32: RESOURCES += trickypaths_umlaut.qrc + QT += core-private qml-private testlib diff --git a/tests/auto/qml/qmlcachegen/trickypaths.qrc b/tests/auto/qml/qmlcachegen/trickypaths.qrc index 271cf6571e..57977ccf6d 100644 --- a/tests/auto/qml/qmlcachegen/trickypaths.qrc +++ b/tests/auto/qml/qmlcachegen/trickypaths.qrc @@ -1,5 +1,7 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/directory with spaces"> <file alias="file name with spaces.qml">trickypaths.qml</file> +<file>versionStyleSuffix-1.2-core-yc.qml</file> +<file>versionStyleSuffix-1.2-more.qml</file> </qresource> </RCC> diff --git a/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc b/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc new file mode 100644 index 0000000000..9ca889d692 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> +<file alias="Bäh.qml">umlaut.qml</file> +</qresource> +</RCC> diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index 3b7d268f7b..6dc54a323e 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -53,6 +53,7 @@ private slots: void workerScripts(); + void trickyPaths_data(); void trickyPaths(); void scriptImport(); @@ -408,13 +409,26 @@ void tst_qmlcachegen::functionExpressions() QCOMPARE(obj->property("h_connections_handler_called").toBool(), true); } +void tst_qmlcachegen::trickyPaths_data() +{ + QTest::addColumn<QString>("filePath"); + QTest::newRow("path with spaces") << QStringLiteral(":/directory with spaces/file name with spaces.qml"); + QTest::newRow("version style suffix 1") << QStringLiteral(":/directory with spaces/versionStyleSuffix-1.2-core-yc.qml"); + QTest::newRow("version style suffix 2") << QStringLiteral(":/directory with spaces/versionStyleSuffix-1.2-more.qml"); + + // QTBUG-46375 +#if !defined(Q_OS_WIN) + QTest::newRow("path with umlaut") << QStringLiteral(":/Bäh.qml"); +#endif +} + void tst_qmlcachegen::trickyPaths() { - QString pathWithSpaces(QStringLiteral(":/directory with spaces/file name with spaces.qml")); - QVERIFY2(QFile::exists(pathWithSpaces), qPrintable(pathWithSpaces)); - QCOMPARE(QFileInfo(pathWithSpaces).size(), 0); + QFETCH(QString, filePath); + QVERIFY2(QFile::exists(filePath), qPrintable(filePath)); + QCOMPARE(QFileInfo(filePath).size(), 0); QQmlEngine engine; - QQmlComponent component(&engine, QUrl("qrc" + pathWithSpaces)); + QQmlComponent component(&engine, QUrl("qrc" + filePath)); QScopedPointer<QObject> obj(component.create()); QVERIFY(!obj.isNull()); QCOMPARE(obj->property("success").toInt(), 42); diff --git a/tests/auto/qml/qmlcachegen/umlaut.qml b/tests/auto/qml/qmlcachegen/umlaut.qml new file mode 100644 index 0000000000..0836808dc2 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/umlaut.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + property int success: 42 +} diff --git a/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml new file mode 100644 index 0000000000..0836808dc2 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + property int success: 42 +} diff --git a/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml new file mode 100644 index 0000000000..0836808dc2 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + property int success: 42 +} diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index 042908bf0c..44cd1dd656 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -501,7 +501,7 @@ void tst_qquickwindow::openglContextCreatedSignal() if (window.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL) QSKIP("Skipping OpenGL context test due to not running with OpenGL"); - QVERIFY(spy.size() > 0); + QTRY_VERIFY(spy.size() > 0); QVariant ctx = spy.at(0).at(0); QCOMPARE(qvariant_cast<QOpenGLContext *>(ctx), window.openglContext()); diff --git a/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake b/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake index 26838a5163..49ba4edde9 100644 --- a/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake +++ b/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake @@ -44,7 +44,7 @@ function(QTQUICK_COMPILER_ADD_RESOURCES outfiles) set(rcc_file_with_compilation_units) - execute_process(COMMAND ${rcc_path} -list \"${input_resource}\" OUTPUT_VARIABLE rcc_contents) + execute_process(COMMAND ${rcc_path} -list "${input_resource}" OUTPUT_VARIABLE rcc_contents) string(REGEX REPLACE "[\r\n]+" ";" rcc_contents ${rcc_contents}) foreach(it ${rcc_contents}) get_filename_component(extension ${it} EXT) diff --git a/tools/qmlcachegen/generateloader.cpp b/tools/qmlcachegen/generateloader.cpp index 96528a9477..68aacf78ce 100644 --- a/tools/qmlcachegen/generateloader.cpp +++ b/tools/qmlcachegen/generateloader.cpp @@ -35,6 +35,52 @@ #include <QFileInfo> #include <QSaveFile> +/*! + * \internal + * Mangles \a str to be a unique C++ identifier. Characters that are invalid for C++ identifiers + * are replaced by the pattern \c _0x<hex>_ where <hex> is the hexadecimal unicode + * representation of the character. As identifiers with leading underscores followed by either + * another underscore or a capital letter are reserved in C++, we also escape those, by escaping + * the first underscore, using the above method. + * + * \note + * Although C++11 allows for non-ascii (unicode) characters to be used in identifiers, + * many compilers forgot to read the spec and do not implement this. Some also do not + * implement C99 identifiers, because that is \e {at the implementation's discretion}. So, + * we are stuck with plain old boring identifiers. + */ +QString mangledIdentifier(const QString &str) +{ + Q_ASSERT(!str.isEmpty()); + + QString mangled; + mangled.reserve(str.size()); + + int i = 0; + if (str.startsWith(QLatin1Char('_')) && str.size() > 1) { + QChar ch = str.at(1); + if (ch == QLatin1Char('_') + || (ch >= QLatin1Char('A') && ch <= QLatin1Char('Z'))) { + mangled += QLatin1String("_0x5f_"); + ++i; + } + } + + for (int ei = str.length(); i != ei; ++i) { + auto c = str.at(i).unicode(); + if ((c >= QLatin1Char('0') && c <= QLatin1Char('9')) + || (c >= QLatin1Char('a') && c <= QLatin1Char('z')) + || (c >= QLatin1Char('A') && c <= QLatin1Char('Z')) + || c == QLatin1Char('_')) { + mangled += c; + } else { + mangled += QLatin1String("_0x") + QString::number(c, 16) + QLatin1Char('_'); + } + } + + return mangled; +} + QString symbolNamespaceForPath(const QString &relativePath) { QFileInfo fi(relativePath); @@ -47,12 +93,8 @@ QString symbolNamespaceForPath(const QString &relativePath) } symbol += fi.baseName(); symbol += QLatin1Char('_'); - symbol += fi.suffix(); - symbol.replace(QLatin1Char('.'), QLatin1Char('_')); - symbol.replace(QLatin1Char('+'), QLatin1Char('_')); - symbol.replace(QLatin1Char('-'), QLatin1Char('_')); - symbol.replace(QLatin1Char(' '), QLatin1Char('_')); - return symbol; + symbol += fi.completeSuffix(); + return mangledIdentifier(symbol); } struct VirtualDirectoryEntry @@ -318,7 +360,7 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN stream << " QHash<QString, const QQmlPrivate::CachedQmlUnit*> resourcePathToCachedUnit;\n"; stream << " static const QQmlPrivate::CachedQmlUnit *lookupCachedUnit(const QUrl &url);\n"; stream << "};\n\n"; - stream << "Q_GLOBAL_STATIC(Registry, unitRegistry);\n"; + stream << "Q_GLOBAL_STATIC(Registry, unitRegistry)\n"; stream << "\n\n"; stream << "Registry::Registry() {\n"; @@ -368,7 +410,7 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN stream << " Q_INIT_RESOURCE(" << qtResourceNameForFile(newResourceFile) << ");\n"; stream << " return 1;\n"; stream << "}\n"; - stream << "Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(" << initFunction << "));\n"; + stream << "Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(" << initFunction << "))\n"; const QString cleanupFunction = QLatin1String("qCleanupResources_") + suffix; stream << QStringLiteral("int QT_MANGLE_NAMESPACE(%1)() {\n").arg(cleanupFunction); diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf index 9fa982ca0f..d05908560d 100644 --- a/tools/qmlcachegen/qtquickcompiler.prf +++ b/tools/qmlcachegen/qtquickcompiler.prf @@ -14,6 +14,13 @@ defineReplace(qmlCacheResourceFileOutputName) { return($${name}) } +defineTest(qtQuickSkippedResourceFile) { + for(skippedRes, QTQUICK_COMPILER_SKIPPED_RESOURCES) { + equals(1, $$skippedRes): return(true) + } + return(false) +} + # Flatten RESOURCES that may contain individual files or objects load(resources) @@ -21,6 +28,11 @@ NEWRESOURCES = QMLCACHE_RESOURCE_FILES = for(res, RESOURCES) { + qtQuickSkippedResourceFile($$res) { + NEWRESOURCES += $$res + next() + } + absRes = $$absolute_path($$res, $$_PRO_FILE_PWD_) rccContents = $$system($$QMAKE_RCC_DEP -list $$system_quote($$absRes),lines) contains(rccContents,.*\\.js$)|contains(rccContents,.*\\.qml$) { |