From 68e282f510d5f5ee490ffdb0500f90e0932b8cef Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Fri, 8 Jun 2018 10:01:53 +0300 Subject: Add changes file for Qt 5.11.1 Change-Id: I9a46ff6580e63c621835a4100e6fd19b5367492c Reviewed-by: Shawn Rutledge Reviewed-by: Simon Hausmann --- dist/changes-5.11.1 | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 dist/changes-5.11.1 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. -- cgit v1.2.3 From b0c79a8bf41d3ae79c23e53afdcdba92ec0ec0b5 Mon Sep 17 00:00:00 2001 From: Nils Jeisecke Date: Tue, 10 Apr 2018 15:18:10 +0200 Subject: Flickable: fix another possible cause for out-of-sync moving flags In addition to d868bb4f3e4b0424fd4a2989ff1c82692b0f014c this removes the check for scrollingPhase in movementEnding. If movementEnding is invoked by some codepath other than timerEvent (e.g. setContentY) and scrollingPhase is true this will again prevent any further invocation of movementStarting from within the drag method (see d868bb4). As this check was introduced together with the movementEnding timer (QTBUG-63026) and scrollingPhase is now checked inside the timerEvent there should be no need for the check in movementEnding. Task-number: QTBUG-67460 Change-Id: I88ad6e3ee56b88a66bb61798b8876324f4842f1e Reviewed-by: Shawn Rutledge --- src/quick/items/qquickflickable.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 9c775f7e93..d11f6ea720 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -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()) { -- cgit v1.2.3 From ed3a93feee9a1b7e2b26c651e446c4a058ee8f8e Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Mon, 18 Jun 2018 15:09:56 +0200 Subject: Doc: Add missing dots (qtdeclarative) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö --- examples/qml/doc/src/qml-extending.qdoc | 22 ++++++++++---------- .../doc/src/networkaccessmanagerfactory.qdoc | 2 +- examples/qml/qml-i18n/doc/src/i18n.qdoc | 2 +- .../qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc | 2 +- .../customitems/tabwidget/doc/src/tabwidget.qdoc | 2 +- .../quick/draganddrop/doc/src/draganddrop.qdoc | 2 +- .../layouts/doc/src/qtquicklayouts-examples.qdoc | 2 +- .../quick/rendercontrol/doc/src/rendercontrol.qdoc | 2 +- examples/quick/window/doc/src/window.qdoc | 2 +- src/imports/testlib/SignalSpy.qml | 2 +- src/imports/testlib/TestCase.qml | 2 +- src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 4 ++-- src/particles/qquickage.cpp | 2 +- src/particles/qquickangledirection.cpp | 2 +- src/particles/qquickcumulativedirection.cpp | 2 +- src/particles/qquickcustomparticle.cpp | 2 +- src/particles/qquickdirection.cpp | 2 +- src/particles/qquickellipseextruder.cpp | 2 +- src/particles/qquickfriction.cpp | 2 +- src/particles/qquickgravity.cpp | 2 +- src/particles/qquickgroupgoal.cpp | 2 +- src/particles/qquickimageparticle.cpp | 2 +- src/particles/qquickitemparticle.cpp | 2 +- src/particles/qquicklineextruder.cpp | 2 +- src/particles/qquickmaskextruder.cpp | 2 +- src/particles/qquickparticleaffector.cpp | 2 +- src/particles/qquickparticleemitter.cpp | 2 +- src/particles/qquickparticleextruder.cpp | 2 +- src/particles/qquickparticlegroup.cpp | 2 +- src/particles/qquickparticlepainter.cpp | 2 +- src/particles/qquickparticlesystem.cpp | 2 +- src/particles/qquickpointattractor.cpp | 2 +- src/particles/qquickpointdirection.cpp | 2 +- src/particles/qquickrectangleextruder.cpp | 2 +- src/particles/qquickspritegoal.cpp | 2 +- src/particles/qquicktargetdirection.cpp | 2 +- src/particles/qquicktrailemitter.cpp | 2 +- src/particles/qquickturbulence.cpp | 2 +- src/particles/qquickv4particledata.cpp | 2 +- src/particles/qquickwander.cpp | 2 +- src/qml/doc/src/javascript/date.qdoc | 2 +- src/qml/doc/src/javascript/number.qdoc | 2 +- src/qml/doc/src/javascript/string.qdoc | 2 +- src/qml/doc/src/qtqml-cpp.qdoc | 2 +- src/qml/qml/qqmlcomponent.cpp | 4 ++-- src/qml/qml/qqmlengine.cpp | 2 +- src/qml/qml/qqmlfileselector.cpp | 2 +- src/qml/qml/qqmlincubator.cpp | 2 +- src/qml/qml/qqmllocale.cpp | 2 +- src/qml/qml/qqmlloggingcategory.cpp | 2 +- src/qml/types/qqmlconnections.cpp | 2 +- src/qml/types/qqmldelegatemodel.cpp | 8 ++++---- src/qml/types/qqmlinstantiator.cpp | 2 +- src/qml/types/qqmllistmodel.cpp | 4 ++-- src/qml/types/qqmlobjectmodel.cpp | 4 ++-- src/qml/types/qqmltimer.cpp | 2 +- src/qml/types/qquickpackage.cpp | 2 +- src/qml/types/qquickworkerscript.cpp | 2 +- src/quick/handlers/qquickdraghandler.cpp | 2 +- src/quick/handlers/qquickpinchhandler.cpp | 2 +- src/quick/handlers/qquicksinglepointhandler.cpp | 2 +- src/quick/items/context2d/qquickcanvasitem.cpp | 2 +- src/quick/items/context2d/qquickcontext2d.cpp | 8 ++++---- src/quick/items/qquickaccessibleattached.cpp | 2 +- src/quick/items/qquickanimatedimage.cpp | 2 +- src/quick/items/qquickanimatedsprite.cpp | 2 +- src/quick/items/qquickborderimage.cpp | 2 +- src/quick/items/qquickdrag.cpp | 2 +- src/quick/items/qquickdroparea.cpp | 4 ++-- src/quick/items/qquickevents.cpp | 14 ++++++------- src/quick/items/qquickflickable.cpp | 2 +- src/quick/items/qquickflipable.cpp | 2 +- src/quick/items/qquickfocusscope.cpp | 2 +- src/quick/items/qquickgraphicsinfo.cpp | 2 +- src/quick/items/qquickgridview.cpp | 2 +- src/quick/items/qquickimage.cpp | 2 +- src/quick/items/qquickitem.cpp | 10 ++++----- src/quick/items/qquickitemanimation.cpp | 6 +++--- src/quick/items/qquickitemviewtransition.cpp | 2 +- src/quick/items/qquicklistview.cpp | 2 +- src/quick/items/qquickloader.cpp | 2 +- src/quick/items/qquickmousearea.cpp | 2 +- src/quick/items/qquickmultipointtoucharea.cpp | 6 +++--- src/quick/items/qquickopenglinfo.cpp | 2 +- src/quick/items/qquickpathview.cpp | 2 +- src/quick/items/qquickpincharea.cpp | 4 ++-- src/quick/items/qquickpositioners.cpp | 10 ++++----- src/quick/items/qquickrectangle.cpp | 6 +++--- src/quick/items/qquickrepeater.cpp | 2 +- src/quick/items/qquickshadereffect.cpp | 2 +- src/quick/items/qquickshadereffectmesh.cpp | 2 +- src/quick/items/qquickshadereffectsource.cpp | 2 +- src/quick/items/qquicksprite.cpp | 2 +- src/quick/items/qquickspritesequence.cpp | 2 +- src/quick/items/qquickstateoperations.cpp | 4 ++-- src/quick/items/qquicktext.cpp | 2 +- src/quick/items/qquicktextdocument.cpp | 2 +- src/quick/items/qquicktextedit.cpp | 2 +- src/quick/items/qquicktextinput.cpp | 2 +- src/quick/items/qquicktranslate.cpp | 8 ++++---- src/quick/items/qquickwindow.cpp | 6 +++--- src/quick/scenegraph/coreapi/qsggeometry.cpp | 2 +- src/quick/scenegraph/coreapi/qsgnode.cpp | 2 +- src/quick/util/qquickanimation.cpp | 22 ++++++++++---------- src/quick/util/qquickanimationcontroller.cpp | 2 +- src/quick/util/qquickbehavior.cpp | 2 +- src/quick/util/qquickfontloader.cpp | 2 +- src/quick/util/qquickfontmetrics.cpp | 2 +- src/quick/util/qquickpath.cpp | 24 +++++++++++----------- src/quick/util/qquickpathinterpolator.cpp | 2 +- src/quick/util/qquickshortcut.cpp | 2 +- src/quick/util/qquicksmoothedanimation.cpp | 2 +- src/quick/util/qquickspringanimation.cpp | 2 +- src/quick/util/qquickstate.cpp | 2 +- src/quick/util/qquickstatechangescript.cpp | 2 +- src/quick/util/qquickstategroup.cpp | 2 +- src/quick/util/qquicksystempalette.cpp | 2 +- src/quick/util/qquicktextmetrics.cpp | 2 +- src/quick/util/qquicktransition.cpp | 2 +- src/quick/util/qquickvalidator.cpp | 6 +++--- src/quickwidgets/qquickwidget.cpp | 2 +- 121 files changed, 192 insertions(+), 192 deletions(-) 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/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/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 8e9b016444..77b644d3f2 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 a08b59a598..773d9747f0 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -90,7 +90,7 @@ typedef QPair 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} @@ -619,7 +619,7 @@ void QQuickXmlListModelPrivate::clear_role(QQmlListProperty 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 @@ -1828,7 +1828,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 @@ -1991,7 +1991,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/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 be8300f531..b953ad1c7f 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 -- cgit v1.2.3 From ac00839eb91e22d58e9f3de519333d879a268c4d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 19 Jun 2018 11:32:10 +0200 Subject: Fix support for QTQUICK_COMPILER_SKIPPED_RESOURCES This used to work with QQC before 5.11 and somehow was lost in translation. Change-Id: Id3d38c609e228d0f7676d3fb177b271eb46f6f73 Reviewed-by: Andy Shaw --- tools/qmlcachegen/qtquickcompiler.prf | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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$) { -- cgit v1.2.3 From 16cf097972a72656142ab0ed797282ad95ee5713 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 13 Jun 2018 10:21:47 +0200 Subject: Attempt to stabilize tst_qquickwindow::openglContextCreatedSignal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test creates a QQuickWindow, calls show() on it and then waits with qWaitForWindowExposed() to return true. The expectation of the test is that when that call returns, an expose event was also successfully delivered to the window and the scene graph's render loop has attempted rendering the window contents - using *RenderLoop*::renderWindow(), which would - in the case of the gui thread loop - create the GL context. This expectation is expressed using a QVERIFY on a signal spy that observes the emission of the GL context created signal of QQuickWindow. There is no guarantee that by the time qWaitForWindowExposed returned true, an expose event was delivered to the window. Therefore let's use QTRY_VERIFY. Change-Id: I604cbf40dfb7980448f406e26b77678a65faf359 Reviewed-by: Tor Arne Vestbø --- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(ctx), window.openglContext()); -- cgit v1.2.3 From 0996f18b252504ccc2db94b16c751835e3b9be8e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 26 Mar 2018 13:52:17 +0200 Subject: Fix CONFIG+=qtquickcompiler with umlauts in the file path Instead of replacing every character that is not allowed in C++ identifiers with an underscore (which in turn could lead to collissions), replace it with the hexadecimal value of the offending character's unicode value. In addition we must use the complete suffix when mapping Foo.qml to Foo_qml.cpp. Task-number: QTBUG-68608 Started-by: Erik Verbruggen Change-Id: I7e2153f0e6671b37dcaee4efb9aaae1d9b230f0c Reviewed-by: Ulf Hermann --- tests/auto/qml/qmlcachegen/qmlcachegen.pro | 3 ++ tests/auto/qml/qmlcachegen/trickypaths.qrc | 2 + tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc | 5 ++ tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 22 +++++++-- tests/auto/qml/qmlcachegen/umlaut.qml | 4 ++ .../qmlcachegen/versionStyleSuffix-1.2-core-yc.qml | 4 ++ .../qmlcachegen/versionStyleSuffix-1.2-more.qml | 4 ++ tools/qmlcachegen/generateloader.cpp | 54 +++++++++++++++++++--- 8 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc create mode 100644 tests/auto/qml/qmlcachegen/umlaut.qml create mode 100644 tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml create mode 100644 tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml 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 @@ trickypaths.qml +versionStyleSuffix-1.2-core-yc.qml +versionStyleSuffix-1.2-more.qml 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 @@ + + +umlaut.qml + + 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("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 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/tools/qmlcachegen/generateloader.cpp b/tools/qmlcachegen/generateloader.cpp index 96528a9477..178a109791 100644 --- a/tools/qmlcachegen/generateloader.cpp +++ b/tools/qmlcachegen/generateloader.cpp @@ -35,6 +35,52 @@ #include #include +/*! + * \internal + * Mangles \a str to be a unique C++ identifier. Characters that are invalid for C++ identifiers + * are replaced by the pattern \c _0x_ where 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 -- cgit v1.2.3 From 27a6b122343322a02e0fe26fb76c05f6105c4b94 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 13 Jun 2018 08:05:03 +0200 Subject: qmlcachegen: Remove superfluous semicolons from generated code This fixes the "extra ';'" warnings when compiling generated code with -Werror=pedantic. Task-number: QTBUG-68809 Change-Id: Ie26cdc4e06bc26587766dd72b258624773a7f990 Reviewed-by: Simon Hausmann --- tools/qmlcachegen/generateloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qmlcachegen/generateloader.cpp b/tools/qmlcachegen/generateloader.cpp index 178a109791..68aacf78ce 100644 --- a/tools/qmlcachegen/generateloader.cpp +++ b/tools/qmlcachegen/generateloader.cpp @@ -360,7 +360,7 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN stream << " QHash 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"; @@ -410,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); -- cgit v1.2.3 From d1693c14b4e7f7d4a8ab4b2e876d9cf43a621e2e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 19 Jun 2018 16:12:22 +0200 Subject: revert change 353164263c55825a0ec72d30128c50560c626334 The change was too aggressive in trying to avoid marking the array data. We didn't catch all cases where on could be inserting a GC controlled object into the array data. Let's be safe and always mark the content of array data objects. Task-number: QTBUG-68894 Change-Id: Ifbb628be898c0903596b1a483212384295b01df5 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4arraydata.cpp | 4 ---- src/qml/jsruntime/qv4arraydata_p.h | 4 +--- src/qml/jsruntime/qv4engine.cpp | 6 ------ src/qml/jsruntime/qv4object.cpp | 7 ++----- tests/auto/qml/ecmascripttests/test262 | 2 +- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index b33b34ee08..855407e6f7 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -168,8 +168,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(newData->d()->values.values + alloc) : nullptr); o->setArrayData(newData); @@ -192,8 +190,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 b2573b4491..7ec060f9c6 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) \ @@ -147,8 +147,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 835933c043..0ed0df89a9 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -599,12 +599,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 bcbe475c2c..0c6cde84ad 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -231,11 +231,8 @@ void Heap::Object::markObjects(Heap::Base *b, MarkStack *stack) Object *o = static_cast(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(o) + o->vtable()->inlinePropertyOffset; const Value *end = v + nInline; diff --git a/tests/auto/qml/ecmascripttests/test262 b/tests/auto/qml/ecmascripttests/test262 index e505c11eeb..40b4f28e98 160000 --- a/tests/auto/qml/ecmascripttests/test262 +++ b/tests/auto/qml/ecmascripttests/test262 @@ -1 +1 @@ -Subproject commit e505c11eebe5a389a7d47a4bf570c66469740b01 +Subproject commit 40b4f28e98c416a092e26aa17489bf94ccb8bf4f -- cgit v1.2.3 From 053e76ab80f72eb026894fc05ee83593ea2079fd Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Mon, 11 Jun 2018 11:57:52 +0200 Subject: CMake: fix bad argument quoting when calling rcc Fixes: 8735ff6499f4ef93675a9e8158af77461f6e93bc Change-Id: If8a3a394e52027fe99acc98ea8f4b7847db81497 Reviewed-by: Simon Hausmann Reviewed-by: Kevin Funk --- tools/qmlcachegen/Qt5QuickCompilerConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3 From f82ce803816aeb43e487c29a28f0f0ed126621ca Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 14 Jun 2018 15:36:06 +0200 Subject: Fix transitive include qsgtexturefilehandler_p.h is included through other headers that depend on QT_CONFIG(opengl). Change-Id: Ic87482289332cb1a0215ca74362207f9941239d7 Reviewed-by: Michael Brasser --- src/quick/scenegraph/util/qsgtexturereader.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 +#include + #if QT_CONFIG(opengl) #include #include -- cgit v1.2.3 From fceb04cf29764c815fb539d3d62ed26edcb78448 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 20 Jun 2018 17:01:29 +0200 Subject: Script::parse(): improve "function expressions as statement" error msg Change-Id: I3c54c90bfa48d2f6ba78b898413133e49b66c208 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index afa7d2ed52..5cd62c90f1 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 = ⅇ -- cgit v1.2.3 From e023a338c4f30e43f4b2ae4a916e4051123d41dd Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 14 Jun 2018 12:25:44 +0200 Subject: Fix crash in binding setup during async load from a Loader Change 91ac4a8d099d10fdfd5aa631da02727b7917d85f removed the source location from QQmlBindingFunction, because it can be retrieved from the QV4::Function in the QV4::CppStackFrame. However, if a binding is initialized as part of an asynchronous load from a Loader component, there might not be a valid function pointer in that frame. In this specific case, we fall back to the source location of the binding function. Task-number: QTBUG-68738 Change-Id: I2d3f17e4cb82be1e70a54cb66f9cf9c17f541f95 Reviewed-by: Lars Knoll Reviewed-by: Simon Hausmann --- src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 221754a29a..f04bee7f19 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1355,7 +1355,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); -- cgit v1.2.3 From 9f8f5ae26508244f4f8e496784ea5d9c9d97927f Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Thu, 21 Jun 2018 12:23:59 +0200 Subject: Doc: Correct QML type for FolderListModel.folder Task-number: QTBUG-68940 Change-Id: I439ec9b6253815f41e405a0d9f79ff69eb75c98e Reviewed-by: Mitch Curtis --- src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 { -- cgit v1.2.3 From 1ae6ef5ec55aedacb36060e6f7790c082725a21d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 20 Jun 2018 15:52:13 +0200 Subject: PacketProtocol: Explicitly transmit packet sizes in little endian So far the protocol would fail if the endpoints have different endianness. Task-number: QTBUG-68721 Change-Id: Ib53894b1e2f3eecf40160bb7bb9cfaa4beb2c045 Reviewed-by: Simon Hausmann --- .../qmltooling/packetprotocol/qpacketprotocol.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp index 1c73b9d7fb..e1d6263e36 100644 --- a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp +++ b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp @@ -40,6 +40,8 @@ #include "qpacketprotocol_p.h" #include +#include + #include #include @@ -104,7 +106,7 @@ class QPacketProtocolPrivate : public QObjectPrivate public: QPacketProtocolPrivate(QIODevice *dev); - QList sendingPackets; + QList sendingPackets; QList packets; QByteArray inProgress; qint32 inProgressSize; @@ -135,14 +137,20 @@ QPacketProtocol::QPacketProtocol(QIODevice *dev, QObject *parent) void QPacketProtocol::send(const QByteArray &data) { Q_D(QPacketProtocol); + static const qint32 maxSize = std::numeric_limits::max() - sizeof(qint32); if (data.isEmpty()) return; // We don't send empty packets - qint64 sendSize = data.size() + sizeof(qint32); + if (data.size() > maxSize) { + emit invalidPacket(); + return; + } + + qint32 sendSize = data.size() + sizeof(qint32); d->sendingPackets.append(sendSize); - qint32 sendSize32 = sendSize; - qint64 writeBytes = d->dev->write((char *)&sendSize32, sizeof(qint32)); + qint32 sendSizeLE = qToLittleEndian(sendSize); + qint64 writeBytes = d->dev->write((char *)&sendSizeLE, sizeof(qint32)); Q_UNUSED(writeBytes); Q_ASSERT(writeBytes == sizeof(qint32)); writeBytes = d->dev->write(data); @@ -236,7 +244,9 @@ void QPacketProtocol::readyToRead() return; // Read size header - const qint64 read = d->dev->read((char *)&d->inProgressSize, sizeof(qint32)); + qint32 inProgressSizeLE; + const qint64 read = d->dev->read((char *)&inProgressSizeLE, sizeof(qint32)); + d->inProgressSize = qFromLittleEndian(inProgressSizeLE); // Check sizing constraints if (read != sizeof(qint32) || d->inProgressSize < read) { -- cgit v1.2.3 From 9fd90b04a33293bac4d840e1f2e10f9c42b3ec13 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Fri, 8 Jun 2018 14:59:15 +0200 Subject: Doc: Move the code snippets to a separate snippet file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I17671563f2beebe16ae1d08552854eaf44ae43ee Reviewed-by: Topi Reiniö --- examples/quick/imageprovider/imageprovider.cpp | 4 - .../snippets/imgprovider/imageprovider-example.qml | 57 +++++++++++++ .../doc/snippets/imgprovider/imageprovider.cpp | 96 ++++++++++++++++++++++ src/quick/doc/snippets/qquickview-ex.cpp | 61 ++++++++++++++ src/quick/items/qquickview.cpp | 6 +- src/quick/util/qquickimageprovider.cpp | 21 ++--- 6 files changed, 220 insertions(+), 25 deletions(-) create mode 100644 src/quick/doc/snippets/imgprovider/imageprovider-example.qml create mode 100644 src/quick/doc/snippets/imgprovider/imageprovider.cpp create mode 100644 src/quick/doc/snippets/qquickview-ex.cpp 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 #include -//![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/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 +#include +#include +#include +#include +#include +#include +#include + +//![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/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/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index 2bb2af4fc0..f7c8724318 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -261,7 +261,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 @@ -272,25 +272,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: -- cgit v1.2.3 From 17ec45ad2f257dc4f1ee9cc18782f0d305b1a1d3 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 14 Jun 2018 12:04:54 +0200 Subject: Doc: Move literal codeblocks to snippet files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iff45ea6cf414717fd1cb0a194eef390a9f153838 Reviewed-by: Topi Reiniö --- src/qml/doc/snippets/code/doc_src_qtqml.cpp | 53 +++++++++++++++++++++++++ src/qml/doc/snippets/code/doc_src_qtqml.pro | 3 ++ src/qml/doc/src/qtqml-cpp.qdoc | 8 +--- src/quick/doc/snippets/code/doc_src_qtquick.cpp | 53 +++++++++++++++++++++++++ src/quick/doc/snippets/code/doc_src_qtquick.pro | 3 ++ src/quick/doc/src/qtquick-cpp.qdoc | 8 +--- 6 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 src/qml/doc/snippets/code/doc_src_qtqml.cpp create mode 100644 src/qml/doc/snippets/code/doc_src_qtqml.pro create mode 100644 src/quick/doc/snippets/code/doc_src_qtquick.cpp create mode 100644 src/quick/doc/snippets/code/doc_src_qtquick.pro 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 +//! [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/qtqml-cpp.qdoc b/src/qml/doc/src/qtqml-cpp.qdoc index 14c9a87ab4..971bb88825 100644 --- a/src/qml/doc/src/qtqml-cpp.qdoc +++ b/src/qml/doc/src/qtqml-cpp.qdoc @@ -34,16 +34,12 @@ To include the definitions of the module's classes, use the following directive: -\code -#include -\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/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 +//! [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/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 - \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. -- cgit v1.2.3 From 9999591e69a0908cd3fbe14646fb98881e32061b Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 21 Jun 2018 16:54:58 +0200 Subject: Remove dead test - compilerwarnings A follow-up of 9d078c8f147ea875e862360b0d7480201fbbcff7 in qtqa repo. Change-Id: I4b6c2923827ba8929a8f9b0919e5017122ca95fc Reviewed-by: Jarek Kobus --- tests/auto/compilerwarnings/data/test_cpp.txt | 38 --------------------------- 1 file changed, 38 deletions(-) delete mode 100644 tests/auto/compilerwarnings/data/test_cpp.txt 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 -#endif - -#ifndef Q_OS_MAC -int main(int, char **) -{ - return 0; -} -#endif -- cgit v1.2.3