From 1ea17d70dcdbece5868a2d35417e0bfc66d68739 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 1 Sep 2015 18:29:43 -0700 Subject: Fix compilation with ICC on Windows QV4::Managed is not copyable and its default constructor is deleted. However, it and classes derived from it are exported, which on Windows means the compiler will instantiate all possible functions and add to the DLL. ICC on Windows, unlike MSVC, attempts to instantiate the default constructor of the derived classes (like CallContext) and then the build fails due to the deleted Managed() constructor. Instead, use V4_MANAGED to mark each and every managed class as non- default-constructible and non-copyable. Only one note: the V4_MANAGED macro in QV4::Managed itself takes different parameters, so it needs to be slightly different. Task-number: QTBUG-48063 Change-Id: I42e7ef1a481840699a8dffff140007c65a7a35db Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4managed_p.h | 10 ++++++++-- src/qml/jsruntime/qv4object_p.h | 3 +++ src/qml/qml/qqmlxmlhttprequest.cpp | 4 ---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index 0fe5c7ee49..aa3e668eef 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -60,7 +60,7 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {} #define V4_NEEDS_DESTROY static void destroy(QV4::Heap::Base *b) { static_cast(b)->~Data(); } -#define V4_MANAGED(DataClass, superClass) \ +#define V4_MANAGED_ITSELF(DataClass, superClass) \ public: \ Q_MANAGED_CHECK \ typedef QV4::Heap::DataClass Data; \ @@ -70,6 +70,12 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {} V4_MANAGED_SIZE_TEST \ QV4::Heap::DataClass *d() const { return static_cast(m); } +#define V4_MANAGED(DataClass, superClass) \ + private: \ + DataClass() Q_DECL_EQ_DELETE; \ + Q_DISABLE_COPY(DataClass) \ + V4_MANAGED_ITSELF(DataClass, superClass) + #define Q_MANAGED_TYPE(type) \ public: \ enum { MyType = Type_##type }; @@ -125,7 +131,7 @@ const QV4::ManagedVTable classname::static_vtbl = DEFINE_MANAGED_VTABLE_INT(clas struct Q_QML_PRIVATE_EXPORT Managed : Value { - V4_MANAGED(Base, Managed) + V4_MANAGED_ITSELF(Base, Managed) enum { IsExecutionContext = false, IsString = false, diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 71a997e133..e2250b9f18 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -72,6 +72,9 @@ struct Object : Base { Data *d() const { return static_cast(m); } #define V4_OBJECT2(DataClass, superClass) \ + private: \ + DataClass() Q_DECL_EQ_DELETE; \ + Q_DISABLE_COPY(DataClass) \ public: \ Q_MANAGED_CHECK \ typedef QV4::Heap::DataClass Data; \ diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 2a3ede6a22..5586bdbb50 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -324,10 +324,6 @@ struct Node : public Object static ReturnedValue create(ExecutionEngine *v4, NodeImpl *); bool isNull() const; - -private: - Node &operator=(const Node &); - Node(const Node &o); }; Heap::Node::Node(ExecutionEngine *engine, NodeImpl *data) -- cgit v1.2.3 From ca72f33db334a19dc103c8aa534149138c77334b Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 3 Sep 2015 16:23:05 +0200 Subject: Doc: corrected broken links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-43810 Change-Id: Ib47749f95c9ce9db7f2b97726c13ccb9550981e4 Reviewed-by: Topi Reiniö --- src/qml/doc/src/qtqml.qdoc | 2 -- src/qml/types/qqmlitemselectionmodel.qdoc | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index 64d6bb9ac4..d4562bf543 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -140,8 +140,6 @@ Further information for writing QML applications: - essential information for application development with QML and Qt Quick \li \l{Qt Quick} - a module which provides a set of QML types and C++ classes for building user interfaces and applications with QML -\li \l{Qt QML Release Notes} - list of changes and - additions in the Qt QML module \endlist \section2 Reference diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc index 185ffb5fa4..02919b388e 100644 --- a/src/qml/types/qqmlitemselectionmodel.qdoc +++ b/src/qml/types/qqmlitemselectionmodel.qdoc @@ -38,7 +38,7 @@ This page only enumerates the properties, methods, and signals available in QML. See \l QItemSelectionModel for the actual documentation of this class. - \sa ItemModels + \sa QItemSelectionModel, {Models and Views in Qt Quick} */ -- cgit v1.2.3 From 67fa94aee26a01a81f47ad3e2876f345b10aca44 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 26 Aug 2015 12:08:35 +0200 Subject: QQuickScreen: Use QPointer to guard QScreen reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't get any notification when the QScreen object is deleted, so the only thing we can do is guard it with a QPointer as it's done in QWindowPrivate. Change-Id: Icf0ba036ec27e70694807f3e66c744910a783185 Reviewed-by: Morten Johan Sørvig --- src/quick/items/qquickscreen_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h index 3d0f00b22c..266f7bfed8 100644 --- a/src/quick/items/qquickscreen_p.h +++ b/src/quick/items/qquickscreen_p.h @@ -102,7 +102,7 @@ protected Q_SLOTS: void screenChanged(QScreen*); private: - QScreen* m_screen; + QPointer m_screen; QQuickWindow* m_window; QQuickItem* m_attachee; Qt::ScreenOrientations m_updateMask; -- cgit v1.2.3 From 81dad6eb2b58314c10af2ba40abceab974c7e80f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 9 Sep 2015 14:57:54 +0200 Subject: Document that modifying the globalObject of QQmlEngine is not supported Change-Id: I62feb04ae26b6988c6e392b27bd1c3b7f630fd57 Task-number: QTBUG-48175 Reviewed-by: Simon Hausmann --- src/qml/doc/src/javascript/qmlglobalobject.qdoc | 4 +++- src/qml/qml/qqmlengine.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qml/doc/src/javascript/qmlglobalobject.qdoc b/src/qml/doc/src/javascript/qmlglobalobject.qdoc index e37b35451c..57259ec27d 100644 --- a/src/qml/doc/src/javascript/qmlglobalobject.qdoc +++ b/src/qml/doc/src/javascript/qmlglobalobject.qdoc @@ -45,7 +45,9 @@ additional imports: \li \l{XMLHttpRequest}, DOMException: These objects implement a subset of the \l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}. \endlist - +\note The \l {QJSEngine::}{globalObject()} function cannot be used to modify +the global object of a \l QQmlEngine by setting properties on it +(via \l {QJSValue::}{setProperty()}). \keyword XMLHttpRequest \section1 XMLHttpRequest diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index ffc890a2cf..729bf8e03b 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -912,7 +912,7 @@ QQuickWorkerScriptEngine *QQmlEnginePrivate::getWorkerScriptEngine() Note that the \l {Qt Quick 1} version is called QDeclarativeEngine. - \sa QQmlComponent, QQmlContext + \sa QQmlComponent, QQmlContext, {QML Global Object} */ /*! -- cgit v1.2.3 From 1aa18624f92f1ec7f2f5715653732515fddcbb9e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 10 Sep 2015 14:38:48 +0200 Subject: Qt QML documentation: fix link that should be in list Change-Id: Ied44c63fab703db5188ec8f829363a4999f85560 Reviewed-by: Venugopal Shivashankar --- src/qml/doc/src/qtqml.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index d4562bf543..33bb0c0750 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -106,8 +106,8 @@ JavaScript expressions allow QML code to contain application logic. Qt QML provides the framework for running JavaScript expressions in QML and from C++. These sections are from \l{The QML Reference}. -\l{qtqml-javascript-topic.html}{Integrating QML and JavaScript} \list + \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript} \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML} \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript} \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML} -- cgit v1.2.3 From af0a53d89835baa86698b40ac845024ee49e71b1 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 9 Sep 2015 11:16:31 +0200 Subject: Make Image::layer::enabled work as expected. Change-Id: I0021ab5d3f51e47725cc0462ff74b6562d39c95b Task-number: QTBUG-48113 Reviewed-by: Michael Brasser --- src/quick/items/qquickimage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index 3ba09f9cea..483d86c97d 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -551,6 +551,13 @@ QSGTextureProvider *QQuickImage::textureProvider() const { Q_D(const QQuickImage); + // When Item::layer::enabled == true, QQuickItem will be a texture + // provider. In this case we should prefer to return the layer rather + // than the image itself. The layer will include any children and any + // the image's wrap and fill mode. + if (QQuickItem::isTextureProvider()) + return QQuickItem::textureProvider(); + if (!d->window || !d->sceneGraphRenderContext() || QThread::currentThread() != d->sceneGraphRenderContext()->thread()) { qWarning("QQuickImage::textureProvider: can only be queried on the rendering thread of an exposed window"); return 0; -- cgit v1.2.3 From 8feca74deda0abca0bc1787e18d227c2a3d578e7 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 9 Sep 2015 11:22:37 +0200 Subject: Include doc note about Image::fillMode being excluded by shader. Change-Id: I8731ea81421e8f6cea7d59bea82030d0855b0054 Task-number: QTBUG-48113 Reviewed-by: Michael Brasser --- src/quick/items/qquickshadereffect.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp index 0be305b693..349207f145 100644 --- a/src/quick/items/qquickshadereffect.cpp +++ b/src/quick/items/qquickshadereffect.cpp @@ -578,8 +578,12 @@ void QQuickShaderEffectCommon::propertyChanged(QQuickItem *item, int mappedId, \li QTransform -> mat3 \li QMatrix4x4 -> mat4 \li QQuaternion -> vec4, scalar value is \c w. - \li \l Image, \l ShaderEffectSource -> sampler2D - Origin is in the top-left - corner, and the color values are premultiplied. + \li \l Image -> sampler2D - Origin is in the top-left corner, and the + color values are premultiplied. The texture is provided as is, + excluding the Image item's fillMode. To include fillMode, use a + ShaderEffectSource or Image::layer::enabled. + \li \l ShaderEffectSource -> sampler2D - Origin is in the top-left + corner, and the color values are premultiplied. \endlist The QML scene graph back-end may choose to allocate textures in texture -- cgit v1.2.3 From 001c47e75779b9b55adebdfc293c232d757d4a8e Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 9 Sep 2015 11:23:37 +0200 Subject: Make Canvas::layer::enabled work Change-Id: I3e159ea6d02f415307db6d45470665085aaa023e Reviewed-by: Michael Brasser --- src/quick/items/context2d/qquickcanvasitem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 75507c68d2..6ef2d6123b 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -783,6 +783,12 @@ bool QQuickCanvasItem::isTextureProvider() const QSGTextureProvider *QQuickCanvasItem::textureProvider() const { + // When Item::layer::enabled == true, QQuickItem will be a texture + // provider. In this case we should prefer to return the layer rather + // than the canvas itself. + if (QQuickItem::isTextureProvider()) + return QQuickItem::textureProvider(); + Q_D(const QQuickCanvasItem); QQuickWindow *w = window(); if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) { -- cgit v1.2.3 From 219c80b3297ba5f5851152d2414d64b3b4e49676 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 9 Sep 2015 11:23:53 +0200 Subject: Make QQuickFramebufferObject::layer::enabled work Change-Id: I95c88fa9b2dbb4f482286e4a22b608fbc450fb2b Reviewed-by: Michael Brasser --- src/quick/items/qquickframebufferobject.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp index 6031315b90..4638bbbdf3 100644 --- a/src/quick/items/qquickframebufferobject.cpp +++ b/src/quick/items/qquickframebufferobject.cpp @@ -311,6 +311,12 @@ bool QQuickFramebufferObject::isTextureProvider() const */ QSGTextureProvider *QQuickFramebufferObject::textureProvider() const { + // When Item::layer::enabled == true, QQuickItem will be a texture + // provider. In this case we should prefer to return the layer rather + // than the fbo texture. + if (QQuickItem::isTextureProvider()) + return QQuickItem::textureProvider(); + Q_D(const QQuickFramebufferObject); QQuickWindow *w = window(); if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) { -- cgit v1.2.3 From 171f8fd1e3c4fb9944f3ecae7b3faaa0431e538a Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 10 Sep 2015 14:28:21 +0200 Subject: Link to JavaScript Environment Restrictions doc from Global Object docs I added the note to the global object documentation in 81dad6e, but I wasn't aware that a more detailed section existed elsewhere. Change-Id: I2b8c1c6ade0d9f27d489a246839ade89ee868a28 Reviewed-by: Venugopal Shivashankar --- src/qml/doc/src/javascript/qmlglobalobject.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/doc/src/javascript/qmlglobalobject.qdoc b/src/qml/doc/src/javascript/qmlglobalobject.qdoc index 57259ec27d..50374f4583 100644 --- a/src/qml/doc/src/javascript/qmlglobalobject.qdoc +++ b/src/qml/doc/src/javascript/qmlglobalobject.qdoc @@ -46,8 +46,8 @@ additional imports: \endlist \note The \l {QJSEngine::}{globalObject()} function cannot be used to modify -the global object of a \l QQmlEngine by setting properties on it -(via \l {QJSValue::}{setProperty()}). +the global object of a \l QQmlEngine. For more information about this, see +\l {JavaScript Environment Restrictions}. \keyword XMLHttpRequest \section1 XMLHttpRequest -- cgit v1.2.3 From f6531304db9267dcaa3b7897642aeadda5692100 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Sun, 13 Sep 2015 17:03:48 +0200 Subject: Fix QQmlComponent::beginCreate documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4ef2cfc83d308a017ef4a98eac94aac52c49d117 Reviewed-by: Topi Reiniö --- src/qml/qml/qqmlcomponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 9210610cec..669ed2337a 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -794,8 +794,8 @@ QObject *QQmlComponent::create(QQmlContext *context) /*! This method provides advanced control over component instance creation. - In general, programmers should use QQmlComponent::create() to create a - component. + In general, programmers should use QQmlComponent::create() to create object + instances. Create an object instance from this component. Returns 0 if creation failed. \a publicContext specifies the context within which to create the object -- cgit v1.2.3 From 28fd662272561b42ce5e479d214f09705a5bf55c Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 27 Apr 2015 21:17:40 +0200 Subject: Revert "Avoid calling potentially pure virtual method" This reverts commit 2d34ed2e655d79bed95859f1d32c2abfacbfb6f1. This change was only needed in Qt 5.4 Change-Id: Ica636da9a3deba68abbfda12e5ea72b296d9ad64 Reviewed-by: Dmitry Shachnev Reviewed-by: Alan Alpert --- src/quick/items/qquickscreen.cpp | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp index 3bf7229b33..5bd6430f2d 100644 --- a/src/quick/items/qquickscreen.cpp +++ b/src/quick/items/qquickscreen.cpp @@ -351,15 +351,24 @@ void QQuickScreenAttached::screenChanged(QScreen *screen) emit orientationUpdateMaskChanged(); } - emit widthChanged(); - emit heightChanged(); - emit nameChanged(); - emit orientationChanged(); - emit primaryOrientationChanged(); - emit desktopGeometryChanged(); - emit logicalPixelDensityChanged(); - emit pixelDensityChanged(); - emit devicePixelRatioChanged(); + if (!oldScreen || screen->size() != oldScreen->size()) { + emit widthChanged(); + emit heightChanged(); + } + if (!oldScreen || screen->name() != oldScreen->name()) + emit nameChanged(); + if (!oldScreen || screen->orientation() != oldScreen->orientation()) + emit orientationChanged(); + if (!oldScreen || screen->primaryOrientation() != oldScreen->primaryOrientation()) + emit primaryOrientationChanged(); + if (!oldScreen || screen->availableVirtualGeometry() != oldScreen->availableVirtualGeometry()) + emit desktopGeometryChanged(); + if (!oldScreen || screen->logicalDotsPerInch() != oldScreen->logicalDotsPerInch()) + emit logicalPixelDensityChanged(); + if (!oldScreen || screen->physicalDotsPerInch() != oldScreen->physicalDotsPerInch()) + emit pixelDensityChanged(); + if (!oldScreen || screen->devicePixelRatio() != oldScreen->devicePixelRatio()) + emit devicePixelRatioChanged(); connect(screen, SIGNAL(geometryChanged(QRect)), this, SIGNAL(widthChanged())); -- cgit v1.2.3 From 7c74c443362dd62f41b01b5e6eae705b93685935 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 18 Sep 2015 21:03:54 +0200 Subject: Fix grammar in Performance docs Change-Id: I3e012d1124973d9f33123f6b68acfeffeeedb018 Reviewed-by: Gunnar Sletta --- src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc index 8ef77dac4c..287bdc892e 100644 --- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc +++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc @@ -762,7 +762,7 @@ with multiple windows. faster to process in the renderer and faster to draw on the GPU. For instance, PNG files will often have an alpha channel, even though each pixel is fully opaque. JPG files are always opaque. When - providing images to an QQuickImageProvider or creating images with + providing images to a QQuickImageProvider or creating images with QQuickWindow::createTextureFromImage(), let the image have QImage::Format_RGB32, when possible. -- cgit v1.2.3 From 071b265e12a4996fcbbfc5874094256b094e44a2 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Mon, 21 Sep 2015 11:45:14 +0200 Subject: Fix compilation of QtDeclarative with QT_NO_GESTURES Allow to compile QtDeclarative module with QT_NO_GESTURES define enabled. Change-Id: I5335f97c675d75c71c81edcc8307338ed3571663 Reviewed-by: Alan Alpert --- src/quick/items/qquickitem.cpp | 2 ++ src/quick/items/qquickpincharea.cpp | 2 +- src/quick/items/qquickwindow.cpp | 4 ++++ src/quick/items/qquickwindow_p.h | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 5fd1882216..ac3f8b2433 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7310,9 +7310,11 @@ bool QQuickItem::event(QEvent *ev) dropEvent(static_cast(ev)); break; #endif // QT_NO_DRAGANDDROP +#ifndef QT_NO_GESTURES case QEvent::NativeGesture: ev->ignore(); break; +#endif // QT_NO_GESTURES default: return QObject::event(ev); } diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp index 07bf268309..f419d570f3 100644 --- a/src/quick/items/qquickpincharea.cpp +++ b/src/quick/items/qquickpincharea.cpp @@ -765,11 +765,11 @@ bool QQuickPinchArea::event(QEvent *event) d->pinchRotation = angle; updatePinchTarget(); } break; -#endif // QT_NO_GESTURES default: return QQuickItem::event(event); } } break; +#endif // QT_NO_GESTURES case QEvent::Wheel: event->ignore(); return false; diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 5958edf29f..76daa44225 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1400,9 +1400,11 @@ bool QQuickWindow::event(QEvent *e) d->windowManager->handleUpdateRequest(this); break; } +#ifndef QT_NO_GESTURES case QEvent::NativeGesture: d->deliverNativeGestureEvent(d->contentItem, static_cast(e)); break; +#endif default: break; } @@ -1779,6 +1781,7 @@ void QQuickWindow::wheelEvent(QWheelEvent *event) } #endif // QT_NO_WHEELEVENT +#ifndef QT_NO_GESTURES bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGestureEvent *event) { QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); @@ -1810,6 +1813,7 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes return false; } +#endif // QT_NO_GESTURES bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) { diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index 605a36fb1d..b63143178b 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -145,7 +145,9 @@ public: #ifndef QT_NO_WHEELEVENT bool deliverWheelEvent(QQuickItem *, QWheelEvent *); #endif +#ifndef QT_NO_GESTURES bool deliverNativeGestureEvent(QQuickItem *, QNativeGestureEvent *); +#endif bool deliverTouchPoints(QQuickItem *, QTouchEvent *, const QList &, QSet *, QHash > *, QSet *filtered); void deliverTouchEvent(QTouchEvent *); -- cgit v1.2.3 From c63e7d36d43ffaba811971087bce1595a4aa9535 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 21 Sep 2015 15:14:13 +0200 Subject: Fix ViewTransition property type in documentation They were all documented as being lists. Change-Id: I95b843ed75dd922d9a3d8824e666a344688091c9 Reviewed-by: Venugopal Shivashankar --- src/quick/items/qquickitemviewtransition.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/quick/items/qquickitemviewtransition.cpp b/src/quick/items/qquickitemviewtransition.cpp index 7fa6cdc161..3218e3847c 100644 --- a/src/quick/items/qquickitemviewtransition.cpp +++ b/src/quick/items/qquickitemviewtransition.cpp @@ -850,7 +850,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) */ /*! - \qmlattachedproperty list QtQuick::ViewTransition::index + \qmlattachedproperty int QtQuick::ViewTransition::index This attached property holds the index of the item that is being transitioned. @@ -860,7 +860,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) */ /*! - \qmlattachedproperty list QtQuick::ViewTransition::item + \qmlattachedproperty item QtQuick::ViewTransition::item This attached property holds the item that is being transitioned. @@ -869,7 +869,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) */ /*! - \qmlattachedproperty list QtQuick::ViewTransition::destination + \qmlattachedproperty point QtQuick::ViewTransition::destination This attached property holds the final destination position for the transitioned item within the view. -- cgit v1.2.3 From b07d3823a9a688f7ff1142c4f94884975afb6fc7 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 22 Sep 2015 13:03:22 +0200 Subject: Don't try to render directly without context in showEvent Partially reverting db525935ccd64d2c5c674f8a66dbe7096d754e9f Task-number: QTCREATORBUG-15040 Change-Id: I6ced42a3d00bb1c419b2b0d4729bc4f5f3cf8bc7 Reviewed-by: Gunnar Sletta Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index a848774ae9..e62cea514c 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1072,7 +1072,10 @@ void QQuickWidget::showEvent(QShowEvent *) Q_D(QQuickWidget); d->updatePending = false; d->createContext(); - d->render(true); + if (d->offscreenWindow->openglContext()) + d->render(true); + else + triggerUpdate(); } /*! \reimp */ -- cgit v1.2.3 From 2cc7621c4b22d7356b60a06038e7bc6b7b13718e Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 22 Sep 2015 18:03:18 +0200 Subject: Assert that context exists in QQuickWidgetPrivate::render Task-number: QTCREATORBUG-15040 Change-Id: I401aec030840175efda2e2f0ec60569ce9c46b02 Reviewed-by: Gunnar Sletta --- src/quickwidgets/qquickwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index e62cea514c..ef36bf51af 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -202,6 +202,8 @@ void QQuickWidgetPrivate::itemGeometryChanged(QQuickItem *resizeItem, const QRec void QQuickWidgetPrivate::render(bool needsSync) { + Q_ASSERT(context); + if (!context->makeCurrent(offscreenSurface)) { qWarning("QQuickWidget: Cannot render due to failing makeCurrent()"); return; -- cgit v1.2.3 From 9794e7d66c30f012a19ec9530d719293b7c5bc7c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 23 Sep 2015 10:03:21 +0200 Subject: Link to Item Layers documentation from each property of layer The layer properties desperately lack code snippets, but the Item Layers section has some, so link to that. Change-Id: I3172102b5a1f95bfc495242a16141f030db0dd3c Reviewed-by: Gunnar Sletta --- src/quick/items/qquickitem.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index ac3f8b2433..1b728584b4 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7426,6 +7426,8 @@ QQuickItemLayer::~QQuickItemLayer() None of the other layer properties have any effect when the layer is disabled. + + \sa {Item Layers} */ void QQuickItemLayer::setEnabled(bool e) { @@ -7549,7 +7551,7 @@ void QQuickItemLayer::deactivateEffect() The effect is typically a \l ShaderEffect component, although any \l Item component can be assigned. The effect should have a source texture property with a name matching \l layer.samplerName. - \sa layer.samplerName + \sa layer.samplerName, {Item Layers} */ void QQuickItemLayer::setEffect(QQmlComponent *component) @@ -7589,6 +7591,8 @@ void QQuickItemLayer::setEffect(QQmlComponent *component) \note Some OpenGL ES 2 implementations do not support mipmapping of non-power-of-two textures. + + \sa {Item Layers} */ void QQuickItemLayer::setMipmap(bool mipmap) @@ -7622,6 +7626,7 @@ void QQuickItemLayer::setMipmap(bool mipmap) be used with caution, as support for these formats in the underlying hardare and driver is often not present. + \sa {Item Layers} */ void QQuickItemLayer::setFormat(QQuickShaderEffectSource::Format f) @@ -7644,6 +7649,8 @@ void QQuickItemLayer::setFormat(QQuickShaderEffectSource::Format f) rendered into the texture. The source rectangle can be larger than the item itself. If the rectangle is null, which is the default, then the whole item is rendered to the texture. + + \sa {Item Layers} */ void QQuickItemLayer::setSourceRect(const QRectF &sourceRect) @@ -7662,6 +7669,8 @@ void QQuickItemLayer::setSourceRect(const QRectF &sourceRect) \qmlproperty bool QtQuick::Item::layer.smooth Holds whether the layer is smoothly transformed. + + \sa {Item Layers} */ void QQuickItemLayer::setSmooth(bool s) @@ -7685,6 +7694,8 @@ void QQuickItemLayer::setSmooth(bool s) \note Some platforms have a limit on how small framebuffer objects can be, which means the actual texture size might be larger than the requested size. + + \sa {Item Layers} */ void QQuickItemLayer::setSize(const QSize &size) @@ -7715,6 +7726,8 @@ void QQuickItemLayer::setSize(const QSize &size) \note Some OpenGL ES 2 implementations do not support the GL_REPEAT wrap mode with non-power-of-two textures. + + \sa {Item Layers} */ void QQuickItemLayer::setWrapMode(QQuickShaderEffectSource::WrapMode mode) @@ -7737,7 +7750,7 @@ void QQuickItemLayer::setWrapMode(QQuickShaderEffectSource::WrapMode mode) This value must match the name of the effect's source texture property so that the Item can pass the layer's offscreen surface to the effect correctly. - \sa layer.effect, ShaderEffect + \sa layer.effect, ShaderEffect, {Item Layers} */ void QQuickItemLayer::setName(const QByteArray &name) { -- cgit v1.2.3 From 5f23d4eb103baa21225adb4c3dd666dbefef6515 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 24 Sep 2015 10:05:37 +0200 Subject: Image: fix crash when switching between multiple screens When moving a Qt Quick application containing Image delegates in a view (e.g. ListView, GridView, etc.) between multiple screens, it's possible that the amount of visible delegates changes due to potential differences in the screens' sizes. For example, moving an application using the Window + left/right arrow keys on Windows causes the window to snap to the side of the screen. If one screen is smaller than the other, moving the application back and forth in this manner will cause some delegates to be destroyed, as they are no longer visible in the smaller screen. However, between receiving the Component.destruction signal in QML and being actually destroyed in C++, the Images may try to reload their pixmaps (when the cache property is set to false, for example). Since the views had (correctly) already hidden those delegates and hence they had no associated QQmlEngine, the load() function would crash because of the assumption that there was a valid engine. This patch checks that there is a valid QQmlEngine with which to load pixmaps before doing so. Change-Id: I8a3f0ec5220fddfd79758985c1eb2b55b0baae47 Task-number: QTBUG-45991 Reviewed-by: Gunnar Sletta Reviewed-by: Simon Hausmann --- src/quick/items/qquickimagebase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index 223cb8f46f..72325243df 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -308,7 +308,7 @@ void QQuickImageBase::itemChange(ItemChange change, const ItemChangeData &value) void QQuickImageBase::handleScreenChanged(QScreen* screen) { // Screen DPI might have changed, reload images on screen change. - if (screen && isComponentComplete()) + if (qmlEngine(this) && screen && isComponentComplete()) load(); } -- cgit v1.2.3 From 0220163ca27c3f97e623591a231473c42b907012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Tue, 23 Jun 2015 10:28:54 +0200 Subject: Cleanup fontloader cache when QGuiApplication is destroyed If this cache is used for a second instance of QGuiApplication then the cache is invalid. Change-Id: I02ca16dc03a1239b0ed50c7bcfbf87880ca8d948 Task-number: QTBUG-40861 Reviewed-by: Tim Blechmann Reviewed-by: Laszlo Agocs --- src/quick/util/qquickfontloader.cpp | 58 ++++++++++++++--- .../quick/qquickfontloader_static/data/font.ttf | Bin 0 -> 51984 bytes .../qquickfontloader_static.pro | 12 ++++ .../tst_qquickfontloader_static.cpp | 69 +++++++++++++++++++++ tests/auto/quick/quick.pro | 1 + 5 files changed, 132 insertions(+), 8 deletions(-) create mode 100644 tests/auto/quick/qquickfontloader_static/data/font.ttf create mode 100644 tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro create mode 100644 tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp diff --git a/src/quick/util/qquickfontloader.cpp b/src/quick/util/qquickfontloader.cpp index 67df47fb37..496acaa8e3 100644 --- a/src/quick/util/qquickfontloader.cpp +++ b/src/quick/util/qquickfontloader.cpp @@ -47,6 +47,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE #define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 @@ -132,10 +134,50 @@ public: QUrl url; QString name; QQuickFontLoader::Status status; - static QHash fonts; }; -QHash QQuickFontLoaderPrivate::fonts; +static void q_QFontLoaderFontsStaticReset(); +static void q_QFontLoaderFontsAddReset() +{ + qAddPostRoutine(q_QFontLoaderFontsStaticReset); +} +class QFontLoaderFonts +{ +public: + QFontLoaderFonts() + { + qAddPostRoutine(q_QFontLoaderFontsStaticReset); + qAddPreRoutine(q_QFontLoaderFontsAddReset); + } + + ~QFontLoaderFonts() + { + qRemovePostRoutine(q_QFontLoaderFontsStaticReset); + reset(); + } + + + void reset() + { + QVector deleted; + QHash::iterator it; + for (it = map.begin(); it != map.end(); ++it) { + if (!deleted.contains(it.value())) { + deleted.append(it.value()); + delete it.value(); + } + } + map.clear(); + } + + QHash map; +}; +Q_GLOBAL_STATIC(QFontLoaderFonts, fontLoaderFonts); + +static void q_QFontLoaderFontsStaticReset() +{ + fontLoaderFonts()->reset(); +} /*! \qmltype FontLoader @@ -193,29 +235,29 @@ void QQuickFontLoader::setSource(const QUrl &url) QString localFile = QQmlFile::urlToLocalFileOrQrc(d->url); if (!localFile.isEmpty()) { - if (!d->fonts.contains(d->url)) { + if (!fontLoaderFonts()->map.contains(d->url)) { int id = QFontDatabase::addApplicationFont(localFile); if (id != -1) { updateFontInfo(QFontDatabase::applicationFontFamilies(id).at(0), Ready); QQuickFontObject *fo = new QQuickFontObject(id); - d->fonts[d->url] = fo; + fontLoaderFonts()->map[d->url] = fo; } else { updateFontInfo(QString(), Error); } } else { - updateFontInfo(QFontDatabase::applicationFontFamilies(d->fonts[d->url]->id).at(0), Ready); + updateFontInfo(QFontDatabase::applicationFontFamilies(fontLoaderFonts()->map[d->url]->id).at(0), Ready); } } else { - if (!d->fonts.contains(d->url)) { + if (!fontLoaderFonts()->map.contains(d->url)) { QQuickFontObject *fo = new QQuickFontObject; - d->fonts[d->url] = fo; + fontLoaderFonts()->map[d->url] = fo; fo->download(d->url, qmlEngine(this)->networkAccessManager()); d->status = Loading; emit statusChanged(); QObject::connect(fo, SIGNAL(fontDownloaded(QString,QQuickFontLoader::Status)), this, SLOT(updateFontInfo(QString,QQuickFontLoader::Status))); } else { - QQuickFontObject *fo = d->fonts[d->url]; + QQuickFontObject *fo = fontLoaderFonts()->map[d->url]; if (fo->id == -1) { d->status = Loading; emit statusChanged(); diff --git a/tests/auto/quick/qquickfontloader_static/data/font.ttf b/tests/auto/quick/qquickfontloader_static/data/font.ttf new file mode 100644 index 0000000000..aae50d5035 Binary files /dev/null and b/tests/auto/quick/qquickfontloader_static/data/font.ttf differ diff --git a/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro new file mode 100644 index 0000000000..f6835c05c0 --- /dev/null +++ b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro @@ -0,0 +1,12 @@ +CONFIG += testcase +TARGET = tst_qquickfontloader_static +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickfontloader_static.cpp + +include (../../shared/util.pri) + +TESTDATA = data/* + +QT += core-private gui-private qml-private quick-private network testlib +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp new file mode 100644 index 0000000000..f7f00172ba --- /dev/null +++ b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include "../../shared/util.h" +#include + +QByteArray qmltemplate("import QtQuick 2.0\n" +"\n" +"Rectangle {\n" +" width: 400\n" +" height: 400\n" +" color: \"red\"\n" +" FontLoader { id: fixedFont; source: \"%1\" }\n" +" Text {\n" +" text: \"hello world\"\n" +" anchors.centerIn: parent\n" +" font.family: fixedFont.name\n" +" }\n" +"}\n"); + +int main(int argc, char **argv) +{ + for (int i = 0; i < 3; i++) { + QGuiApplication app(argc, argv); + QQmlDataTest dataTest; + dataTest.initTestCase(); + QQuickView window; + QQmlComponent component (window.engine()); + QUrl current = QUrl::fromLocalFile(""); + qmltemplate.replace("%1", dataTest.testFileUrl("font.ttf").toString().toLocal8Bit()); + component.setData(qmltemplate, current); + window.setContent(current, &component, component.create()); + window.show(); + QTest::qWaitForWindowActive(&window); + } +} diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index 5593fd94f6..f25a28d45b 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -18,6 +18,7 @@ PRIVATETESTS += \ qquickapplication \ qquickbehaviors \ qquickfontloader \ + qquickfontloader_static \ qquickfontmetrics \ qquickimageprovider \ qquickpath \ -- cgit v1.2.3 From 9d58167d352b2f860f473fd74b63541d7659b811 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 10 Sep 2015 09:11:13 +0200 Subject: Add extension API to QJSEngine This allows users in a JavaScript-only environment to install extensions including: - Translation functions (qsTr(), etc.) - The console object (console.log(), print(), etc.) - Garbage collection functions (gc()) This deprecates installTranslatorFunctions(). This API results in less clutter in the API, as we'd otherwise need to have several functions for each type of extension. [ChangeLog][QJSEngine] Introduced an extension API that allows installing various function and object extensions (qsTr(), console.log(), etc.) to QJSEngine. [ChangeLog][QJSEngine] installTranslatorFunctions() was deprecated in favor of the new extension API (see installExtensions()). Change-Id: I4d6eb2097c3eda6810e967b2e8f6441c28c91a16 Task-number: QTBUG-40772 Reviewed-by: Simon Hausmann --- src/qml/jsapi/qjsengine.cpp | 121 +++++++++++++++++++++++++---- src/qml/jsapi/qjsengine.h | 16 +++- src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 60 ++++++++------ src/qml/qml/v8/qqmlbuiltinfunctions_p.h | 3 +- src/qml/qml/v8/qv8engine.cpp | 5 +- tests/auto/qml/qjsengine/tst_qjsengine.cpp | 119 +++++++++++++++++++++++++++- 6 files changed, 281 insertions(+), 43 deletions(-) diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index b217d3fb4c..5ccbccebad 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -160,8 +160,82 @@ Q_DECLARE_METATYPE(QList) \snippet code/src_script_qjsengine.cpp 5 - \sa QJSValue, {Making Applications Scriptable} + \section1 Extensions + QJSEngine provides a compliant ECMAScript implementation. By default, + familiar utilities like logging are not available, but they can can be + installed via the \l installExtensions() function. + + \sa QJSValue, {Making Applications Scriptable}, + {List of JavaScript Objects and Functions} + +*/ + +/*! + \enum QJSEngine::Extension + + This enum is used to specify extensions to be installed via + \l installExtensions(). + + \value TranslationExtension Indicates that translation functions (\c qsTr(), + for example) should be installed. + + \value ConsoleExtension Indicates that console functions (\c console.log(), + for example) should be installed. + + \value GarbageCollectionExtension Indicates that garbage collection + functions (\c gc(), for example) should be installed. + + \value AllExtensions Indicates that all extension should be installed. + + \b TranslationExtension + + The relation between script translation functions and C++ translation + functions is described in the following table: + + \table + \header \li Script Function \li Corresponding C++ Function + \row \li qsTr() \li QObject::tr() + \row \li QT_TR_NOOP() \li QT_TR_NOOP() + \row \li qsTranslate() \li QCoreApplication::translate() + \row \li QT_TRANSLATE_NOOP() \li QT_TRANSLATE_NOOP() + \row \li qsTrId() \li qtTrId() + \row \li QT_TRID_NOOP() \li QT_TRID_NOOP() + \endtable + + This flag also adds an \c arg() function to the string prototype. + + For more information, see the \l {Internationalization with Qt} + documentation. + + \b ConsoleExtension + + The \l {Console API}{console} object implements a subset of the + \l {https://developer.mozilla.org/en-US/docs/Web/API/Console}{Console API}, + which provides familiar logging functions, such as \c console.log(). + + The list of functions added is as follows: + + \list + \li \c console.assert() + \li \c console.debug() + \li \c console.exception() + \li \c console.info() + \li \c console.log() (equivalent to \c console.debug()) + \li \c console.error() + \li \c console.time() + \li \c console.timeEnd() + \li \c console.trace() + \li \c console.count() + \li \c console.warn() + \li \c {print()} (equivalent to \c console.debug()) + \endlist + + For more information, see the \l {Console API} documentation. + + \b GarbageCollectionExtension + + The \c gc() function is equivalent to calling \l collectGarbage(). */ QT_BEGIN_NAMESPACE @@ -234,8 +308,11 @@ void QJSEngine::collectGarbage() d->m_v4Engine->memoryManager->runGC(); } +#if QT_DEPRECATED_SINCE(5, 6) + /*! \since 5.4 + \obsolete Installs translator functions on the given \a object, or on the Global Object if no object is specified. @@ -258,12 +335,38 @@ void QJSEngine::collectGarbage() \sa {Internationalization with Qt} */ void QJSEngine::installTranslatorFunctions(const QJSValue &object) +{ + installExtensions(TranslationExtension, object); +} + +#endif // QT_DEPRECATED_SINCE(5, 6) + + +/*! + \since 5.6 + + Installs JavaScript \a extensions to add functionality that is not + available in a standard ECMAScript implementation. + + The extensions are installed on the given \a object, or on the + \l {globalObject()}{Global Object} if no object is specified. + + Several extensions can be installed at once by \c {OR}-ing the enum values: + + \code + installExtensions(QJSEngine::TranslationExtension | QJSEngine::ConsoleExtension); + \endcode + + \sa Extension +*/ +void QJSEngine::installExtensions(QJSEngine::Extensions extensions, const QJSValue &object) { QV4::ExecutionEngine *otherEngine = QJSValuePrivate::engine(&object); if (otherEngine && otherEngine != d->m_v4Engine) { - qWarning("QJSEngine: Trying to install a translator function from a different engine"); + qWarning("QJSEngine: Trying to install extensions from a different engine"); return; } + QV4::Scope scope(d->m_v4Engine); QV4::ScopedObject obj(scope); QV4::Value *val = QJSValuePrivate::getValue(&object); @@ -271,18 +374,8 @@ void QJSEngine::installTranslatorFunctions(const QJSValue &object) obj = val; if (!obj) obj = scope.engine->globalObject; -#ifndef QT_NO_TRANSLATION - obj->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate); - obj->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp); - obj->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr); - obj->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), QV4::GlobalExtensions::method_qsTrNoOp); - obj->defineDefaultProperty(QStringLiteral("qsTrId"), QV4::GlobalExtensions::method_qsTrId); - obj->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), QV4::GlobalExtensions::method_qsTrIdNoOp); - - // string prototype extension - scope.engine->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"), - QV4::GlobalExtensions::method_string_arg); -#endif + + QV4::GlobalExtensions::init(obj, extensions); } /*! diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h index 123eb727df..40b0a60369 100644 --- a/src/qml/jsapi/qjsengine.h +++ b/src/qml/jsapi/qjsengine.h @@ -81,7 +81,19 @@ public: void collectGarbage(); - void installTranslatorFunctions(const QJSValue &object = QJSValue()); +#if QT_DEPRECATED_SINCE(5, 6) + QT_DEPRECATED void installTranslatorFunctions(const QJSValue &object = QJSValue()); +#endif + + enum Extension { + TranslationExtension = 0x1, + ConsoleExtension = 0x2, + GarbageCollectionExtension = 0x4, + AllExtensions = 0xffffffff + }; + Q_DECLARE_FLAGS(Extensions, Extension) + + void installExtensions(Extensions extensions, const QJSValue &object = QJSValue()); QV8Engine *handle() const { return d; } @@ -102,6 +114,8 @@ private: friend class QV8Engine; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QJSEngine::Extensions) + inline bool qjsvalue_cast_helper(const QJSValue &value, int type, void *ptr) { return QJSEngine::convertV2(value, type, ptr); diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 3242833e22..5deac8343e 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1390,27 +1390,30 @@ static QV4::ReturnedValue writeToConsole(ConsoleLogTypes logType, CallContext *c result.append(jsStack(v4)); } - static QLoggingCategory loggingCategory("qml"); + static QLoggingCategory qmlLoggingCategory("qml"); + static QLoggingCategory jsLoggingCategory("js"); + + QLoggingCategory *loggingCategory = v4->qmlEngine() ? &qmlLoggingCategory : &jsLoggingCategory; QV4::StackFrame frame = v4->currentStackFrame(); const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); - QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData(), loggingCategory.categoryName()); + QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData(), loggingCategory->categoryName()); switch (logType) { case Log: - if (loggingCategory.isDebugEnabled()) + if (loggingCategory->isDebugEnabled()) logger.debug("%s", result.toUtf8().constData()); break; case Info: - if (loggingCategory.isInfoEnabled()) + if (loggingCategory->isInfoEnabled()) logger.info("%s", result.toUtf8().constData()); break; case Warn: - if (loggingCategory.isWarningEnabled()) + if (loggingCategory->isWarningEnabled()) logger.warning("%s", result.toUtf8().constData()); break; case Error: - if (loggingCategory.isCriticalEnabled()) + if (loggingCategory->isCriticalEnabled()) logger.critical("%s", result.toUtf8().constData()); break; default: @@ -1442,6 +1445,9 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx) { QV4::ExecutionEngine *v4 = ctx->d()->engine; + if (!v4->qmlEngine()) + return QV4::Encode::undefined(); // Not yet implemented for JavaScript. + QV4::StackFrame frame = v4->currentStackFrame(); const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); @@ -1461,6 +1467,9 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx) { QV4::ExecutionEngine *v4 = ctx->d()->engine; + if (!v4->qmlEngine()) + return QV4::Encode::undefined(); // Not yet implemented for JavaScript. + QV4::StackFrame frame = v4->currentStackFrame(); const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); @@ -1590,31 +1599,36 @@ QV4::ReturnedValue ConsoleObject::method_exception(CallContext *ctx) -void QV4::GlobalExtensions::init(QQmlEngine *qmlEngine, Object *globalObject) +void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions extensions) { ExecutionEngine *v4 = globalObject->engine(); Scope scope(v4); -#ifndef QT_NO_TRANSLATION - globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), method_qsTranslate); - globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), method_qsTranslateNoOp); - globalObject->defineDefaultProperty(QStringLiteral("qsTr"), method_qsTr); - globalObject->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), method_qsTrNoOp); - globalObject->defineDefaultProperty(QStringLiteral("qsTrId"), method_qsTrId); - globalObject->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), method_qsTrIdNoOp); -#endif + if (extensions.testFlag(QJSEngine::TranslationExtension)) { + #ifndef QT_NO_TRANSLATION + globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate); + globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp); + globalObject->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr); + globalObject->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), QV4::GlobalExtensions::method_qsTrNoOp); + globalObject->defineDefaultProperty(QStringLiteral("qsTrId"), QV4::GlobalExtensions::method_qsTrId); + globalObject->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), QV4::GlobalExtensions::method_qsTrIdNoOp); + + // string prototype extension + scope.engine->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"), QV4::GlobalExtensions::method_string_arg); + #endif + } - globalObject->defineDefaultProperty(QStringLiteral("print"), ConsoleObject::method_log); - globalObject->defineDefaultProperty(QStringLiteral("gc"), method_gc); + if (extensions.testFlag(QJSEngine::ConsoleExtension)) { + globalObject->defineDefaultProperty(QStringLiteral("print"), QV4::ConsoleObject::method_log); - ScopedObject console(scope, v4->memoryManager->allocObject()); - globalObject->defineDefaultProperty(QStringLiteral("console"), console); - ScopedObject qt(scope, v4->memoryManager->allocObject(qmlEngine)); - globalObject->defineDefaultProperty(QStringLiteral("Qt"), qt); + QV4::ScopedObject console(scope, globalObject->engine()->memoryManager->allocObject()); + globalObject->defineDefaultProperty(QStringLiteral("console"), console); + } - // string prototype extension - v4->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"), method_string_arg); + if (extensions.testFlag(QJSEngine::GarbageCollectionExtension)) { + globalObject->defineDefaultProperty(QStringLiteral("gc"), QV4::GlobalExtensions::method_gc); + } } diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h index bb05376fc0..d373fb6ee6 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h +++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h @@ -47,6 +47,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -142,7 +143,7 @@ struct ConsoleObject : Object }; struct GlobalExtensions { - static void init(QQmlEngine *qmlEngine, Object *globalObject); + static void init(Object *globalObject, QJSEngine::Extensions extensions); #ifndef QT_NO_TRANSLATION static ReturnedValue method_qsTranslate(CallContext *ctx); diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index effc37a0eb..dae932e705 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -174,7 +174,10 @@ const QSet &QV8Engine::illegalNames() const void QV8Engine::initializeGlobal() { QV4::Scope scope(m_v4Engine); - QV4::GlobalExtensions::init(m_engine, m_v4Engine->globalObject); + QV4::GlobalExtensions::init(m_v4Engine->globalObject, QJSEngine::AllExtensions); + + QV4::ScopedObject qt(scope, m_v4Engine->memoryManager->allocObject(m_engine)); + m_v4Engine->globalObject->defineDefaultProperty(QStringLiteral("Qt"), qt); QQmlLocale::registerStringLocaleCompare(m_v4Engine); QQmlDateExtension::registerExtension(m_v4Engine); diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 4c7dba9f90..39bc8b2e5f 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -155,7 +155,7 @@ private slots: void callConstants(); - void installTranslatorFunctions(); + void installTranslationFunctions(); void translateScript_data(); void translateScript(); void translateScript_crossScript(); @@ -172,6 +172,16 @@ private slots: void translateScriptUnicodeIdBased(); void translateFromBuiltinCallback(); + void installConsoleFunctions(); + void logging(); + void tracing(); + void asserts(); + void exceptions(); + + void installGarbageCollectionFunctions(); + + void installAllExtensions(); + void privateMethods(); void engineForObject(); @@ -1480,6 +1490,8 @@ void tst_QJSEngine::gcWithNestedDataStructure() // The GC must be able to traverse deeply nested objects, otherwise this // test would crash. QJSEngine eng; + eng.installExtensions(QJSEngine::GarbageCollectionExtension); + QJSValue ret = eng.evaluate( "function makeList(size)" "{" @@ -3171,7 +3183,7 @@ void tst_QJSEngine::callConstants() QCOMPARE(exceptionResult.toString(), QString("TypeError: true is not a function")); } -void tst_QJSEngine::installTranslatorFunctions() +void tst_QJSEngine::installTranslationFunctions() { QJSEngine eng; QJSValue global = eng.globalObject(); @@ -3182,7 +3194,7 @@ void tst_QJSEngine::installTranslatorFunctions() QVERIFY(global.property("qsTrId").isUndefined()); QVERIFY(global.property("QT_TRID_NOOP").isUndefined()); - eng.installTranslatorFunctions(); + eng.installExtensions(QJSEngine::TranslationExtension); QVERIFY(global.property("qsTranslate").isCallable()); QVERIFY(global.property("QT_TRANSLATE_NOOP").isCallable()); QVERIFY(global.property("qsTr").isCallable()); @@ -3597,6 +3609,107 @@ void tst_QJSEngine::translateFromBuiltinCallback() eng.evaluate("[10,20].forEach(foo)", "script.js"); } +void tst_QJSEngine::installConsoleFunctions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + QVERIFY(global.property("console").isUndefined()); + QVERIFY(global.property("print").isUndefined()); + + engine.installExtensions(QJSEngine::ConsoleExtension); + QVERIFY(global.property("console").isObject()); + QVERIFY(global.property("print").isCallable()); +} + +void tst_QJSEngine::logging() +{ + QLoggingCategory loggingCategory("js"); + QVERIFY(loggingCategory.isDebugEnabled()); + QVERIFY(loggingCategory.isWarningEnabled()); + QVERIFY(loggingCategory.isCriticalEnabled()); + + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtDebugMsg, "console.debug"); + engine.evaluate("console.debug('console.debug')"); + QTest::ignoreMessage(QtDebugMsg, "console.log"); + engine.evaluate("console.log('console.log')"); + QTest::ignoreMessage(QtInfoMsg, "console.info"); + engine.evaluate("console.info('console.info')"); + QTest::ignoreMessage(QtWarningMsg, "console.warn"); + engine.evaluate("console.warn('console.warn')"); + QTest::ignoreMessage(QtCriticalMsg, "console.error"); + engine.evaluate("console.error('console.error')"); + + QTest::ignoreMessage(QtDebugMsg, ": 1"); + engine.evaluate("console.count()"); + + QTest::ignoreMessage(QtDebugMsg, ": 2"); + engine.evaluate("console.count()"); +} + +void tst_QJSEngine::tracing() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtDebugMsg, "%entry (:1)"); + engine.evaluate("console.trace()"); + + QTest::ignoreMessage(QtDebugMsg, "a (:1)\nb (:1)\nc (:1)\n%entry (:1)"); + engine.evaluate("function a() { console.trace(); } function b() { a(); } function c() { b(); }"); + engine.evaluate("c()"); +} + +void tst_QJSEngine::asserts() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtCriticalMsg, "This will fail\n%entry (:1)"); + engine.evaluate("console.assert(0, 'This will fail')"); + + QTest::ignoreMessage(QtCriticalMsg, "This will fail too\n%entry (:1)"); + engine.evaluate("console.assert(1 > 2, 'This will fail too')"); +} + +void tst_QJSEngine::exceptions() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtCriticalMsg, "Exception 1\n%entry (:1)"); + engine.evaluate("console.exception('Exception 1')"); +} + +void tst_QJSEngine::installGarbageCollectionFunctions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + QVERIFY(global.property("gc").isUndefined()); + + engine.installExtensions(QJSEngine::GarbageCollectionExtension); + QVERIFY(global.property("gc").isCallable()); +} + +void tst_QJSEngine::installAllExtensions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + // Pick out a few properties from each extension and check that they're there. + QVERIFY(global.property("qsTranslate").isUndefined()); + QVERIFY(global.property("console").isUndefined()); + QVERIFY(global.property("print").isUndefined()); + QVERIFY(global.property("gc").isUndefined()); + + engine.installExtensions(QJSEngine::AllExtensions); + QVERIFY(global.property("qsTranslate").isCallable()); + QVERIFY(global.property("console").isObject()); + QVERIFY(global.property("print").isCallable()); + QVERIFY(global.property("gc").isCallable()); +} + class ObjectWithPrivateMethods : public QObject { Q_OBJECT -- cgit v1.2.3 From ad125bd18ef5c98a264b9e4fac258dd07511035d Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Fri, 7 Aug 2015 01:50:38 +0200 Subject: Disable Clang warning -Wheader-hygiene. qqmlinfo.h:51:17: warning: using namespace directive in global context in header [-Wheader-hygiene] In this case the use of the using directive is intended. See also: 0181dc283f6a783783b7e622b4e2dc241edd8a54 Change-Id: I8f94cefdab7ce70e375ad8b01f59eb0f9d840708 Reviewed-by: Kai Koehne Reviewed-by: Alan Alpert --- src/qml/qml/qqmlinfo.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/qml/qqmlinfo.h b/src/qml/qml/qqmlinfo.h index b56f74198c..90ac1dd777 100644 --- a/src/qml/qml/qqmlinfo.h +++ b/src/qml/qml/qqmlinfo.h @@ -48,7 +48,11 @@ namespace QtQml { Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error); Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList &errors); } +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wheader-hygiene") +// This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application. using namespace QtQml; +QT_WARNING_POP class QQmlInfoPrivate; class Q_QML_EXPORT QQmlInfo : public QDebug -- cgit v1.2.3 From 10a712eb980f32492c65dcb8441f6c5d29192a82 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 10 Sep 2015 14:29:28 +0200 Subject: Reimplement the right metaCall() method The goal should be to make these dynamic metaobjects independent of the concrete QObject instance. Change-Id: I13448420d15792918cc30e994a8d6d83216a0a1a Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlopenmetaobject.cpp | 10 ++++++---- src/qml/qml/qqmlopenmetaobject_p.h | 2 +- src/qml/qml/qqmlproxymetaobject.cpp | 6 ++++-- src/qml/qml/qqmlproxymetaobject_p.h | 2 +- src/qml/util/qqmladaptormodel.cpp | 5 ++++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp index 16138508dd..9188ba6174 100644 --- a/src/qml/qml/qqmlopenmetaobject.cpp +++ b/src/qml/qml/qqmlopenmetaobject.cpp @@ -261,8 +261,10 @@ void QQmlOpenMetaObject::emitPropertyNotification(const QByteArray &propertyName activate(d->object, *iter + d->type->d->signalOffset, 0); } -int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) +int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a) { + Q_ASSERT(d->object == o); + if (( c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) && id >= d->type->d->propertyOffset) { int propId = id - d->type->d->propertyOffset; @@ -276,15 +278,15 @@ int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) prop.first = propertyWriteValue(propId, *reinterpret_cast(a[0])); prop.second = true; propertyWritten(propId); - activate(d->object, d->type->d->signalOffset + propId, 0); + activate(o, d->type->d->signalOffset + propId, 0); } } return -1; } else { if (d->parent) - return d->parent->metaCall(c, id, a); + return d->parent->metaCall(o, c, id, a); else - return d->object->qt_metacall(c, id, a); + return o->qt_metacall(c, id, a); } } diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h index 75ce9addd6..99e2f79db4 100644 --- a/src/qml/qml/qqmlopenmetaobject_p.h +++ b/src/qml/qml/qqmlopenmetaobject_p.h @@ -105,7 +105,7 @@ public: void emitPropertyNotification(const QByteArray &propertyName); protected: - virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); + virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a); virtual int createProperty(const char *, const char *); virtual void propertyRead(int); diff --git a/src/qml/qml/qqmlproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp index bf735a9f0c..ba5215b831 100644 --- a/src/qml/qml/qqmlproxymetaobject.cpp +++ b/src/qml/qml/qqmlproxymetaobject.cpp @@ -59,8 +59,10 @@ QQmlProxyMetaObject::~QQmlProxyMetaObject() proxies = 0; } -int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) +int QQmlProxyMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a) { + Q_ASSERT(object == o); + if ((c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) && id >= metaObjects->last().propertyOffset) { @@ -108,7 +110,7 @@ int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) } if (parent) - return parent->metaCall(c, id, a); + return parent->metaCall(o, c, id, a); else return object->qt_metacall(c, id, a); } diff --git a/src/qml/qml/qqmlproxymetaobject_p.h b/src/qml/qml/qqmlproxymetaobject_p.h index 862b0fb7c2..6ae35fe11f 100644 --- a/src/qml/qml/qqmlproxymetaobject_p.h +++ b/src/qml/qml/qqmlproxymetaobject_p.h @@ -71,7 +71,7 @@ public: virtual ~QQmlProxyMetaObject(); protected: - virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); + virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a); private: QList *metaObjects; diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 29398ff98c..c61144dd8f 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -788,8 +788,11 @@ public: m_type->release(); } - int metaCall(QMetaObject::Call call, int id, void **arguments) + int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments) { + Q_ASSERT(o == m_data); + Q_UNUSED(o); + static const int objectPropertyOffset = QObject::staticMetaObject.propertyCount(); if (id >= m_type->propertyOffset && (call == QMetaObject::ReadProperty -- cgit v1.2.3 From f01bfcf8edf94f27c24fb3bbaf738bc6134ec4c1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 16 Sep 2015 15:30:51 +0200 Subject: Cleanups to property allocation in the VMEMO There's no need for a separate propertiesAllocated bool, we can keep that state in the WeakValue itself. Change-Id: Ife0f517bee9bc5830680eec68983767379a3c2cf Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 53 ++++++++++------------ src/qml/qml/qqmlvmemetaobject_p.h | 2 - .../auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 + 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 4b19d1af04..debc839c1f 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -63,18 +63,19 @@ QQmlVMEVariantQObjectPtr::~QQmlVMEVariantQObjectPtr() void QQmlVMEVariantQObjectPtr::objectDestroyed(QObject *) { - if (m_target && m_index >= 0) { - if (m_target->propertiesInitialized && !m_target->properties.isUndefined()) { - QV4::ExecutionEngine *v4 = m_target->cache->engine; - if (v4) { - QV4::Scope scope(v4); - QV4::Scoped sp(scope, m_target->properties.value()); + if (!m_target || QQmlData::wasDeleted(m_target->object)) + return; + + if (m_index >= 0) { + QV4::ExecutionEngine *v4 = m_target->properties.engine(); + if (v4) { + QV4::Scope scope(v4); + QV4::Scoped sp(scope, m_target->properties.value()); + if (sp) *(sp->data() + m_index) = QV4::Primitive::nullValue(); - } } - if (!QQmlData::wasDeleted(m_target->object)) - m_target->activate(m_target->object, m_target->methodOffset() + m_index, 0); + m_target->activate(m_target->object, m_target->methodOffset() + m_index, 0); } } @@ -148,10 +149,10 @@ QAbstractDynamicMetaObject *QQmlVMEMetaObject::toDynamicMetaObject(QObject *o) QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *meta, QV4::ExecutionContext *qmlBindingContext, QQmlCompiledData *compiledData) -: object(obj), - ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta), - hasAssignedMetaObjectData(false), aliasEndpoints(0), - propertiesInitialized(false), interceptors(0), methods(0) + : object(obj), + ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta), + hasAssignedMetaObjectData(false), aliasEndpoints(0), + interceptors(0), methods(0) { QObjectPrivate *op = QObjectPrivate::get(obj); @@ -215,8 +216,15 @@ QQmlVMEMetaObject::~QQmlVMEMetaObject() QV4::MemberData *QQmlVMEMetaObject::propertiesAsMemberData() { - if (!ensurePropertiesAllocated()) - return 0; + if (properties.isUndefined()) { + if (properties.valueRef()) + // in some situations, the QObject wrapper (and associated data, + // such as the varProperties array) will have been cleaned up, but the + // QObject ptr will not yet have been deleted (eg, waiting on deleteLater). + // In this situation, return 0. + return 0; + allocateProperties(); + } return static_cast(properties.asManaged()); } @@ -1050,19 +1058,6 @@ void QQmlVMEMetaObject::setVMEProperty(int index, const QV4::Value &v) return writeVarProperty(index - propOffset(), v); } -bool QQmlVMEMetaObject::ensurePropertiesAllocated() -{ - if (!propertiesInitialized) - allocateProperties(); - - // in some situations, the QObject's v8object (and associated v8 data, - // such as the varProperties array) will have been cleaned up, but the - // QObject ptr will not yet have been deleted (eg, waiting on deleteLater). - // In this situation, the varProperties handle will be (and should remain) - // empty. - return !properties.isUndefined(); -} - void QQmlVMEMetaObject::ensureQObjectWrapper() { Q_ASSERT(cache && cache->engine); @@ -1085,12 +1080,12 @@ void QQmlVMEMetaObject::mark(QV4::ExecutionEngine *e) void QQmlVMEMetaObject::allocateProperties() { Q_ASSERT(cache && cache->engine); + Q_ASSERT(!properties.valueRef()); QV4::ExecutionEngine *v4 = cache->engine; QV4::Heap::MemberData *data = QV4::MemberData::allocate(v4, metaData->propertyCount); properties.set(v4, data); for (uint i = 0; i < data->size; ++i) data->data[i] = QV4::Encode::undefined(); - propertiesInitialized = true; } bool QQmlVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index dcf95b0c69..69514d988b 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -201,9 +201,7 @@ public: QQmlVMEMetaObjectEndpoint *aliasEndpoints; QV4::WeakValue properties; - bool propertiesInitialized; inline void allocateProperties(); - inline bool ensurePropertiesAllocated(); QV4::MemberData *propertiesAsMemberData(); int readPropertyAsInt(int id); diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 8fc79719d5..87815c8821 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7119,6 +7119,7 @@ void tst_qqmlecmascript::onDestruction() QObject *obj = c.create(); QVERIFY(obj != 0); delete obj; + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } { @@ -7130,6 +7131,7 @@ void tst_qqmlecmascript::onDestruction() QQmlComponent c(&engine, testFileUrl("onDestruction.qml")); QObject *obj = c.create(); QVERIFY(obj != 0); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } } -- cgit v1.2.3 From 4ac2e518805f4458db55c1dac3a061952380cbc1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 17 Sep 2015 13:29:28 +0200 Subject: Properly refcount the property cache Change-Id: Ia37d4a5e64b653c9af614ed633c3c443190d015a Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index debc839c1f..3a89e4c43d 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -154,6 +154,8 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, hasAssignedMetaObjectData(false), aliasEndpoints(0), interceptors(0), methods(0) { + cache->addref(); + QObjectPrivate *op = QObjectPrivate::get(obj); if (op->metaObject) { @@ -212,6 +214,8 @@ QQmlVMEMetaObject::~QQmlVMEMetaObject() delete [] methods; qDeleteAll(varObjectGuards); + + cache->release(); } QV4::MemberData *QQmlVMEMetaObject::propertiesAsMemberData() -- cgit v1.2.3 From 297eb535d9b237a1db32c2bde573967fd4485aa5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 17 Sep 2015 13:31:32 +0200 Subject: Get rid of the aConnected bit array in the vmemo We can track the state just as easily by simply checking if the endpoints metaobject is already set. Change-Id: I5cea909b2525bf37d404f6d54ead2bdf9538cff4 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 26 ++++++++++++-------------- src/qml/qml/qqmlvmemetaobject_p.h | 1 - 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 3a89e4c43d..64f5bfefd7 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -168,7 +168,6 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, op->metaObject = this; QQmlData::get(obj)->hasVMEMetaObject = true; - aConnected.resize(metaData->aliasCount); int list_type = qMetaTypeId >(); int qobject_type = qMetaTypeId(); int variant_type = qMetaTypeId(); @@ -1124,22 +1123,21 @@ bool QQmlVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex, void QQmlVMEMetaObject::connectAlias(int aliasId) { - if (!aConnected.testBit(aliasId)) { + if (!aliasEndpoints) + aliasEndpoints = new QQmlVMEMetaObjectEndpoint[metaData->aliasCount]; - if (!aliasEndpoints) - aliasEndpoints = new QQmlVMEMetaObjectEndpoint[metaData->aliasCount]; + QQmlVMEMetaData::AliasData *d = metaData->aliasData() + aliasId; - aConnected.setBit(aliasId); - - QQmlVMEMetaData::AliasData *d = metaData->aliasData() + aliasId; - - QQmlVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId; - endpoint->metaObject = this; - - endpoint->connect(&ctxt->idValues[d->contextIdx].bindings); - - endpoint->tryConnect(); + QQmlVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId; + if (endpoint->metaObject.data()) { + // already connected + Q_ASSERT(endpoint->metaObject.data() == this); + return; } + + endpoint->metaObject = this; + endpoint->connect(&ctxt->idValues[d->contextIdx].bindings); + endpoint->tryConnect(); } void QQmlVMEMetaObject::connectAliasSignal(int index, bool indexInSignalRange) diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 69514d988b..a2dbd793ee 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -233,7 +233,6 @@ public: void mark(QV4::ExecutionEngine *e); void connectAlias(int aliasId); - QBitArray aConnected; QQmlPropertyValueInterceptor *interceptors; -- cgit v1.2.3 From 1e1056fbea7686d976957a838dc68636b99ecffc Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 17 Sep 2015 13:40:10 +0200 Subject: Cleanup Restructure code to make the flow more obvious and avoid executing code that is afterwards being ignored for list properties. Change-Id: I1b21562d48cec34ecb722f9012166926d55e4724 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 64f5bfefd7..294d539e92 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -612,23 +612,24 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * break; default: { - QV4::MemberData *md = propertiesAsMemberData(); - if (md) { - QV4::VariantObject *v = (md->data() + id)->as(); - if (v) - QQml_valueTypeProvider()->readValueType(v->d()->data, a[0], t); + if (t == qMetaTypeId >()) { + const int listIndex = readPropertyAsInt(id); + const List *list = &listProperties.at(listIndex); + *reinterpret_cast *>(a[0]) = + QQmlListProperty(object, const_cast(list), + list_append, list_count, list_at, + list_clear); + } else { + QV4::MemberData *md = propertiesAsMemberData(); + if (md) { + QV4::VariantObject *v = (md->data() + id)->as(); + if (v) + QQml_valueTypeProvider()->readValueType(v->d()->data, a[0], t); + } } break; } } - if (t == qMetaTypeId >()) { - const int listIndex = readPropertyAsInt(id); - const List *list = &listProperties.at(listIndex); - *reinterpret_cast *>(a[0]) = - QQmlListProperty(object, const_cast(list), - list_append, list_count, list_at, - list_clear); - } } else if (c == QMetaObject::WriteProperty) { -- cgit v1.2.3 From d0ebfd86813b99253d0ae42a417c59d795f16ac5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Sep 2015 10:01:17 +0200 Subject: Get rid of the special handling of list properties in the vmemo There's no need to store the list properties separate from other property data in the vmemo, simply wrap the list in a QVariant as we do with the other more complex types. Change-Id: I7c7946503cb603c401e11a367986c6923dffe68f Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 46 ++++++++++++++++++++++++++------------- src/qml/qml/qqmlvmemetaobject_p.h | 11 ++-------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 294d539e92..a0e1d79f93 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -168,7 +168,6 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, op->metaObject = this; QQmlData::get(obj)->hasVMEMetaObject = true; - int list_type = qMetaTypeId >(); int qobject_type = qMetaTypeId(); int variant_type = qMetaTypeId(); // Need JS wrapper to ensure properties are marked. @@ -179,11 +178,9 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, // ### Optimize for (int ii = 0; ii < metaData->propertyCount; ++ii) { int t = (metaData->propertyData() + ii)->propertyType; - if (t == list_type) { - listProperties.append(List(methodOffset() + ii, this)); - writeProperty(ii, listProperties.count() - 1); - } else if (!needsJSWrapper && (t == qobject_type || t == variant_type)) { + if (t == qobject_type || t == variant_type) { needsJSWrapper = true; + break; } } @@ -453,6 +450,22 @@ QObject* QQmlVMEMetaObject::readPropertyAsQObject(int id) return wrapper->object(); } +QList *QQmlVMEMetaObject::readPropertyAsList(int id) +{ + QV4::MemberData *md = propertiesAsMemberData(); + if (!md) + return 0; + + QV4::Scope scope(cache->engine); + QV4::Scoped v(scope, *(md->data() + id)); + if (!v || (int)v->d()->data.userType() != qMetaTypeId >()) { + QVariant variant(qVariantFromValue(QList())); + v = cache->engine->newVariantObject(variant); + *(md->data() + id) = v; + } + return static_cast *>(v->d()->data.data()); +} + QRectF QQmlVMEMetaObject::readPropertyAsRectF(int id) { QV4::MemberData *md = propertiesAsMemberData(); @@ -613,12 +626,13 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * default: { if (t == qMetaTypeId >()) { - const int listIndex = readPropertyAsInt(id); - const List *list = &listProperties.at(listIndex); - *reinterpret_cast *>(a[0]) = - QQmlListProperty(object, const_cast(list), + QList *list = readPropertyAsList(id); + QQmlListProperty *p = static_cast *>(a[0]); + *p = QQmlListProperty(object, list, list_append, list_count, list_at, list_clear); + p->dummy1 = this; + p->dummy2 = reinterpret_cast(methodOffset() + id); } else { QV4::MemberData *md = propertiesAsMemberData(); if (md) { @@ -969,26 +983,28 @@ void QQmlVMEMetaObject::listChanged(int id) void QQmlVMEMetaObject::list_append(QQmlListProperty *prop, QObject *o) { - List *list = static_cast(prop->data); + QList *list = static_cast *>(prop->data); list->append(o); - list->mo->activate(prop->object, list->notifyIndex, 0); + static_cast(prop->dummy1)->activate(prop->object, reinterpret_cast(prop->dummy2), 0); } int QQmlVMEMetaObject::list_count(QQmlListProperty *prop) { - return static_cast(prop->data)->count(); + QList *list = static_cast *>(prop->data); + return list->count(); } QObject *QQmlVMEMetaObject::list_at(QQmlListProperty *prop, int index) { - return static_cast(prop->data)->at(index); + QList *list = static_cast *>(prop->data); + return list->at(index); } void QQmlVMEMetaObject::list_clear(QQmlListProperty *prop) { - List *list = static_cast(prop->data); + QList *list = static_cast *>(prop->data); list->clear(); - list->mo->activate(prop->object, list->notifyIndex, 0); + static_cast(prop->dummy1)->activate(prop->object, reinterpret_cast(prop->dummy2), 0); } void QQmlVMEMetaObject::registerInterceptor(int index, int valueIndex, QQmlPropertyValueInterceptor *interceptor) diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index a2dbd793ee..0097f02b07 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -214,7 +214,8 @@ public: QDate readPropertyAsDate(int id); QDateTime readPropertyAsDateTime(int id); QRectF readPropertyAsRectF(int id); - QObject* readPropertyAsQObject(int id); + QObject *readPropertyAsQObject(int id); + QList *readPropertyAsList(int id); void writeProperty(int id, int v); void writeProperty(int id, bool v); @@ -249,14 +250,6 @@ public: inline QQmlVMEMetaObject *parentVMEMetaObject() const; void listChanged(int); - class List : public QList - { - public: - List(int lpi, QQmlVMEMetaObject *mo) : notifyIndex(lpi), mo(mo) {} - int notifyIndex; - QQmlVMEMetaObject *mo; - }; - QList listProperties; static void list_append(QQmlListProperty *, QObject *); static int list_count(QQmlListProperty *); -- cgit v1.2.3 From eac632c43f16d146852f00c50a203fdf5fa3a2a0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Sep 2015 12:06:00 +0200 Subject: Cleanups Remove some unused code Change-Id: I1d6612649cf279834f9ce92da60a85495389555e Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 21 +++------------------ src/qml/qml/qqmlvmemetaobject_p.h | 3 +-- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index a0e1d79f93..54b5f2da0d 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -148,7 +148,7 @@ QAbstractDynamicMetaObject *QQmlVMEMetaObject::toDynamicMetaObject(QObject *o) QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, - const QQmlVMEMetaData *meta, QV4::ExecutionContext *qmlBindingContext, QQmlCompiledData *compiledData) + const QQmlVMEMetaData *meta) : object(obj), ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta), hasAssignedMetaObjectData(false), aliasEndpoints(0), @@ -186,21 +186,6 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, if (needsJSWrapper) ensureQObjectWrapper(); - - if (qmlBindingContext && metaData->methodCount) { - methods = new QV4::PersistentValue[metaData->methodCount]; - - QV4::CompiledData::CompilationUnit *compilationUnit = compiledData->compilationUnit; - QV4::Scope scope(cache->engine); - QV4::ScopedObject o(scope); - for (int index = 0; index < metaData->methodCount; ++index) { - QQmlVMEMetaData::MethodData *data = metaData->methodData() + index; - - QV4::Function *runtimeFunction = compilationUnit->runtimeFunctions[data->runtimeFunctionIndex]; - o = QV4::FunctionObject::createScriptFunction(qmlBindingContext, runtimeFunction); - methods[index].set(qmlBindingContext->engine(), o); - } - } } QQmlVMEMetaObject::~QQmlVMEMetaObject() @@ -850,11 +835,11 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index) { if (!ctxt || !ctxt->isValid()) { qWarning("QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context"); - return QV4::Primitive::undefinedValue().asReturnedValue(); + return QV4::Encode::undefined(); } if (!methods) - methods = new QV4::PersistentValue[metaData->methodCount]; + return QV4::Encode::undefined(); return methods[index].value(); } diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 0097f02b07..413eca8a68 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -155,8 +155,7 @@ class QQmlVMEMetaObjectEndpoint; class Q_QML_PRIVATE_EXPORT QQmlVMEMetaObject : public QAbstractDynamicMetaObject { public: - QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *data, - QV4::ExecutionContext *qmlBindingContext = 0, QQmlCompiledData *compiledData = 0); + QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *data); ~QQmlVMEMetaObject(); bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const; -- cgit v1.2.3 From 14e49c4a1960bfabf1963fa502b05c754a7f3858 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Sep 2015 12:30:40 +0200 Subject: Remove some unused code Change-Id: Iaa89515891624602cf63701364c77e49ea1e1bd9 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlpropertycache.cpp | 129 -------------------------------------- src/qml/qml/qqmlpropertycache_p.h | 7 --- 2 files changed, 136 deletions(-) diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 9a935ed55f..8f17c2ac44 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -346,25 +346,6 @@ void QQmlPropertyCache::appendProperty(const QString &name, setNamedProperty(name, index + propertyOffset(), propertyIndexCache.data() + index, (old != 0)); } -void QQmlPropertyCache::appendProperty(const QHashedCStringRef &name, - quint32 flags, int coreIndex, int propType, int notifyIndex) -{ - QQmlPropertyData data; - data.propType = propType; - data.coreIndex = coreIndex; - data.notifyIndex = notifyIndex; - data.flags = flags; - - QQmlPropertyData *old = findNamedProperty(name); - if (old) - data.markAsOverrideOf(old); - - int index = propertyIndexCache.count(); - propertyIndexCache.append(data); - - setNamedProperty(name, index + propertyOffset(), propertyIndexCache.data() + index, (old != 0)); -} - void QQmlPropertyCache::appendSignal(const QString &name, quint32 flags, int coreIndex, const int *types, const QList &names) { @@ -402,43 +383,6 @@ void QQmlPropertyCache::appendSignal(const QString &name, quint32 flags, int cor setNamedProperty(handlerName, signalHandlerIndex + signalOffset(), signalHandlerIndexCache.data() + signalHandlerIndex, (old != 0)); } -void QQmlPropertyCache::appendSignal(const QHashedCStringRef &name, quint32 flags, int coreIndex, - const int *types, const QList &names) -{ - QQmlPropertyData data; - data.propType = QVariant::Invalid; - data.coreIndex = coreIndex; - data.flags = flags; - data.arguments = 0; - - QQmlPropertyData handler = data; - handler.flags |= QQmlPropertyData::IsSignalHandler; - - if (types) { - int argumentCount = *types; - QQmlPropertyCacheMethodArguments *args = createArgumentsObject(argumentCount, names); - ::memcpy(args->arguments, types, (argumentCount + 1) * sizeof(int)); - args->argumentsValid = true; - data.arguments = args; - } - - QQmlPropertyData *old = findNamedProperty(name); - if (old) - data.markAsOverrideOf(old); - - int methodIndex = methodIndexCache.count(); - methodIndexCache.append(data); - - int signalHandlerIndex = signalHandlerIndexCache.count(); - signalHandlerIndexCache.append(handler); - - QString handlerName = QLatin1String("on") + name.toUtf16(); - handlerName[2] = handlerName[2].toUpper(); - - setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0)); - setNamedProperty(handlerName, signalHandlerIndex + signalOffset(), signalHandlerIndexCache.data() + signalHandlerIndex, (old != 0)); -} - void QQmlPropertyCache::appendMethod(const QString &name, quint32 flags, int coreIndex, const QList &names) { @@ -466,33 +410,6 @@ void QQmlPropertyCache::appendMethod(const QString &name, quint32 flags, int cor setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0)); } -void QQmlPropertyCache::appendMethod(const QHashedCStringRef &name, quint32 flags, int coreIndex, - const QList &names) -{ - int argumentCount = names.count(); - - QQmlPropertyData data; - data.propType = QMetaType::QVariant; - data.coreIndex = coreIndex; - - QQmlPropertyCacheMethodArguments *args = createArgumentsObject(argumentCount, names); - for (int ii = 0; ii < argumentCount; ++ii) - args->arguments[ii + 1] = QMetaType::QVariant; - args->argumentsValid = true; - data.arguments = args; - - data.flags = flags; - - QQmlPropertyData *old = findNamedProperty(name); - if (old) - data.markAsOverrideOf(old); - - int methodIndex = methodIndexCache.count(); - methodIndexCache.append(data); - - setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0)); -} - // Returns this property cache's metaObject. May be null if it hasn't been created yet. const QMetaObject *QQmlPropertyCache::metaObject() const { @@ -1101,52 +1018,6 @@ QQmlPropertyCacheMethodArguments *QQmlPropertyCache::createArgumentsObject(int a return args; } -/*! \internal - \a index MUST be in the signal index range (see QObjectPrivate::signalIndex()). - This is different from QMetaMethod::methodIndex(). -*/ -QString QQmlPropertyCache::signalParameterStringForJS(int index, QString *errorString) -{ - QQmlPropertyCache *c = 0; - QQmlPropertyData *signalData = signal(index, &c); - if (!signalData) - return QString(); - - typedef QQmlPropertyCacheMethodArguments A; - - if (signalData->arguments) { - A *arguments = static_cast(signalData->arguments); - if (arguments->signalParameterStringForJS) { - if (arguments->parameterError) { - if (errorString) - *errorString = *arguments->signalParameterStringForJS; - return QString(); - } - return *arguments->signalParameterStringForJS; - } - } - - QList parameterNameList = signalParameterNames(index); - - if (!signalData->arguments) { - A *args = c->createArgumentsObject(parameterNameList.count(), parameterNameList); - signalData->arguments = args; - } - - QString error; - QString parameters = signalParameterStringForJS(engine, parameterNameList, &error); - - A *arguments = static_cast(signalData->arguments); - arguments->signalParameterStringForJS = new QString(!error.isEmpty() ? error : parameters); - if (!error.isEmpty()) { - arguments->parameterError = true; - if (errorString) - *errorString = *arguments->signalParameterStringForJS; - return QString(); - } - return *arguments->signalParameterStringForJS; -} - QString QQmlPropertyCache::signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList ¶meterNameList, QString *errorString) { bool unnamedParameter = false; diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 2ee399c496..fa4aaac5c5 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -267,16 +267,10 @@ public: int methodCount, int signalCount); void appendProperty(const QString &, quint32 flags, int coreIndex, int propType, int notifyIndex); - void appendProperty(const QHashedCStringRef &, - quint32 flags, int coreIndex, int propType, int notifyIndex); void appendSignal(const QString &, quint32, int coreIndex, const int *types = 0, const QList &names = QList()); - void appendSignal(const QHashedCStringRef &, quint32, int coreIndex, const int *types = 0, - const QList &names = QList()); void appendMethod(const QString &, quint32 flags, int coreIndex, const QList &names = QList()); - void appendMethod(const QHashedCStringRef &, quint32 flags, int coreIndex, - const QList &names = QList()); const QMetaObject *metaObject() const; const QMetaObject *createMetaObject(); @@ -313,7 +307,6 @@ public: static int originalClone(QObject *, int index); QList signalParameterNames(int index) const; - QString signalParameterStringForJS(int index, QString *errorString = 0); static QString signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList ¶meterNameList, QString *errorString = 0); const char *className() const; -- cgit v1.2.3 From 6ef2ca90e21b57fb74bb7a8985ef9c7fadc1b613 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Sep 2015 14:48:04 +0200 Subject: Smaller cleanups Change-Id: Ib75bf9de898975dcbb98b411a1e98524754c0788 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlpropertycache.cpp | 8 +++----- src/qml/qml/qqmlpropertycache_p.h | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 8f17c2ac44..67b3f93bcb 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -810,19 +810,17 @@ void QQmlPropertyCache::invalidate(const QMetaObject *metaObject) This is different from QMetaMethod::methodIndex(). */ QQmlPropertyData * -QQmlPropertyCache::signal(int index, QQmlPropertyCache **c) const +QQmlPropertyCache::signal(int index) const { if (index < 0 || index >= (signalHandlerIndexCacheStart + signalHandlerIndexCache.count())) return 0; if (index < signalHandlerIndexCacheStart) - return _parent->signal(index, c); + return _parent->signal(index); QQmlPropertyData *rv = const_cast(&methodIndexCache.at(index - signalHandlerIndexCacheStart)); - if (rv->notFullyResolved()) resolve(rv); Q_ASSERT(rv->isSignal() || rv->coreIndex == -1); - if (c) *c = const_cast(this); - return rv; + return ensureResolved(rv); } int QQmlPropertyCache::methodIndexToSignalIndex(int index) const diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index fa4aaac5c5..610709ef7f 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -284,7 +284,7 @@ public: QQmlPropertyData *property(int) const; QQmlPropertyData *method(int) const; - QQmlPropertyData *signal(int index) const { return signal(index, 0); } + QQmlPropertyData *signal(int index) const; int methodIndexToSignalIndex(int) const; QStringList propertyNames() const; @@ -340,9 +340,7 @@ private: QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); - QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, - const QList &names); - QQmlPropertyData *signal(int, QQmlPropertyCache **) const; + QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, const QList &names); typedef QVector IndexCache; typedef QStringMultiHash > StringCache; -- cgit v1.2.3 From d37a0145cdec131ef6f689310530ce92c4ba5e05 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 18 Sep 2015 19:56:58 +0200 Subject: Mark Canvas::tileSize and Canvas::canvasWindow as obsolete. The feature has never worked properly and the documentation is misleading. Task-number: QTBUG-33129 Change-Id: I75c5073ebf4ca10f45d42aca76444ab3d7fb3820 Reviewed-by: Mitch Curtis Reviewed-by: Robin Burchell --- src/quick/items/context2d/qquickcanvasitem.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 9932747dd3..070ede930a 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -256,19 +256,6 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() The default render target is Canvas.Image and the default renderStrategy is Canvas.Immediate. - \section1 Tiled Canvas - The Canvas item supports tiled rendering by setting \l canvasSize, \l tileSize - and \l canvasWindow properties. - - Tiling allows efficient display of a very large virtual canvas via a smaller - canvas window. The actual memory consumption is in relation to the canvas - window size. The painting code can draw within the virtual canvas without - handling coordinate system transformations. - - The tiles overlapping with the canvas window may be cached eliminating the - need to redraw, which can lead to significantly improved performance in - some situations. - \section1 Pixel Operations All HTML5 2D context pixel operations are supported. In order to ensure improved pixel reading/writing performance the \a Canvas.Image render @@ -431,6 +418,8 @@ void QQuickCanvasItem::setCanvasSize(const QSizeF & size) By default the tileSize is the same as the canvasSize. + \obsolete This feature is incomplete. For details, see QTBUG-33129. + \sa canvasSize, canvasWindow */ QSize QQuickCanvasItem::tileSize() const @@ -464,6 +453,8 @@ void QQuickCanvasItem::setTileSize(const QSize & size) can display different visible areas by changing the canvas windowSize and/or position. + \obsolete This feature is incomplete. For details, see QTBUG-33129 + \sa canvasSize, tileSize */ QRectF QQuickCanvasItem::canvasWindow() const -- cgit v1.2.3 From 6fa50ffc31fcca051c73eeaa94116f2667b9ae6b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 23 Sep 2015 17:44:19 +0200 Subject: Fix up flawed TranslucentBackground usage in docs and examples Following the qtbase fixes, start doing things correctly in the QQuickWidget examples too. Remove the checkbox and use a --transparent command line argument (like in hellogl2). In addition --transparent --no_render_alpha can be used to verify the most problematic case: when alpha is present and the backingstore contains semi-transparent pixels in places where the underlying QOpenGLWidget is opaque. Here the result must still be an opaque pixel. This was previously ensured by a glColorMask call, now replaced by glBlendFuncSeparate in QPlatformBackingStore. Task-number: QTBUG-47276 Change-Id: Ia040f899405f73e95e957becee5df43683af9c39 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Gunnar Sletta --- .../quickwidgets/qquickviewcomparison/main.cpp | 8 +++++++- .../qquickviewcomparison/mainwindow.cpp | 24 +++++----------------- .../quickwidgets/qquickviewcomparison/mainwindow.h | 5 +---- src/quickwidgets/qquickwidget.cpp | 11 +++++----- 4 files changed, 19 insertions(+), 29 deletions(-) diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp index bbe97a947f..7e45e42527 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp @@ -48,7 +48,13 @@ int main(int argc, char **argv) QApplication app(argc, argv); - MainWindow widgetWindow; + bool transparency = QCoreApplication::arguments().contains(QStringLiteral("--transparent")); + MainWindow widgetWindow(transparency); + if (transparency) { + widgetWindow.setAttribute(Qt::WA_TranslucentBackground); + widgetWindow.setAttribute(Qt::WA_NoSystemBackground, false); + } + widgetWindow.resize(1024, 768); widgetWindow.show(); diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp index dce89d6b18..078d8e7e03 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp @@ -47,10 +47,10 @@ #include #include -MainWindow::MainWindow() +MainWindow::MainWindow(bool transparency) : m_currentView(0), m_currentRootObject(0), - m_transparent(false) + m_transparent(transparency) { QVBoxLayout *layout = new QVBoxLayout; @@ -103,13 +103,6 @@ MainWindow::MainWindow() connect(m_checkboxOverlayVisible, &QCheckBox::toggled, m_overlayLabel, &QWidget::setVisible); layout->addWidget(m_checkboxOverlayVisible); - m_checkboxTransparent = new QCheckBox(tr("Transparent background in QQuickWidget")); - connect(m_radioWidget, &QCheckBox::toggled, m_checkboxTransparent, &QWidget::setEnabled); -#ifdef Q_OS_LINUX - connect(m_checkboxTransparent, &QCheckBox::toggled, this, &MainWindow::onTransparentChanged); - layout->addWidget(m_checkboxTransparent); -#endif - setLayout(layout); updateView(); @@ -170,10 +163,8 @@ void MainWindow::updateView() switchTo(QWidget::createWindowContainer(quickView)); } else if (m_state == UseWidget) { QQuickWidget *quickWidget = new QQuickWidget; - if (m_transparent) { + if (m_transparent) quickWidget->setClearColor(Qt::transparent); - quickWidget->setAttribute(Qt::WA_TranslucentBackground); - } quickWidget->setFormat(m_format); quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView); connect(quickWidget, &QQuickWidget::statusChanged, this, &MainWindow::onStatusChangedWidget); @@ -186,7 +177,8 @@ void MainWindow::updateView() if (m_currentRootObject) { m_currentRootObject->setProperty("currentText", text); m_currentRootObject->setProperty("multisample", m_checkboxMultiSample->isChecked()); - m_currentRootObject->setProperty("translucency", m_transparent); + if (!QCoreApplication::arguments().contains(QStringLiteral("--no_render_alpha"))) + m_currentRootObject->setProperty("translucency", m_transparent); } m_overlayLabel->raise(); @@ -242,9 +234,3 @@ void MainWindow::onSceneGraphError(QQuickWindow::SceneGraphError error, const QS { m_labelStatus->setText(tr("Scenegraph error %1: %2").arg(error).arg(message)); } - -void MainWindow::onTransparentChanged(bool enabled) -{ - m_transparent = enabled; - updateView(); -} diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h index c58523f675..5b86c93f38 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h @@ -53,7 +53,7 @@ QT_FORWARD_DECLARE_CLASS(QLayout) class MainWindow : public QWidget { public: - MainWindow(); + MainWindow(bool transparency); protected: void resizeEvent(QResizeEvent*); @@ -63,7 +63,6 @@ private slots: void onStatusChangedView(QQuickView::Status status); void onStatusChangedWidget(QQuickWidget::Status status); void onSceneGraphError(QQuickWindow::SceneGraphError error, const QString &message); - void onTransparentChanged(bool enabled); private: void switchTo(QWidget *view); @@ -86,8 +85,6 @@ private: QSurfaceFormat m_format; - QCheckBox *m_checkboxTransparent; - bool m_transparent; }; diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 47bcabc115..9cfec370f9 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -345,8 +345,8 @@ QObject *QQuickWidgetPrivate::focusObject() This limitation only applies when there are other widgets underneath the QQuickWidget inside the same window. Making the window semi-transparent, with other applications and the desktop visible in the background, is done in the traditional way: Set - Qt::WA_TranslucentBackground and change the Qt Quick Scenegraph's clear color to - Qt::transparent via setClearColor(). + Qt::WA_TranslucentBackground on the top-level window, request an alpha channel, and + change the Qt Quick Scenegraph's clear color to Qt::transparent via setClearColor(). \sa {Exposing Attributes of C++ Types to QML}, {Qt Quick Widgets Example}, QQuickView */ @@ -1293,9 +1293,10 @@ QImage QQuickWidget::grabFramebuffer() const /*! Sets the clear \a color. By default this is an opaque color. - To get a semi- or fully transparent QQuickWidget, call this function with \a - color set to Qt::transparent and set the Qt::WA_TranslucentBackground widget - attribute. + To get a semi-transparent QQuickWidget, call this function with + \a color set to Qt::transparent, set the Qt::WA_TranslucentBackground + widget attribute on the top-level window, and request an alpha + channel via setFormat(). \sa QQuickWindow::setColor() */ -- cgit v1.2.3 From 70c4a9ea2a8c3e5f6ac1ca714d096586adda0613 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Mon, 28 Sep 2015 13:55:50 +0200 Subject: Doc: replaced \keyword with \target when not at top of page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I20bc53c71d6c3217ec51a3fd5ad8e5a38bb2043b Task-number: QTBUG-48482 Reviewed-by: Martin Smith Reviewed-by: Topi Reiniö --- src/qml/doc/src/javascript/qmlglobalobject.qdoc | 2 +- src/qml/doc/src/qmllanguageref/syntax/basics.qdoc | 2 +- src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc | 2 +- src/qml/doc/src/qmllanguageref/syntax/signals.qdoc | 4 ++-- src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc | 8 ++++---- src/quick/doc/src/concepts/statesanimations/animations.qdoc | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qml/doc/src/javascript/qmlglobalobject.qdoc b/src/qml/doc/src/javascript/qmlglobalobject.qdoc index e37b35451c..c9e018525a 100644 --- a/src/qml/doc/src/javascript/qmlglobalobject.qdoc +++ b/src/qml/doc/src/javascript/qmlglobalobject.qdoc @@ -47,7 +47,7 @@ additional imports: -\keyword XMLHttpRequest +\target XMLHttpRequest \section1 XMLHttpRequest The XMLHttpRequest object, which can be used to asynchronously obtain diff --git a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc index ddb307cf75..50767bfc8f 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc @@ -73,7 +73,7 @@ Please see the \l{qtqml-syntax-imports.html}{QML Syntax - Import Statements} documentation for in-depth information about QML imports. -\keyword qml-object-declarations +\target qml-object-declarations \section1 Object Declarations Syntactically, a block of QML code defines a tree of QML objects to be created. Objects are diff --git a/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc b/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc index 3aa228c8eb..f28ff5082a 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc @@ -130,7 +130,7 @@ and maintainability. It may be a good idea to redesign components that have complex bindings, or at least factor the binding out into a separate function. -\keyword qml-javascript-assignment +\target qml-javascript-assignment \section1 Creating Property Bindings from JavaScript A property with a binding is automatically updated as necessary. However, if the diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc index e7d75a89bc..602b202ed4 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc @@ -42,7 +42,7 @@ and the signal is responded to through a \e {signal handler}. When a signal is emitted, the corresponding signal handler is invoked. Placing logic such as scripts or other operations in the handler allows the component to respond to the event. -\keyword qml-signals-and-handlers +\target qml-signals-and-handlers \section1 Receiving Signals with Signal Handlers To receive a notification when a particular signal is emitted for a particular object, the object definition should declare a signal handler named \e on where \e is the name of the signal, with the first letter capitalized. The signal handler should contain the JavaScript code to be executed when the signal handler is invoked. @@ -208,7 +208,7 @@ SquareButton { See \l {Signal Attributes} for more details on writing signals for custom QML types. -\keyword qml-connect-signals-to-method +\target qml-connect-signals-to-method \section1 Connecting Signals to Methods and Signals Signal objects have a \c connect() method to a connect a signal either to a diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc index e03b3a9bf8..e928adba9c 100644 --- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc +++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc @@ -57,7 +57,7 @@ To visualize data, bind the view's \c model property to a model and the Views are containers for collections of items. They are feature-rich and can be customizable to meet style or behavior requirements. - \keyword qtquick-views + \target qtquick-views A set of standard views are provided in the basic set of Qt Quick graphical types: @@ -124,7 +124,7 @@ To visualize data, bind the view's \c model property to a model and the \snippet qml/listview-sections.qml section \image listview-section.png -\keyword qml-view-delegate +\target qml-view-delegate \section1 View Delegates Views need a \e delegate to visually represent an item in a list. A view will @@ -154,7 +154,7 @@ To visualize data, bind the view's \c model property to a model and the \snippet qml/models/views-models-delegates.qml rectangle -\keyword qml-data-models +\target qml-data-models \section1 Models Data is provided to the delegate via named data roles which the delegate may @@ -320,7 +320,7 @@ To visualize data, bind the view's \c model property to a model and the } \endqml - \keyword qml-c++-models + \target qml-c++-models \section2 C++ Data Models Models can be defined in C++ and then made available to QML. This mechanism diff --git a/src/quick/doc/src/concepts/statesanimations/animations.qdoc b/src/quick/doc/src/concepts/statesanimations/animations.qdoc index 4e336afa36..ee174d2dad 100644 --- a/src/quick/doc/src/concepts/statesanimations/animations.qdoc +++ b/src/quick/doc/src/concepts/statesanimations/animations.qdoc @@ -138,7 +138,7 @@ are also automatically applied to this property and do not need to specify values. -\keyword qml-transition-animations +\target qml-transition-animations \section2 Transitions during State Changes \l{State}{Qt Quick States} are property configurations where a property may have different values to reflect different states. State changes introduce @@ -210,7 +210,7 @@ The \l SequentialAnimation type is also useful for playing \l{qml-transition-animations}{transition animations} because animations are played in parallel inside transitions. -\keyword qml-controlling-animations +\target qml-controlling-animations \section1 Controlling Animations There are different methods to control animations. @@ -222,7 +222,7 @@ essential properties and methods for animation types. Animation types have \c{start()}, \c{stop()}, \c{resume()}, \c{pause()}, \c {restart()}, and \c{complete()} -- all of these methods control the execution of animations. -\keyword qml-easing-animation +\target qml-easing-animation \section2 Easing Easing curves define how the animation will interpolate between the start value -- cgit v1.2.3 From 98637d8ba2bb40d5bfa0fa63dbc56541ac8ddd64 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 25 Sep 2015 23:13:56 +0200 Subject: Flickable: remove spurious emission of content size changes If contentWidth or contentHeight is negative (unspecified), Flickable should not emit contentWidthChanged() or contentHeightChanged() when its own geometry changes. The value of contentWidth or contentHeight does not change. It remains negative (unspecified). Change-Id: Iad478d11e2e4370d2e94abe84cfd62d144e23dd9 Task-number: QTBUG-35038 Reviewed-by: Robin Burchell Reviewed-by: Mitch Curtis --- src/quick/items/qquickflickable.cpp | 8 ++--- .../quick/qquickflickable/tst_qquickflickable.cpp | 35 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index ea4398bc71..bef766a516 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -1640,10 +1640,8 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry, bool changed = false; if (newGeometry.width() != oldGeometry.width()) { changed = true; // we must update visualArea.widthRatio - if (d->hData.viewSize < 0) { + if (d->hData.viewSize < 0) d->contentItem->setWidth(width()); - emit contentWidthChanged(); - } // Make sure that we're entirely in view. if (!d->pressed && !d->hData.moving && !d->vData.moving) { d->fixupMode = QQuickFlickablePrivate::Immediate; @@ -1652,10 +1650,8 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry, } if (newGeometry.height() != oldGeometry.height()) { changed = true; // we must update visualArea.heightRatio - if (d->vData.viewSize < 0) { + if (d->vData.viewSize < 0) d->contentItem->setHeight(height()); - emit contentHeightChanged(); - } // Make sure that we're entirely in view. if (!d->pressed && !d->hData.moving && !d->vData.moving) { d->fixupMode = QQuickFlickablePrivate::Immediate; diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index eee7ffe560..f7267800c9 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -93,6 +93,7 @@ private slots: void pressDelayWithLoader(); void movementFromProgrammaticFlick(); void cleanup(); + void contentSize(); private: void flickWithTouch(QQuickWindow *window, QTouchDevice *touchDevice, const QPoint &from, const QPoint &to); @@ -1739,6 +1740,40 @@ void tst_qquickflickable::movementFromProgrammaticFlick() QTRY_COMPARE(flickable->property("signalString").toString(), QString("msfsfeme")); } +// QTBUG_35038 +void tst_qquickflickable::contentSize() +{ + QQuickFlickable flickable; + QCOMPARE(flickable.contentWidth(), qreal(-1)); + QCOMPARE(flickable.contentHeight(), qreal(-1)); + + QSignalSpy cwspy(&flickable, SIGNAL(contentWidthChanged())); + QVERIFY(cwspy.isValid()); + + QSignalSpy chspy(&flickable, SIGNAL(contentHeightChanged())); + QVERIFY(chspy.isValid()); + + flickable.setWidth(100); + QCOMPARE(flickable.width(), qreal(100)); + QCOMPARE(flickable.contentWidth(), qreal(-1.0)); + QCOMPARE(cwspy.count(), 0); + + flickable.setContentWidth(10); + QCOMPARE(flickable.width(), qreal(100)); + QCOMPARE(flickable.contentWidth(), qreal(10)); + QCOMPARE(cwspy.count(), 1); + + flickable.setHeight(100); + QCOMPARE(flickable.height(), qreal(100)); + QCOMPARE(flickable.contentHeight(), qreal(-1.0)); + QCOMPARE(chspy.count(), 0); + + flickable.setContentHeight(10); + QCOMPARE(flickable.height(), qreal(100)); + QCOMPARE(flickable.contentHeight(), qreal(10)); + QCOMPARE(chspy.count(), 1); +} + QTEST_MAIN(tst_qquickflickable) #include "tst_qquickflickable.moc" -- cgit v1.2.3 From 0678bc8d0676907c0a6f60a6b121d1f10b973e1e Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Tue, 29 Sep 2015 14:01:40 +0200 Subject: Doc: replaced \target with \keyword if at top of page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A \target whose purpose is to link to the top of a page (and not to a section within a page) works better as a \keyword, because \target generates a new html anchor which, in this case, is not tied to any title element on the page. A \keyword links to the page itself, as expected. Change-Id: Ic7c83efc5066674aba3d65164bf2cf53697df4d6 Task-number: QTBUG-48482 Reviewed-by: Topi Reiniö Reviewed-by: Martin Smith --- src/quick/doc/src/concepts/positioning/anchors.qdoc | 2 +- src/quick/doc/src/examples.qdoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quick/doc/src/concepts/positioning/anchors.qdoc b/src/quick/doc/src/concepts/positioning/anchors.qdoc index 71af38b587..259dcbe671 100644 --- a/src/quick/doc/src/concepts/positioning/anchors.qdoc +++ b/src/quick/doc/src/concepts/positioning/anchors.qdoc @@ -30,7 +30,7 @@ \title Positioning with Anchors \brief placing items with anchor properties -\target anchor-layout +\keyword anchor-layout In addition to the more traditional \l Grid, \l Row, and \l Column, Qt Quick also provides a way to layout items using the concept of \e anchors. Each item can be thought of as having a set of 7 invisible "anchor lines": diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc index dd21270673..e69c2f6551 100644 --- a/src/quick/doc/src/examples.qdoc +++ b/src/quick/doc/src/examples.qdoc @@ -32,7 +32,7 @@ \brief Building UIs with QML \ingroup all-examples \ingroup qtquick -\target qtquick-samples +\keyword qtquick-samples Qt includes several examples to demonstrate a particular usage. The examples run as applications or as non-GUI examples in Qt Creator. Qt tutorials show -- cgit v1.2.3 From c5dcabeb6a07ed358e64f26cd8475bfe5daae0e4 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 28 Sep 2015 15:43:17 +0200 Subject: Purge spurious execute permissions. JavaScript, README and QML are not meant to be run from the shell. Change-Id: Ia1ddf621e2e341639daac651e2b4954364407574 Reviewed-by: Frederik Gladhorn Reviewed-by: Simon Hausmann --- examples/quick/tutorials/samegame/samegame4/content/samegame.js | 0 tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js | 0 tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js | 0 tests/auto/qml/parserstress/tests/ecma/README | 0 tests/auto/qml/parserstress/tests/ecma_2/README | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js | 0 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js | 0 tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js | 0 .../qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js | 0 tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/README | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js | 0 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js | 0 tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js | 0 tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js | 0 tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js | 0 tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js | 0 tests/auto/qml/parserstress/tests/ecma_3/browser.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js | 0 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js | 0 tests/auto/qml/parserstress/tests/ecma_3/template.js | 0 tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml | 0 tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml | 0 87 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 examples/quick/tutorials/samegame/samegame4/content/samegame.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma/README mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/README mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/README mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/browser.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js mode change 100755 => 100644 tests/auto/qml/parserstress/tests/ecma_3/template.js mode change 100755 => 100644 tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml mode change 100755 => 100644 tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml diff --git a/examples/quick/tutorials/samegame/samegame4/content/samegame.js b/examples/quick/tutorials/samegame/samegame4/content/samegame.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma/README b/tests/auto/qml/parserstress/tests/ecma/README old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/README b/tests/auto/qml/parserstress/tests/ecma_2/README old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/README b/tests/auto/qml/parserstress/tests/ecma_3/README old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/browser.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js old mode 100755 new mode 100644 diff --git a/tests/auto/qml/parserstress/tests/ecma_3/template.js b/tests/auto/qml/parserstress/tests/ecma_3/template.js old mode 100755 new mode 100644 diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml old mode 100755 new mode 100644 diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml old mode 100755 new mode 100644 -- cgit v1.2.3 From 0a5db49d0d57822adc630ac9c2158096bede6d00 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 3 Oct 2015 14:03:57 +0200 Subject: QQuickTextEdit/Input: revise implicit resizing Rename explicitImplicitSize to better descriptive implicitResize, and add a method to disable the default behavior. QQuickTextField was unable to access the flag directly, because ExtraData is not exported (and we prefer to keep it that way). Change-Id: Ia8b8281267adfc376e03a14882708e9cf80f0451 Reviewed-by: Liang Qi --- src/quick/items/qquicktextedit.cpp | 6 +++--- src/quick/items/qquicktextedit_p_p.h | 9 ++++++++- src/quick/items/qquicktextinput.cpp | 6 +++--- src/quick/items/qquicktextinput_p_p.h | 9 ++++++++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 5523beb72a..9c77f11d74 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -2115,7 +2115,7 @@ QQuickTextEditPrivate::ExtraData::ExtraData() , explicitLeftPadding(false) , explicitRightPadding(false) , explicitBottomPadding(false) - , explicitImplicitSize(false) + , implicitResize(true) { } @@ -2346,7 +2346,7 @@ void QQuickTextEdit::updateSize() const bool wasInLayout = d->inLayout; d->inLayout = true; - if (!d->extra.isAllocated() || !d->extra->explicitImplicitSize) + if (!d->extra.isAllocated() || d->extra->implicitResize) setImplicitWidth(naturalWidth + leftPadding() + rightPadding()); d->inLayout = wasInLayout; if (d->inLayout) // probably the result of a binding loop, but by letting it @@ -2366,7 +2366,7 @@ void QQuickTextEdit::updateSize() QFontMetricsF fm(d->font); qreal newHeight = d->document->isEmpty() ? qCeil(fm.height()) : d->document->size().height(); - if (!d->extra.isAllocated() || !d->extra->explicitImplicitSize) { + if (!d->extra.isAllocated() || d->extra->implicitResize) { // ### Setting the implicitWidth triggers another updateSize(), and unless there are bindings nothing has changed. if (!widthValid() && !d->requireImplicitWidth) setImplicitSize(newWidth + leftPadding() + rightPadding(), newHeight + topPadding() + bottomPadding()); diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h index 90ed7f071e..1ff141f3d5 100644 --- a/src/quick/items/qquicktextedit_p_p.h +++ b/src/quick/items/qquicktextedit_p_p.h @@ -94,7 +94,7 @@ public: bool explicitLeftPadding : 1; bool explicitRightPadding : 1; bool explicitBottomPadding : 1; - bool explicitImplicitSize : 1; + bool implicitResize : 1; }; QLazilyAllocated extra; @@ -155,6 +155,13 @@ public: void setRightPadding(qreal value, bool reset = false); void setBottomPadding(qreal value, bool reset = false); + void setImplicitResizeEnabled(bool enabled) { + if (!enabled) + extra.value().implicitResize = false; + else if (extra.isAllocated()) + extra->implicitResize = true; + } + QColor color; QColor selectionColor; QColor selectedTextColor; diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index d69c489b2d..2303322347 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2518,7 +2518,7 @@ QQuickTextInputPrivate::ExtraData::ExtraData() , explicitLeftPadding(false) , explicitRightPadding(false) , explicitBottomPadding(false) - , explicitImplicitSize(false) + , implicitResize(true) { } @@ -2821,7 +2821,7 @@ void QQuickTextInputPrivate::updateLayout() line.setLineWidth(INT_MAX); const bool wasInLayout = inLayout; inLayout = true; - if (!extra.isAllocated() || !extra->explicitImplicitSize) + if (!extra.isAllocated() || extra->implicitResize) q->setImplicitWidth(qCeil(line.naturalTextWidth()) + q->leftPadding() + q->rightPadding()); inLayout = wasInLayout; if (inLayout) // probably the result of a binding loop, but by letting it @@ -2853,7 +2853,7 @@ void QQuickTextInputPrivate::updateLayout() q->polish(); q->update(); - if (!extra.isAllocated() || !extra->explicitImplicitSize) { + if (!extra.isAllocated() || extra->implicitResize) { if (!requireImplicitWidth && !q->widthValid()) q->setImplicitSize(width + q->leftPadding() + q->rightPadding(), height + q->topPadding() + q->bottomPadding()); else diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h index 4946adc7e7..7e1f18130e 100644 --- a/src/quick/items/qquicktextinput_p_p.h +++ b/src/quick/items/qquicktextinput_p_p.h @@ -84,7 +84,7 @@ public: bool explicitLeftPadding : 1; bool explicitRightPadding : 1; bool explicitBottomPadding : 1; - bool explicitImplicitSize : 1; + bool implicitResize : 1; }; QLazilyAllocated extra; @@ -443,6 +443,13 @@ public: void setRightPadding(qreal value, bool reset = false); void setBottomPadding(qreal value, bool reset = false); + void setImplicitResizeEnabled(bool enabled) { + if (!enabled) + extra.value().implicitResize = false; + else if (extra.isAllocated()) + extra->implicitResize = true; + } + private: void removeSelectedText(); void internalSetText(const QString &txt, int pos = -1, bool edited = true); -- cgit v1.2.3 From 1a335f6ae320dfedef617564a161b73ff276ca5b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 3 Oct 2015 18:23:28 +0200 Subject: QQuickTextEdit/Input: revise implicit resizing - take two Referencing unexported symbols (ExtraData) from an inlined method does not work with MinGW. Change-Id: I19935c84c4e2014f73bcd1801d182d193166bd44 Reviewed-by: Liang Qi --- src/quick/items/qquicktextedit.cpp | 17 +++++++++++++++-- src/quick/items/qquicktextedit_p_p.h | 8 ++------ src/quick/items/qquicktextinput.cpp | 17 +++++++++++++++-- src/quick/items/qquicktextinput_p_p.h | 8 ++------ 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 9c77f11d74..7cf3b449a0 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -773,6 +773,19 @@ void QQuickTextEditPrivate::setBottomPadding(qreal value, bool reset) } } +bool QQuickTextEditPrivate::isImplicitResizeEnabled() const +{ + return !extra.isAllocated() || extra->implicitResize; +} + +void QQuickTextEditPrivate::setImplicitResizeEnabled(bool enabled) +{ + if (!enabled) + extra.value().implicitResize = false; + else if (extra.isAllocated()) + extra->implicitResize = true; +} + QQuickTextEdit::VAlignment QQuickTextEdit::vAlign() const { Q_D(const QQuickTextEdit); @@ -2346,7 +2359,7 @@ void QQuickTextEdit::updateSize() const bool wasInLayout = d->inLayout; d->inLayout = true; - if (!d->extra.isAllocated() || d->extra->implicitResize) + if (d->isImplicitResizeEnabled()) setImplicitWidth(naturalWidth + leftPadding() + rightPadding()); d->inLayout = wasInLayout; if (d->inLayout) // probably the result of a binding loop, but by letting it @@ -2366,7 +2379,7 @@ void QQuickTextEdit::updateSize() QFontMetricsF fm(d->font); qreal newHeight = d->document->isEmpty() ? qCeil(fm.height()) : d->document->size().height(); - if (!d->extra.isAllocated() || d->extra->implicitResize) { + if (d->isImplicitResizeEnabled()) { // ### Setting the implicitWidth triggers another updateSize(), and unless there are bindings nothing has changed. if (!widthValid() && !d->requireImplicitWidth) setImplicitSize(newWidth + leftPadding() + rightPadding(), newHeight + topPadding() + bottomPadding()); diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h index 1ff141f3d5..fed0688fd7 100644 --- a/src/quick/items/qquicktextedit_p_p.h +++ b/src/quick/items/qquicktextedit_p_p.h @@ -155,12 +155,8 @@ public: void setRightPadding(qreal value, bool reset = false); void setBottomPadding(qreal value, bool reset = false); - void setImplicitResizeEnabled(bool enabled) { - if (!enabled) - extra.value().implicitResize = false; - else if (extra.isAllocated()) - extra->implicitResize = true; - } + bool isImplicitResizeEnabled() const; + void setImplicitResizeEnabled(bool enabled); QColor color; QColor selectionColor; diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 2303322347..ab8e75bfef 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2796,6 +2796,19 @@ void QQuickTextInputPrivate::setBottomPadding(qreal value, bool reset) } } +bool QQuickTextInputPrivate::isImplicitResizeEnabled() const +{ + return !extra.isAllocated() || extra->implicitResize; +} + +void QQuickTextInputPrivate::setImplicitResizeEnabled(bool enabled) +{ + if (!enabled) + extra.value().implicitResize = false; + else if (extra.isAllocated()) + extra->implicitResize = true; +} + void QQuickTextInputPrivate::updateLayout() { Q_Q(QQuickTextInput); @@ -2821,7 +2834,7 @@ void QQuickTextInputPrivate::updateLayout() line.setLineWidth(INT_MAX); const bool wasInLayout = inLayout; inLayout = true; - if (!extra.isAllocated() || extra->implicitResize) + if (isImplicitResizeEnabled()) q->setImplicitWidth(qCeil(line.naturalTextWidth()) + q->leftPadding() + q->rightPadding()); inLayout = wasInLayout; if (inLayout) // probably the result of a binding loop, but by letting it @@ -2853,7 +2866,7 @@ void QQuickTextInputPrivate::updateLayout() q->polish(); q->update(); - if (!extra.isAllocated() || extra->implicitResize) { + if (isImplicitResizeEnabled()) { if (!requireImplicitWidth && !q->widthValid()) q->setImplicitSize(width + q->leftPadding() + q->rightPadding(), height + q->topPadding() + q->bottomPadding()); else diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h index 7e1f18130e..00d9b2b0fa 100644 --- a/src/quick/items/qquicktextinput_p_p.h +++ b/src/quick/items/qquicktextinput_p_p.h @@ -443,12 +443,8 @@ public: void setRightPadding(qreal value, bool reset = false); void setBottomPadding(qreal value, bool reset = false); - void setImplicitResizeEnabled(bool enabled) { - if (!enabled) - extra.value().implicitResize = false; - else if (extra.isAllocated()) - extra->implicitResize = true; - } + bool isImplicitResizeEnabled() const; + void setImplicitResizeEnabled(bool enabled); private: void removeSelectedText(); -- cgit v1.2.3 From 00724439761961469427600631ca859d46c1aaba Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 28 Sep 2015 11:33:41 +0200 Subject: qqmlvmemetaobject.cpp: Fix conversion warning by MSVC2015/64. qml\qqmlvmemetaobject.cpp(620): warning C4312: 'reinterpret_cast': conversion from 'int' to 'quintptr *' of greater size Change-Id: Ic24caf32b82b06bce04f4d4917efdf303be68444 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlvmemetaobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 54b5f2da0d..67c4295d95 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -617,7 +617,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * list_append, list_count, list_at, list_clear); p->dummy1 = this; - p->dummy2 = reinterpret_cast(methodOffset() + id); + p->dummy2 = reinterpret_cast(quintptr(methodOffset() + id)); } else { QV4::MemberData *md = propertiesAsMemberData(); if (md) { -- cgit v1.2.3 From 933cff33cb53c88ec5a11b8f53955054c648e21b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 5 Oct 2015 10:45:54 +0200 Subject: Add missing "We mean it" comments to private headers. Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert --- src/imports/folderlistmodel/fileinfothread_p.h | 11 +++++++++++ src/imports/folderlistmodel/fileproperty_p.h | 11 +++++++++++ src/imports/settings/qqmlsettings_p.h | 11 +++++++++++ src/imports/xmllistmodel/qqmlxmllistmodel_p.h | 11 +++++++++++ src/particles/qquickage_p.h | 11 +++++++++++ src/particles/qquickangledirection_p.h | 11 +++++++++++ src/particles/qquickcumulativedirection_p.h | 11 +++++++++++ src/particles/qquickcustomaffector_p.h | 11 +++++++++++ src/particles/qquickcustomparticle_p.h | 11 +++++++++++ src/particles/qquickdirection_p.h | 11 +++++++++++ src/particles/qquickellipseextruder_p.h | 11 +++++++++++ src/particles/qquickfriction_p.h | 11 +++++++++++ src/particles/qquickgravity_p.h | 11 +++++++++++ src/particles/qquickgroupgoal_p.h | 11 +++++++++++ src/particles/qquickimageparticle_p.h | 11 +++++++++++ src/particles/qquickitemparticle_p.h | 11 +++++++++++ src/particles/qquicklineextruder_p.h | 11 +++++++++++ src/particles/qquickmaskextruder_p.h | 11 +++++++++++ src/particles/qquickparticleaffector_p.h | 11 +++++++++++ src/particles/qquickparticleemitter_p.h | 11 +++++++++++ src/particles/qquickparticleextruder_p.h | 11 +++++++++++ src/particles/qquickparticlegroup_p.h | 11 +++++++++++ src/particles/qquickparticlepainter_p.h | 11 +++++++++++ src/particles/qquickparticlesmodule_p.h | 11 +++++++++++ src/particles/qquickparticlesystem_p.h | 11 +++++++++++ src/particles/qquickpointattractor_p.h | 11 +++++++++++ src/particles/qquickpointdirection_p.h | 11 +++++++++++ src/particles/qquickrectangleextruder_p.h | 11 +++++++++++ src/particles/qquickspritegoal_p.h | 11 +++++++++++ src/particles/qquicktargetdirection_p.h | 11 +++++++++++ src/particles/qquicktrailemitter_p.h | 11 +++++++++++ src/particles/qquickturbulence_p.h | 11 +++++++++++ src/particles/qquickv4particledata_p.h | 11 +++++++++++ src/particles/qquickwander_p.h | 11 +++++++++++ src/particles/qtquickparticlesglobal_p.h | 11 +++++++++++ src/qml/animations/qabstractanimationjob_p.h | 11 +++++++++++ src/qml/animations/qanimationgroupjob_p.h | 11 +++++++++++ src/qml/animations/qanimationjobutil_p.h | 11 +++++++++++ src/qml/animations/qcontinuinganimationgroupjob_p.h | 11 +++++++++++ src/qml/animations/qparallelanimationgroupjob_p.h | 11 +++++++++++ src/qml/animations/qpauseanimationjob_p.h | 11 +++++++++++ src/qml/animations/qsequentialanimationgroupjob_p.h | 11 +++++++++++ src/qml/compiler/qqmlirbuilder_p.h | 11 +++++++++++ src/qml/compiler/qqmltypecompiler_p.h | 11 +++++++++++ src/qml/compiler/qv4codegen_p.h | 11 +++++++++++ src/qml/compiler/qv4compileddata_p.h | 11 +++++++++++ src/qml/compiler/qv4compiler_p.h | 11 +++++++++++ src/qml/compiler/qv4instr_moth_p.h | 11 +++++++++++ src/qml/compiler/qv4isel_moth_p.h | 11 +++++++++++ src/qml/compiler/qv4isel_p.h | 11 +++++++++++ src/qml/compiler/qv4isel_util_p.h | 11 +++++++++++ src/qml/compiler/qv4ssa_p.h | 11 +++++++++++ src/qml/jit/qv4assembler_p.h | 11 +++++++++++ src/qml/jit/qv4binop_p.h | 11 +++++++++++ src/qml/jit/qv4isel_masm_p.h | 11 +++++++++++ src/qml/jit/qv4regalloc_p.h | 11 +++++++++++ src/qml/jit/qv4registerinfo_p.h | 11 +++++++++++ src/qml/jit/qv4targetplatform_p.h | 11 +++++++++++ src/qml/jit/qv4unop_p.h | 11 +++++++++++ src/qml/jsapi/qjsvalueiterator_p.h | 11 +++++++++++ src/qml/jsruntime/qv4alloca_p.h | 11 +++++++++++ src/qml/jsruntime/qv4argumentsobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arraybuffer_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arraydata_p.h | 11 +++++++++++ src/qml/jsruntime/qv4arrayobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4booleanobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4context_p.h | 11 +++++++++++ src/qml/jsruntime/qv4dataview_p.h | 11 +++++++++++ src/qml/jsruntime/qv4dateobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4debugging_p.h | 11 +++++++++++ src/qml/jsruntime/qv4engine_p.h | 11 +++++++++++ src/qml/jsruntime/qv4errorobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4executableallocator_p.h | 11 +++++++++++ src/qml/jsruntime/qv4function_p.h | 11 +++++++++++ src/qml/jsruntime/qv4functionobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4global_p.h | 11 +++++++++++ src/qml/jsruntime/qv4globalobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4identifier_p.h | 11 +++++++++++ src/qml/jsruntime/qv4identifiertable_p.h | 11 +++++++++++ src/qml/jsruntime/qv4internalclass_p.h | 11 +++++++++++ src/qml/jsruntime/qv4jsonobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4lookup_p.h | 11 +++++++++++ src/qml/jsruntime/qv4managed_p.h | 11 +++++++++++ src/qml/jsruntime/qv4math_p.h | 11 +++++++++++ src/qml/jsruntime/qv4mathobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4memberdata_p.h | 11 +++++++++++ src/qml/jsruntime/qv4numberobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4object_p.h | 11 +++++++++++ src/qml/jsruntime/qv4objectiterator_p.h | 11 +++++++++++ src/qml/jsruntime/qv4objectproto_p.h | 11 +++++++++++ src/qml/jsruntime/qv4persistent_p.h | 11 +++++++++++ src/qml/jsruntime/qv4profiling_p.h | 11 +++++++++++ src/qml/jsruntime/qv4property_p.h | 11 +++++++++++ src/qml/jsruntime/qv4regexp_p.h | 11 +++++++++++ src/qml/jsruntime/qv4regexpobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4runtime_p.h | 11 +++++++++++ src/qml/jsruntime/qv4scopedvalue_p.h | 11 +++++++++++ src/qml/jsruntime/qv4script_p.h | 11 +++++++++++ src/qml/jsruntime/qv4sparsearray_p.h | 11 +++++++++++ src/qml/jsruntime/qv4string_p.h | 11 +++++++++++ src/qml/jsruntime/qv4stringobject_p.h | 11 +++++++++++ src/qml/jsruntime/qv4typedarray_p.h | 11 +++++++++++ src/qml/jsruntime/qv4util_p.h | 11 +++++++++++ src/qml/jsruntime/qv4value_p.h | 11 +++++++++++ src/qml/jsruntime/qv4vme_moth_p.h | 11 +++++++++++ src/qml/memory/qv4heap_p.h | 11 +++++++++++ src/qml/memory/qv4mm_p.h | 11 +++++++++++ src/qml/parser/qqmljsglobal_p.h | 11 +++++++++++ src/qml/qml/qqmlaccessors_p.h | 11 +++++++++++ src/qml/qml/qqmlcomponentattached_p.h | 11 +++++++++++ src/qml/qml/qqmlglobal_p.h | 11 +++++++++++ src/qml/qml/qqmllocale_p.h | 11 +++++++++++ src/qml/qml/qqmlmemoryprofiler_p.h | 11 +++++++++++ src/qml/qml/qqmlnotifier_p.h | 11 +++++++++++ src/qml/qml/qqmlobjectcreator_p.h | 11 +++++++++++ src/qml/qml/qqmlopenmetaobject_p.h | 11 +++++++++++ src/qml/qml/qqmlplatform_p.h | 11 +++++++++++ src/qml/qml/qqmlscriptstring_p.h | 11 +++++++++++ src/qml/qml/qqmltypenotavailable_p.h | 11 +++++++++++ src/qml/types/qqmlbind_p.h | 11 +++++++++++ src/qml/types/qqmlconnections_p.h | 11 +++++++++++ src/qml/types/qqmldelegatemodel_p.h | 11 +++++++++++ src/qml/types/qqmlinstantiator_p.h | 11 +++++++++++ src/qml/types/qqmllistmodel_p.h | 11 +++++++++++ src/qml/types/qqmlmodelsmodule_p.h | 11 +++++++++++ src/qml/types/qqmlobjectmodel_p.h | 11 +++++++++++ src/qml/types/qqmltimer_p.h | 11 +++++++++++ src/qml/types/qquickpackage_p.h | 11 +++++++++++ src/qml/util/qqmladaptormodel_p.h | 11 +++++++++++ src/qml/util/qqmllistaccessor_p.h | 11 +++++++++++ src/qmltest/qtestoptions_p.h | 11 +++++++++++ src/qmltest/quicktestevent_p.h | 11 +++++++++++ src/qmltest/quicktestresult_p.h | 11 +++++++++++ src/quick/accessible/qaccessiblequickitem_p.h | 11 +++++++++++ src/quick/accessible/qaccessiblequickview_p.h | 11 +++++++++++ src/quick/accessible/qquickaccessiblefactory_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcanvascontext_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcanvasitem_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcontext2d_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcontext2dtexture_p.h | 11 +++++++++++ src/quick/items/context2d/qquickcontext2dtile_p.h | 11 +++++++++++ src/quick/items/qquickaccessibleattached_p.h | 11 +++++++++++ src/quick/items/qquickanchors_p.h | 11 +++++++++++ src/quick/items/qquickanimatedimage_p.h | 11 +++++++++++ src/quick/items/qquickanimatedsprite_p.h | 11 +++++++++++ src/quick/items/qquickborderimage_p.h | 11 +++++++++++ src/quick/items/qquickclipnode_p.h | 11 +++++++++++ src/quick/items/qquickdrag_p.h | 11 +++++++++++ src/quick/items/qquickdroparea_p.h | 11 +++++++++++ src/quick/items/qquickflickable_p.h | 11 +++++++++++ src/quick/items/qquickflickablebehavior_p.h | 11 +++++++++++ src/quick/items/qquickflipable_p.h | 11 +++++++++++ src/quick/items/qquickfocusscope_p.h | 11 +++++++++++ src/quick/items/qquickgridview_p.h | 11 +++++++++++ src/quick/items/qquickimage_p.h | 11 +++++++++++ src/quick/items/qquickimagebase_p.h | 11 +++++++++++ src/quick/items/qquickimplicitsizeitem_p.h | 11 +++++++++++ src/quick/items/qquickitemanimation_p.h | 11 +++++++++++ src/quick/items/qquickitemsmodule_p.h | 11 +++++++++++ src/quick/items/qquickitemview_p.h | 11 +++++++++++ src/quick/items/qquickitemview_p_p.h | 11 +++++++++++ src/quick/items/qquickitemviewtransition_p.h | 11 +++++++++++ src/quick/items/qquicklistview_p.h | 11 +++++++++++ src/quick/items/qquickloader_p.h | 11 +++++++++++ src/quick/items/qquickmousearea_p.h | 11 +++++++++++ src/quick/items/qquickmultipointtoucharea_p.h | 11 +++++++++++ src/quick/items/qquickpainteditem_p.h | 11 +++++++++++ src/quick/items/qquickpathview_p.h | 11 +++++++++++ src/quick/items/qquickpincharea_p.h | 11 +++++++++++ src/quick/items/qquickpositioners_p.h | 11 +++++++++++ src/quick/items/qquickrectangle_p.h | 11 +++++++++++ src/quick/items/qquickrepeater_p.h | 11 +++++++++++ src/quick/items/qquickscalegrid_p_p.h | 11 +++++++++++ src/quick/items/qquickscreen_p.h | 11 +++++++++++ src/quick/items/qquickshadereffect_p.h | 11 +++++++++++ src/quick/items/qquickshadereffectmesh_p.h | 11 +++++++++++ src/quick/items/qquickshadereffectnode_p.h | 11 +++++++++++ src/quick/items/qquickshadereffectsource_p.h | 11 +++++++++++ src/quick/items/qquicksprite_p.h | 11 +++++++++++ src/quick/items/qquickspriteengine_p.h | 11 +++++++++++ src/quick/items/qquickspritesequence_p.h | 11 +++++++++++ src/quick/items/qquickstateoperations_p.h | 11 +++++++++++ src/quick/items/qquicktext_p.h | 11 +++++++++++ src/quick/items/qquicktextedit_p.h | 11 +++++++++++ src/quick/items/qquicktextinput_p.h | 11 +++++++++++ src/quick/items/qquicktextnode_p.h | 11 +++++++++++ src/quick/items/qquicktextnodeengine_p.h | 11 +++++++++++ src/quick/items/qquicktranslate_p.h | 11 +++++++++++ src/quick/items/qquickview_p.h | 11 +++++++++++ src/quick/items/qquickwindowattached_p.h | 11 +++++++++++ src/quick/items/qquickwindowmodule_p.h | 11 +++++++++++ src/quick/qtquick2_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsggeometry_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgmaterialshader_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgnode_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgnodeupdater_p.h | 11 +++++++++++ src/quick/scenegraph/coreapi/qsgrenderer_p.h | 11 +++++++++++ src/quick/scenegraph/qsgadaptationlayer_p.h | 11 +++++++++++ src/quick/scenegraph/qsgcontext_p.h | 11 +++++++++++ src/quick/scenegraph/qsgcontextplugin_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultglyphnode_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultglyphnode_p_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultimagenode_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultlayer_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdefaultrectanglenode_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdistancefieldglyphnode_p.h | 11 +++++++++++ src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h | 11 +++++++++++ src/quick/scenegraph/qsgrenderloop_p.h | 11 +++++++++++ src/quick/scenegraph/qsgthreadedrenderloop_p.h | 11 +++++++++++ src/quick/scenegraph/qsgwindowsrenderloop_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgareaallocator_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgatlastexture_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgdefaultpainternode_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgdistancefieldutil_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgengine_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgshadersourcebuilder_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgtexture_p.h | 11 +++++++++++ src/quick/scenegraph/util/qsgtexturematerial_p.h | 11 +++++++++++ src/quick/util/qquickanimation_p.h | 11 +++++++++++ src/quick/util/qquickanimationcontroller_p.h | 11 +++++++++++ src/quick/util/qquickanimator_p.h | 11 +++++++++++ src/quick/util/qquickanimator_p_p.h | 11 +++++++++++ src/quick/util/qquickanimatorcontroller_p.h | 11 +++++++++++ src/quick/util/qquickanimatorjob_p.h | 11 +++++++++++ src/quick/util/qquickapplication_p.h | 11 +++++++++++ src/quick/util/qquickbehavior_p.h | 11 +++++++++++ src/quick/util/qquickfontloader_p.h | 11 +++++++++++ src/quick/util/qquickfontmetrics_p.h | 11 +++++++++++ src/quick/util/qquickpath_p.h | 11 +++++++++++ src/quick/util/qquickpathinterpolator_p.h | 11 +++++++++++ src/quick/util/qquickpixmapcache_p.h | 11 +++++++++++ src/quick/util/qquickpropertychanges_p.h | 11 +++++++++++ src/quick/util/qquicksmoothedanimation_p.h | 11 +++++++++++ src/quick/util/qquickspringanimation_p.h | 11 +++++++++++ src/quick/util/qquickstate_p.h | 11 +++++++++++ src/quick/util/qquickstatechangescript_p.h | 11 +++++++++++ src/quick/util/qquickstategroup_p.h | 11 +++++++++++ src/quick/util/qquickstyledtext_p.h | 11 +++++++++++ src/quick/util/qquicksvgparser_p.h | 11 +++++++++++ src/quick/util/qquicksystempalette_p.h | 11 +++++++++++ src/quick/util/qquicktextmetrics_p.h | 11 +++++++++++ src/quick/util/qquicktransition_p.h | 11 +++++++++++ src/quick/util/qquickutilmodule_p.h | 11 +++++++++++ src/quick/util/qquickvalidator_p.h | 11 +++++++++++ src/quick/util/qquickvaluetypes_p.h | 11 +++++++++++ src/quickwidgets/qquickwidget_p.h | 11 +++++++++++ tests/auto/qml/debugger/shared/debugutil_p.h | 11 +++++++++++ 252 files changed, 2772 insertions(+) diff --git a/src/imports/folderlistmodel/fileinfothread_p.h b/src/imports/folderlistmodel/fileinfothread_p.h index ee325fa50b..b375584ff8 100644 --- a/src/imports/folderlistmodel/fileinfothread_p.h +++ b/src/imports/folderlistmodel/fileinfothread_p.h @@ -34,6 +34,17 @@ #ifndef FILEINFOTHREAD_P_H #define FILEINFOTHREAD_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/imports/folderlistmodel/fileproperty_p.h b/src/imports/folderlistmodel/fileproperty_p.h index d514ad55bc..3ec8cc0c00 100644 --- a/src/imports/folderlistmodel/fileproperty_p.h +++ b/src/imports/folderlistmodel/fileproperty_p.h @@ -34,6 +34,17 @@ #ifndef FILEPROPERTY_P_H #define FILEPROPERTY_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/imports/settings/qqmlsettings_p.h b/src/imports/settings/qqmlsettings_p.h index a1207eb81c..d3eeaafb62 100644 --- a/src/imports/settings/qqmlsettings_p.h +++ b/src/imports/settings/qqmlsettings_p.h @@ -34,6 +34,17 @@ #ifndef QQMLSETTINGS_P_H #define QQMLSETTINGS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h index 5b54d0aff6..ebb5f43975 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h +++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKXMLLISTMODEL_H #define QQUICKXMLLISTMODEL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/particles/qquickage_p.h b/src/particles/qquickage_p.h index cf7d1d80cb..733385cb6f 100644 --- a/src/particles/qquickage_p.h +++ b/src/particles/qquickage_p.h @@ -33,6 +33,17 @@ #ifndef KILLAFFECTOR_H #define KILLAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickangledirection_p.h b/src/particles/qquickangledirection_p.h index eaae53ef0a..837afe83df 100644 --- a/src/particles/qquickangledirection_p.h +++ b/src/particles/qquickangledirection_p.h @@ -33,6 +33,17 @@ #ifndef QQuickANGLEDDIRECTION_H #define QQuickANGLEDDIRECTION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickdirection_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickcumulativedirection_p.h b/src/particles/qquickcumulativedirection_p.h index d9e19542cf..9756c92d05 100644 --- a/src/particles/qquickcumulativedirection_p.h +++ b/src/particles/qquickcumulativedirection_p.h @@ -33,6 +33,17 @@ #ifndef QQuickCUMULATIVEDIRECTION_P_H #define QQuickCUMULATIVEDIRECTION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickdirection_p.h" #include QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickcustomaffector_p.h b/src/particles/qquickcustomaffector_p.h index 931db97edf..a3388cc3e9 100644 --- a/src/particles/qquickcustomaffector_p.h +++ b/src/particles/qquickcustomaffector_p.h @@ -34,6 +34,17 @@ #ifndef CUSTOMAFFECTOR_H #define CUSTOMAFFECTOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickparticlesystem_p.h" #include "qquickparticleextruder_p.h" diff --git a/src/particles/qquickcustomparticle_p.h b/src/particles/qquickcustomparticle_p.h index 85e609a499..0e650534fb 100644 --- a/src/particles/qquickcustomparticle_p.h +++ b/src/particles/qquickcustomparticle_p.h @@ -33,6 +33,17 @@ #ifndef CUSTOM_PARTICLE_H #define CUSTOM_PARTICLE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticlepainter_p.h" #include #include diff --git a/src/particles/qquickdirection_p.h b/src/particles/qquickdirection_p.h index 9dacb6db0e..68b189fd1a 100644 --- a/src/particles/qquickdirection_p.h +++ b/src/particles/qquickdirection_p.h @@ -34,6 +34,17 @@ #ifndef VARYINGVECTOR_H #define VARYINGVECTOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/particles/qquickellipseextruder_p.h b/src/particles/qquickellipseextruder_p.h index bb766ac8de..b6606daa86 100644 --- a/src/particles/qquickellipseextruder_p.h +++ b/src/particles/qquickellipseextruder_p.h @@ -33,6 +33,17 @@ #ifndef ELLIPSEEXTRUDER_H #define ELLIPSEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleextruder_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickfriction_p.h b/src/particles/qquickfriction_p.h index 9f09e8ff97..b9b34e965c 100644 --- a/src/particles/qquickfriction_p.h +++ b/src/particles/qquickfriction_p.h @@ -33,6 +33,17 @@ #ifndef FRICTIONAFFECTOR_H #define FRICTIONAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickgravity_p.h b/src/particles/qquickgravity_p.h index b20de84607..03fa6f23fb 100644 --- a/src/particles/qquickgravity_p.h +++ b/src/particles/qquickgravity_p.h @@ -33,6 +33,17 @@ #ifndef GRAVITYAFFECTOR_H #define GRAVITYAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickgroupgoal_p.h b/src/particles/qquickgroupgoal_p.h index fe5d653ecc..3a61875411 100644 --- a/src/particles/qquickgroupgoal_p.h +++ b/src/particles/qquickgroupgoal_p.h @@ -33,6 +33,17 @@ #ifndef GROUPGOALAFFECTOR_H #define GROUPGOALAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickimageparticle_p.h b/src/particles/qquickimageparticle_p.h index 16832d76dc..a39253b28c 100644 --- a/src/particles/qquickimageparticle_p.h +++ b/src/particles/qquickimageparticle_p.h @@ -33,6 +33,17 @@ #ifndef ULTRAPARTICLE_H #define ULTRAPARTICLE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticlepainter_p.h" #include "qquickdirection_p.h" #include diff --git a/src/particles/qquickitemparticle_p.h b/src/particles/qquickitemparticle_p.h index 4f804a232a..92a9f23b79 100644 --- a/src/particles/qquickitemparticle_p.h +++ b/src/particles/qquickitemparticle_p.h @@ -33,6 +33,17 @@ #ifndef ITEMPARTICLE_H #define ITEMPARTICLE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticlepainter_p.h" #include #include diff --git a/src/particles/qquicklineextruder_p.h b/src/particles/qquicklineextruder_p.h index 77896e86e0..1e9db2ce52 100644 --- a/src/particles/qquicklineextruder_p.h +++ b/src/particles/qquicklineextruder_p.h @@ -33,6 +33,17 @@ #ifndef LINEEXTRUDER_H #define LINEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleextruder_p.h" class QQuickLineExtruder : public QQuickParticleExtruder diff --git a/src/particles/qquickmaskextruder_p.h b/src/particles/qquickmaskextruder_p.h index 9fc84dd5aa..5f7fb1ea86 100644 --- a/src/particles/qquickmaskextruder_p.h +++ b/src/particles/qquickmaskextruder_p.h @@ -33,6 +33,17 @@ #ifndef MASKEXTRUDER_H #define MASKEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleextruder_p.h" #include #include diff --git a/src/particles/qquickparticleaffector_p.h b/src/particles/qquickparticleaffector_p.h index 8dfc98dde7..4646c839d9 100644 --- a/src/particles/qquickparticleaffector_p.h +++ b/src/particles/qquickparticleaffector_p.h @@ -34,6 +34,17 @@ #ifndef PARTICLEAFFECTOR_H #define PARTICLEAFFECTOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickparticlesystem_p.h" #include "qquickparticleextruder_p.h" diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h index 68f01e3f6a..c938cedccc 100644 --- a/src/particles/qquickparticleemitter_p.h +++ b/src/particles/qquickparticleemitter_p.h @@ -34,6 +34,17 @@ #ifndef PARTICLEEMITTER_H #define PARTICLEEMITTER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include "qquickparticlesystem_p.h" diff --git a/src/particles/qquickparticleextruder_p.h b/src/particles/qquickparticleextruder_p.h index 6367c44429..79e1114d4b 100644 --- a/src/particles/qquickparticleextruder_p.h +++ b/src/particles/qquickparticleextruder_p.h @@ -34,6 +34,17 @@ #ifndef PARTICLEEXTRUDER_H #define PARTICLEEXTRUDER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/particles/qquickparticlegroup_p.h b/src/particles/qquickparticlegroup_p.h index cbc1932524..9929128915 100644 --- a/src/particles/qquickparticlegroup_p.h +++ b/src/particles/qquickparticlegroup_p.h @@ -32,6 +32,17 @@ ****************************************************************************/ #ifndef QQuickPARTICLEGROUP #define QQuickPARTICLEGROUP + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include #include "qquickparticlesystem_p.h" #include "qqmlparserstatus.h" diff --git a/src/particles/qquickparticlepainter_p.h b/src/particles/qquickparticlepainter_p.h index df6dc5c192..c15ebfc01c 100644 --- a/src/particles/qquickparticlepainter_p.h +++ b/src/particles/qquickparticlepainter_p.h @@ -34,6 +34,17 @@ #ifndef PARTICLE_H #define PARTICLE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/particles/qquickparticlesmodule_p.h b/src/particles/qquickparticlesmodule_p.h index 02168af8cd..2f43d63793 100644 --- a/src/particles/qquickparticlesmodule_p.h +++ b/src/particles/qquickparticlesmodule_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPARTICLESMODULE_H #define QQUICKPARTICLESMODULE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h index c8061916b5..96bd655793 100644 --- a/src/particles/qquickparticlesystem_p.h +++ b/src/particles/qquickparticlesystem_p.h @@ -34,6 +34,17 @@ #ifndef PARTICLESYSTEM_H #define PARTICLESYSTEM_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/particles/qquickpointattractor_p.h b/src/particles/qquickpointattractor_p.h index 31038aeba4..a1f5750841 100644 --- a/src/particles/qquickpointattractor_p.h +++ b/src/particles/qquickpointattractor_p.h @@ -33,6 +33,17 @@ #ifndef ATTRACTORAFFECTOR_H #define ATTRACTORAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickpointdirection_p.h b/src/particles/qquickpointdirection_p.h index 3975389a6b..26a4d28126 100644 --- a/src/particles/qquickpointdirection_p.h +++ b/src/particles/qquickpointdirection_p.h @@ -33,6 +33,17 @@ #ifndef POINTVECTOR_H #define POINTVECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickdirection_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickrectangleextruder_p.h b/src/particles/qquickrectangleextruder_p.h index 8ed535eaea..c286b60b14 100644 --- a/src/particles/qquickrectangleextruder_p.h +++ b/src/particles/qquickrectangleextruder_p.h @@ -34,6 +34,17 @@ #ifndef RECTANGLEEXTRUDER_H #define RECTANGLEEXTRUDER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickparticleextruder_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquickspritegoal_p.h b/src/particles/qquickspritegoal_p.h index 1ddfe14ac3..18ab6af156 100644 --- a/src/particles/qquickspritegoal_p.h +++ b/src/particles/qquickspritegoal_p.h @@ -33,6 +33,17 @@ #ifndef SPRITEGOALAFFECTOR_H #define SPRITEGOALAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" #include diff --git a/src/particles/qquicktargetdirection_p.h b/src/particles/qquicktargetdirection_p.h index bde6144d7f..75a53eec90 100644 --- a/src/particles/qquicktargetdirection_p.h +++ b/src/particles/qquicktargetdirection_p.h @@ -33,6 +33,17 @@ #ifndef DIRECTEDVECTOR_H #define DIRECTEDVECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickdirection_p.h" QT_BEGIN_NAMESPACE diff --git a/src/particles/qquicktrailemitter_p.h b/src/particles/qquicktrailemitter_p.h index fd11a07056..9f03a1107e 100644 --- a/src/particles/qquicktrailemitter_p.h +++ b/src/particles/qquicktrailemitter_p.h @@ -33,6 +33,17 @@ #ifndef FOLLOWEMITTER_H #define FOLLOWEMITTER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleemitter_p.h" #include "qquickparticleaffector_p.h" diff --git a/src/particles/qquickturbulence_p.h b/src/particles/qquickturbulence_p.h index 3c32bb6063..44122e154f 100644 --- a/src/particles/qquickturbulence_p.h +++ b/src/particles/qquickturbulence_p.h @@ -33,6 +33,17 @@ #ifndef TURBULENCEAFFECTOR_H #define TURBULENCEAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include "qquickparticleaffector_p.h" #include diff --git a/src/particles/qquickv4particledata_p.h b/src/particles/qquickv4particledata_p.h index c29c7e1134..5abeadf1fa 100644 --- a/src/particles/qquickv4particledata_p.h +++ b/src/particles/qquickv4particledata_p.h @@ -34,6 +34,17 @@ #ifndef QQuickV8PARTICLEDATA_H #define QQuickV8PARTICLEDATA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/particles/qquickwander_p.h b/src/particles/qquickwander_p.h index 93ad8516a7..67ebbebd96 100644 --- a/src/particles/qquickwander_p.h +++ b/src/particles/qquickwander_p.h @@ -33,6 +33,17 @@ #ifndef WANDERAFFECTOR_H #define WANDERAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include #include "qquickparticleaffector_p.h" diff --git a/src/particles/qtquickparticlesglobal_p.h b/src/particles/qtquickparticlesglobal_p.h index 783dd1895c..4c97247edd 100644 --- a/src/particles/qtquickparticlesglobal_p.h +++ b/src/particles/qtquickparticlesglobal_p.h @@ -34,6 +34,17 @@ #ifndef QTQUICKPARTICLESGLOBAL_P_H #define QTQUICKPARTICLESGLOBAL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include // We only have private exports from this library diff --git a/src/qml/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h index 5a3e9d2025..14dbf85a3d 100644 --- a/src/qml/animations/qabstractanimationjob_p.h +++ b/src/qml/animations/qabstractanimationjob_p.h @@ -34,6 +34,17 @@ #ifndef QABSTRACTANIMATIONJOB_P_H #define QABSTRACTANIMATIONJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h index fa8fc08bfe..c97a18f089 100644 --- a/src/qml/animations/qanimationgroupjob_p.h +++ b/src/qml/animations/qanimationgroupjob_p.h @@ -34,6 +34,17 @@ #ifndef QANIMATIONGROUPJOB_P_H #define QANIMATIONGROUPJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qabstractanimationjob_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/animations/qanimationjobutil_p.h b/src/qml/animations/qanimationjobutil_p.h index 3c38fc1599..d2aceb72d0 100644 --- a/src/qml/animations/qanimationjobutil_p.h +++ b/src/qml/animations/qanimationjobutil_p.h @@ -34,6 +34,17 @@ #ifndef QANIMATIONJOBUTIL_P_H #define QANIMATIONJOBUTIL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #define RETURN_IF_DELETED(func) \ { \ bool *prevWasDeleted = m_wasDeleted; \ diff --git a/src/qml/animations/qcontinuinganimationgroupjob_p.h b/src/qml/animations/qcontinuinganimationgroupjob_p.h index 3df0e676a7..b9827ab936 100644 --- a/src/qml/animations/qcontinuinganimationgroupjob_p.h +++ b/src/qml/animations/qcontinuinganimationgroupjob_p.h @@ -34,6 +34,17 @@ #ifndef QCONTINUINGANIMATIONGROUPJOB_P_H #define QCONTINUINGANIMATIONGROUPJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qanimationgroupjob_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/animations/qparallelanimationgroupjob_p.h b/src/qml/animations/qparallelanimationgroupjob_p.h index 1ac7709f21..83e5457cdd 100644 --- a/src/qml/animations/qparallelanimationgroupjob_p.h +++ b/src/qml/animations/qparallelanimationgroupjob_p.h @@ -34,6 +34,17 @@ #ifndef QPARALLELANIMATIONGROUPJOB_P_H #define QPARALLELANIMATIONGROUPJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qanimationgroupjob_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/animations/qpauseanimationjob_p.h b/src/qml/animations/qpauseanimationjob_p.h index b909c71f49..725e9b62e9 100644 --- a/src/qml/animations/qpauseanimationjob_p.h +++ b/src/qml/animations/qpauseanimationjob_p.h @@ -34,6 +34,17 @@ #ifndef QPAUSEANIMATIONJOB_P_H #define QPAUSEANIMATIONJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/animations/qsequentialanimationgroupjob_p.h b/src/qml/animations/qsequentialanimationgroupjob_p.h index 5286fda28a..dab086e851 100644 --- a/src/qml/animations/qsequentialanimationgroupjob_p.h +++ b/src/qml/animations/qsequentialanimationgroupjob_p.h @@ -34,6 +34,17 @@ #ifndef QSEQUENTIALANIMATIONGROUPJOB_P_H #define QSEQUENTIALANIMATIONGROUPJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h index 5617912081..9a659f4d72 100644 --- a/src/qml/compiler/qqmlirbuilder_p.h +++ b/src/qml/compiler/qqmlirbuilder_p.h @@ -33,6 +33,17 @@ #ifndef QQMLIRBUILDER_P_H #define QQMLIRBUILDER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 09ef7aad67..4bf9830014 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -33,6 +33,17 @@ #ifndef QQMLTYPECOMPILER_P_H #define QQMLTYPECOMPILER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index aec51cc19c..a7b0b06fe2 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -33,6 +33,17 @@ #ifndef QV4CODEGEN_P_H #define QV4CODEGEN_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qv4global_p.h" #include "qv4jsir_p.h" #include diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 48324fbbc4..0d6e4b15a7 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -33,6 +33,17 @@ #ifndef QV4COMPILEDDATA_P_H #define QV4COMPILEDDATA_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h index 3cf80a9791..d999a93f4f 100644 --- a/src/qml/compiler/qv4compiler_p.h +++ b/src/qml/compiler/qv4compiler_p.h @@ -33,6 +33,17 @@ #ifndef QV4COMPILER_P_H #define QV4COMPILER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qv4jsir_p.h" diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 6839c7f609..1eebcbbe7f 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -34,6 +34,17 @@ #ifndef QV4INSTR_MOTH_P_H #define QV4INSTR_MOTH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index ac1eaba740..947461f98e 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -34,6 +34,17 @@ #ifndef QV4ISEL_MOTH_P_H #define QV4ISEL_MOTH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h index 2b8aa7eb33..50ee955378 100644 --- a/src/qml/compiler/qv4isel_p.h +++ b/src/qml/compiler/qv4isel_p.h @@ -34,6 +34,17 @@ #ifndef QV4ISEL_P_H #define QV4ISEL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qv4global_p.h" #include "qv4jsir_p.h" #include diff --git a/src/qml/compiler/qv4isel_util_p.h b/src/qml/compiler/qv4isel_util_p.h index 521c345228..9c4ab63ba6 100644 --- a/src/qml/compiler/qv4isel_util_p.h +++ b/src/qml/compiler/qv4isel_util_p.h @@ -34,6 +34,17 @@ #ifndef QV4ISEL_UTIL_P_H #define QV4ISEL_UTIL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qv4value_p.h" #include "qv4jsir_p.h" diff --git a/src/qml/compiler/qv4ssa_p.h b/src/qml/compiler/qv4ssa_p.h index 3cfacaee27..d06774e803 100644 --- a/src/qml/compiler/qv4ssa_p.h +++ b/src/qml/compiler/qv4ssa_p.h @@ -34,6 +34,17 @@ #ifndef QV4SSA_P_H #define QV4SSA_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4jsir_p.h" #include diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h index ab74211d23..effae64967 100644 --- a/src/qml/jit/qv4assembler_p.h +++ b/src/qml/jit/qv4assembler_p.h @@ -33,6 +33,17 @@ #ifndef QV4ASSEMBLER_P_H #define QV4ASSEMBLER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qv4global_p.h" #include "private/qv4jsir_p.h" #include "private/qv4isel_p.h" diff --git a/src/qml/jit/qv4binop_p.h b/src/qml/jit/qv4binop_p.h index 4fa2369312..96c8281d57 100644 --- a/src/qml/jit/qv4binop_p.h +++ b/src/qml/jit/qv4binop_p.h @@ -33,6 +33,17 @@ #ifndef QV4BINOP_P_H #define QV4BINOP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h index 6e842f5fb4..29749f7492 100644 --- a/src/qml/jit/qv4isel_masm_p.h +++ b/src/qml/jit/qv4isel_masm_p.h @@ -33,6 +33,17 @@ #ifndef QV4ISEL_MASM_P_H #define QV4ISEL_MASM_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "private/qv4global_p.h" #include "private/qv4jsir_p.h" #include "private/qv4isel_p.h" diff --git a/src/qml/jit/qv4regalloc_p.h b/src/qml/jit/qv4regalloc_p.h index f0d78cf0d3..1b6eb34e0b 100644 --- a/src/qml/jit/qv4regalloc_p.h +++ b/src/qml/jit/qv4regalloc_p.h @@ -33,6 +33,17 @@ #ifndef QV4REGALLOC_P_H #define QV4REGALLOC_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4isel_p.h" #include "qv4ssa_p.h" diff --git a/src/qml/jit/qv4registerinfo_p.h b/src/qml/jit/qv4registerinfo_p.h index ebd8537a85..cfd7bcb071 100644 --- a/src/qml/jit/qv4registerinfo_p.h +++ b/src/qml/jit/qv4registerinfo_p.h @@ -34,6 +34,17 @@ #ifndef QV4REGISTERINFO_P_H #define QV4REGISTERINFO_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h index 76c768e4f9..1e62b23fe4 100644 --- a/src/qml/jit/qv4targetplatform_p.h +++ b/src/qml/jit/qv4targetplatform_p.h @@ -34,6 +34,17 @@ #ifndef QV4TARGETPLATFORM_P_H #define QV4TARGETPLATFORM_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #if ENABLE(ASSEMBLER) diff --git a/src/qml/jit/qv4unop_p.h b/src/qml/jit/qv4unop_p.h index f96898ce1b..69a70062b8 100644 --- a/src/qml/jit/qv4unop_p.h +++ b/src/qml/jit/qv4unop_p.h @@ -33,6 +33,17 @@ #ifndef QV4UNOP_P_H #define QV4UNOP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsapi/qjsvalueiterator_p.h b/src/qml/jsapi/qjsvalueiterator_p.h index b0d0b2efda..dfc5e18cd6 100644 --- a/src/qml/jsapi/qjsvalueiterator_p.h +++ b/src/qml/jsapi/qjsvalueiterator_p.h @@ -34,6 +34,17 @@ #ifndef QJSVALUEITERATOR_P_H #define QJSVALUEITERATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qjsvalue.h" #include "private/qv4objectiterator_p.h" diff --git a/src/qml/jsruntime/qv4alloca_p.h b/src/qml/jsruntime/qv4alloca_p.h index a4537868e2..df40a018ba 100644 --- a/src/qml/jsruntime/qv4alloca_p.h +++ b/src/qml/jsruntime/qv4alloca_p.h @@ -34,6 +34,17 @@ #ifndef QV4_ALLOCA_H #define QV4_ALLOCA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #if defined(Q_OS_WIN) diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h index 98a600fab6..7a9c4b1d51 100644 --- a/src/qml/jsruntime/qv4argumentsobject_p.h +++ b/src/qml/jsruntime/qv4argumentsobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARGUMENTSOBJECTS_H #define QV4ARGUMENTSOBJECTS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h index 19fd74465c..56f45b5a72 100644 --- a/src/qml/jsruntime/qv4arraybuffer_p.h +++ b/src/qml/jsruntime/qv4arraybuffer_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYBUFFER_H #define QV4ARRAYBUFFER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h index cca5bf7f20..48d2b9dbbf 100644 --- a/src/qml/jsruntime/qv4arraydata_p.h +++ b/src/qml/jsruntime/qv4arraydata_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYDATA_H #define QV4ARRAYDATA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" #include "qv4property_p.h" diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h index 422a0de675..afd8080fa3 100644 --- a/src/qml/jsruntime/qv4arrayobject_p.h +++ b/src/qml/jsruntime/qv4arrayobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ARRAYOBJECT_H #define QV4ARRAYOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h index 77b5a74fde..203c8ba4ea 100644 --- a/src/qml/jsruntime/qv4booleanobject_p.h +++ b/src/qml/jsruntime/qv4booleanobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4BOOLEANOBJECT_H #define QV4BOOLEANOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h index 2807d1e29c..6c360e7dda 100644 --- a/src/qml/jsruntime/qv4context_p.h +++ b/src/qml/jsruntime/qv4context_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_ENVIRONMENT_H #define QMLJS_ENVIRONMENT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4dataview_p.h b/src/qml/jsruntime/qv4dataview_p.h index 37a8363645..26347766d3 100644 --- a/src/qml/jsruntime/qv4dataview_p.h +++ b/src/qml/jsruntime/qv4dataview_p.h @@ -33,6 +33,17 @@ #ifndef QV4DATAVIEW_H #define QV4DATAVIEW_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h index a324e216e4..2eaa837666 100644 --- a/src/qml/jsruntime/qv4dateobject_p.h +++ b/src/qml/jsruntime/qv4dateobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4DATEOBJECT_P_H #define QV4DATEOBJECT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 86faba45f7..9b07a31f26 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -34,6 +34,17 @@ #ifndef DEBUGGING_H #define DEBUGGING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index ffcd904013..e94b417908 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -33,6 +33,17 @@ #ifndef QV4ENGINE_H #define QV4ENGINE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "private/qv4isel_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h index 7f3babaa79..336050ab2b 100644 --- a/src/qml/jsruntime/qv4errorobject_p.h +++ b/src/qml/jsruntime/qv4errorobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4ERROROBJECT_H #define QV4ERROROBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include "qv4string_p.h" diff --git a/src/qml/jsruntime/qv4executableallocator_p.h b/src/qml/jsruntime/qv4executableallocator_p.h index 0d07e3c1bd..bb63d423a6 100644 --- a/src/qml/jsruntime/qv4executableallocator_p.h +++ b/src/qml/jsruntime/qv4executableallocator_p.h @@ -34,6 +34,17 @@ #ifndef QV4EXECUTABLEALLOCATOR_H #define QV4EXECUTABLEALLOCATOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index 534aa1b750..0e1216a45b 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -33,6 +33,17 @@ #ifndef QV4FUNCTION_H #define QV4FUNCTION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 182f06f74e..896bd2a4d2 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4FUNCTIONOBJECT_H #define QV4FUNCTIONOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4function_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index 759c6795e2..01a21ea06d 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -34,6 +34,17 @@ #ifndef QV4GLOBAL_H #define QV4GLOBAL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) #define V4_BOOTSTRAP #endif diff --git a/src/qml/jsruntime/qv4globalobject_p.h b/src/qml/jsruntime/qv4globalobject_p.h index ba1d5d2e0b..ced85621de 100644 --- a/src/qml/jsruntime/qv4globalobject_p.h +++ b/src/qml/jsruntime/qv4globalobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4GLOBALOBJECT_H #define QV4GLOBALOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4identifier_p.h b/src/qml/jsruntime/qv4identifier_p.h index 7937391ff7..605b06c685 100644 --- a/src/qml/jsruntime/qv4identifier_p.h +++ b/src/qml/jsruntime/qv4identifier_p.h @@ -33,6 +33,17 @@ #ifndef QV4IDENTIFIER_H #define QV4IDENTIFIER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h index d91ce623c1..3af9db963e 100644 --- a/src/qml/jsruntime/qv4identifiertable_p.h +++ b/src/qml/jsruntime/qv4identifiertable_p.h @@ -33,6 +33,17 @@ #ifndef QV4IDENTIFIERTABLE_H #define QV4IDENTIFIERTABLE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4identifier_p.h" #include "qv4string_p.h" #include "qv4engine_p.h" diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index 342870fcd6..5b91925ede 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -33,6 +33,17 @@ #ifndef QV4INTERNALCLASS_H #define QV4INTERNALCLASS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4jsonobject_p.h b/src/qml/jsruntime/qv4jsonobject_p.h index 61d44f206e..6a6e863bf6 100644 --- a/src/qml/jsruntime/qv4jsonobject_p.h +++ b/src/qml/jsruntime/qv4jsonobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4JSONOBJECT_H #define QV4JSONOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include #include diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index 232e909c48..77ad1a7b65 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -33,6 +33,17 @@ #ifndef QV4LOOKUP_H #define QV4LOOKUP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4runtime_p.h" #include "qv4engine_p.h" diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index 413181309f..94df30944b 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_MANAGED_H #define QMLJS_MANAGED_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" #include diff --git a/src/qml/jsruntime/qv4math_p.h b/src/qml/jsruntime/qv4math_p.h index 4f550752aa..cf627bcc5d 100644 --- a/src/qml/jsruntime/qv4math_p.h +++ b/src/qml/jsruntime/qv4math_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_MATH_H #define QMLJS_MATH_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4mathobject_p.h b/src/qml/jsruntime/qv4mathobject_p.h index ff4fb12ee6..a233f74367 100644 --- a/src/qml/jsruntime/qv4mathobject_p.h +++ b/src/qml/jsruntime/qv4mathobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4MATHOBJECT_H #define QV4MATHOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4memberdata_p.h b/src/qml/jsruntime/qv4memberdata_p.h index 50b8ddb3d1..12f407e869 100644 --- a/src/qml/jsruntime/qv4memberdata_p.h +++ b/src/qml/jsruntime/qv4memberdata_p.h @@ -33,6 +33,17 @@ #ifndef QV4MEMBERDATA_H #define QV4MEMBERDATA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h index 04798d31fc..cc5033531e 100644 --- a/src/qml/jsruntime/qv4numberobject_p.h +++ b/src/qml/jsruntime/qv4numberobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4NUMBEROBJECT_H #define QV4NUMBEROBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index b87e8fe0ad..5c660f7e3f 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -33,6 +33,17 @@ #ifndef QV4_OBJECT_H #define QV4_OBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4managed_p.h" #include "qv4memberdata_p.h" #include "qv4arraydata_p.h" diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index e34b641be9..877b34c22d 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -33,6 +33,17 @@ #ifndef QV4OBJECTITERATOR_H #define QV4OBJECTITERATOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4object_p.h" diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h index d571e50cd4..ec829e4bd2 100644 --- a/src/qml/jsruntime/qv4objectproto_p.h +++ b/src/qml/jsruntime/qv4objectproto_p.h @@ -33,6 +33,17 @@ #ifndef QV4ECMAOBJECTS_P_H #define QV4ECMAOBJECTS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h index 67a76742d1..80b4ecdea8 100644 --- a/src/qml/jsruntime/qv4persistent_p.h +++ b/src/qml/jsruntime/qv4persistent_p.h @@ -33,6 +33,17 @@ #ifndef QV4PERSISTENT_H #define QV4PERSISTENT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4value_p.h" #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index 505d393a3d..6c54fc9bbd 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -34,6 +34,17 @@ #ifndef QV4PROFILING_H #define QV4PROFILING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4function_p.h" diff --git a/src/qml/jsruntime/qv4property_p.h b/src/qml/jsruntime/qv4property_p.h index db8c6017e1..8ddb4cf6f7 100644 --- a/src/qml/jsruntime/qv4property_p.h +++ b/src/qml/jsruntime/qv4property_p.h @@ -33,6 +33,17 @@ #ifndef QV4PROPERTYDESCRIPTOR_H #define QV4PROPERTYDESCRIPTOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h index af6e346ea8..928362a995 100644 --- a/src/qml/jsruntime/qv4regexp_p.h +++ b/src/qml/jsruntime/qv4regexp_p.h @@ -33,6 +33,17 @@ #ifndef QV4REGEXP_H #define QV4REGEXP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index 4f803df9c8..81ea9cf14b 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4REGEXPOBJECT_H #define QV4REGEXPOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4runtime_p.h" #include "qv4engine_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h index f597e4b2e3..571abac21e 100644 --- a/src/qml/jsruntime/qv4runtime_p.h +++ b/src/qml/jsruntime/qv4runtime_p.h @@ -33,6 +33,17 @@ #ifndef QMLJS_RUNTIME_H #define QMLJS_RUNTIME_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4value_p.h" #include "qv4context_p.h" diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index 0c79897015..101d3dcb3c 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -33,6 +33,17 @@ #ifndef QV4SCOPEDVALUE_P_H #define QV4SCOPEDVALUE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4engine_p.h" #include "qv4value_p.h" #include "qv4persistent_p.h" diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 63e8239342..4fecf62082 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -33,6 +33,17 @@ #ifndef QV4SCRIPT_H #define QV4SCRIPT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include "qv4engine_p.h" #include "qv4functionobject_p.h" diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h index 8496fc32e7..136f26a25c 100644 --- a/src/qml/jsruntime/qv4sparsearray_p.h +++ b/src/qml/jsruntime/qv4sparsearray_p.h @@ -34,6 +34,17 @@ #ifndef QV4SPARSEARRAY_H #define QV4SPARSEARRAY_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" #include diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 93a25d7ed5..85433369fc 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -33,6 +33,17 @@ #ifndef QV4STRING_H #define QV4STRING_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qv4managed_p.h" diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h index 86d77c726a..7d4f78d3c5 100644 --- a/src/qml/jsruntime/qv4stringobject_p.h +++ b/src/qml/jsruntime/qv4stringobject_p.h @@ -33,6 +33,17 @@ #ifndef QV4STRINGOBJECT_P_H #define QV4STRINGOBJECT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h index 74ee285da4..67e04c8ac0 100644 --- a/src/qml/jsruntime/qv4typedarray_p.h +++ b/src/qml/jsruntime/qv4typedarray_p.h @@ -33,6 +33,17 @@ #ifndef QV4TYPEDARRAY_H #define QV4TYPEDARRAY_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4object_p.h" #include "qv4functionobject_p.h" #include "qv4arraybuffer_p.h" diff --git a/src/qml/jsruntime/qv4util_p.h b/src/qml/jsruntime/qv4util_p.h index f9ae37855e..329831f134 100644 --- a/src/qml/jsruntime/qv4util_p.h +++ b/src/qml/jsruntime/qv4util_p.h @@ -33,6 +33,17 @@ #ifndef QV4UTIL_H #define QV4UTIL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qv4global_p.h" QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 14094878d8..5e38873b49 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -33,6 +33,17 @@ #ifndef QV4VALUE_P_H #define QV4VALUE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/jsruntime/qv4vme_moth_p.h b/src/qml/jsruntime/qv4vme_moth_p.h index 55cac75a66..c0421022d2 100644 --- a/src/qml/jsruntime/qv4vme_moth_p.h +++ b/src/qml/jsruntime/qv4vme_moth_p.h @@ -34,6 +34,17 @@ #ifndef QV4VME_MOTH_P_H #define QV4VME_MOTH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h index a93e4191b0..a3db71fee1 100644 --- a/src/qml/memory/qv4heap_p.h +++ b/src/qml/memory/qv4heap_p.h @@ -33,6 +33,17 @@ #ifndef QV4HEAP_P_H #define QV4HEAP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index c77d5e503d..3543da0907 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -34,6 +34,17 @@ #ifndef QV4GC_H #define QV4GC_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/parser/qqmljsglobal_p.h b/src/qml/parser/qqmljsglobal_p.h index fe2cbe7d1d..48ba2b034b 100644 --- a/src/qml/parser/qqmljsglobal_p.h +++ b/src/qml/parser/qqmljsglobal_p.h @@ -33,6 +33,17 @@ #ifndef QQMLJSGLOBAL_P_H #define QQMLJSGLOBAL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #ifdef QT_CREATOR diff --git a/src/qml/qml/qqmlaccessors_p.h b/src/qml/qml/qqmlaccessors_p.h index 24cd0b60cb..8b0a587740 100644 --- a/src/qml/qml/qqmlaccessors_p.h +++ b/src/qml/qml/qqmlaccessors_p.h @@ -34,6 +34,17 @@ #ifndef QQMLACCESSORS_P_H #define QQMLACCESSORS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/qml/qqmlcomponentattached_p.h b/src/qml/qml/qqmlcomponentattached_p.h index b6ad3dec00..fa103e7fce 100644 --- a/src/qml/qml/qqmlcomponentattached_p.h +++ b/src/qml/qml/qqmlcomponentattached_p.h @@ -34,6 +34,17 @@ #ifndef QQMLCOMPONENTATTACHED_P_H #define QQMLCOMPONENTATTACHED_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index d09ae21f56..b7212648ab 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -34,6 +34,17 @@ #ifndef QQMLGLOBAL_H #define QQMLGLOBAL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h index 3d2ed307d1..0c2fbbdb14 100644 --- a/src/qml/qml/qqmllocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -34,6 +34,17 @@ #ifndef QQMLLOCALE_H #define QQMLLOCALE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/qml/qqmlmemoryprofiler_p.h b/src/qml/qml/qqmlmemoryprofiler_p.h index 98977f9db5..77008bd448 100644 --- a/src/qml/qml/qqmlmemoryprofiler_p.h +++ b/src/qml/qml/qqmlmemoryprofiler_p.h @@ -34,6 +34,17 @@ #ifndef QQMLMEMORYPROFILER_H #define QQMLMEMORYPROFILER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h index 90902c089d..ac0aab892f 100644 --- a/src/qml/qml/qqmlnotifier_p.h +++ b/src/qml/qml/qqmlnotifier_p.h @@ -34,6 +34,17 @@ #ifndef QQMLNOTIFIER_P_H #define QQMLNOTIFIER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qqmldata_p.h" #include #include diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index 433bbf5bf2..620ae75f53 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -33,6 +33,17 @@ #ifndef QQMLOBJECTCREATOR_P_H #define QQMLOBJECTCREATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h index 99e2f79db4..9728220b5a 100644 --- a/src/qml/qml/qqmlopenmetaobject_p.h +++ b/src/qml/qml/qqmlopenmetaobject_p.h @@ -34,6 +34,17 @@ #ifndef QQMLOPENMETAOBJECT_H #define QQMLOPENMETAOBJECT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/qml/qqmlplatform_p.h b/src/qml/qml/qqmlplatform_p.h index 363341c89e..c1a481a439 100644 --- a/src/qml/qml/qqmlplatform_p.h +++ b/src/qml/qml/qqmlplatform_p.h @@ -34,6 +34,17 @@ #ifndef QQMLPLATFORM_P_H #define QQMLPLATFORM_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/qml/qqmlscriptstring_p.h b/src/qml/qml/qqmlscriptstring_p.h index 24bfdcdd4e..aa0a1e5695 100644 --- a/src/qml/qml/qqmlscriptstring_p.h +++ b/src/qml/qml/qqmlscriptstring_p.h @@ -34,6 +34,17 @@ #ifndef QQMLSCRIPTSTRING_P_H #define QQMLSCRIPTSTRING_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qqmlscriptstring.h" #include diff --git a/src/qml/qml/qqmltypenotavailable_p.h b/src/qml/qml/qqmltypenotavailable_p.h index f69a4f8732..324e07b80c 100644 --- a/src/qml/qml/qqmltypenotavailable_p.h +++ b/src/qml/qml/qqmltypenotavailable_p.h @@ -34,6 +34,17 @@ #ifndef QQMLTYPENOTAVAILABLE_H #define QQMLTYPENOTAVAILABLE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/types/qqmlbind_p.h b/src/qml/types/qqmlbind_p.h index 6d7eea4014..ac1cb0f32f 100644 --- a/src/qml/types/qqmlbind_p.h +++ b/src/qml/types/qqmlbind_p.h @@ -34,6 +34,17 @@ #ifndef QQMLBIND_H #define QQMLBIND_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/types/qqmlconnections_p.h b/src/qml/types/qqmlconnections_p.h index 170f47b54f..234c5061a7 100644 --- a/src/qml/types/qqmlconnections_p.h +++ b/src/qml/types/qqmlconnections_p.h @@ -34,6 +34,17 @@ #ifndef QQMLCONNECTIONS_H #define QQMLCONNECTIONS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h index e222fadec2..6af052c1b4 100644 --- a/src/qml/types/qqmldelegatemodel_p.h +++ b/src/qml/types/qqmldelegatemodel_p.h @@ -34,6 +34,17 @@ #ifndef QQMLDATAMODEL_P_H #define QQMLDATAMODEL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/types/qqmlinstantiator_p.h b/src/qml/types/qqmlinstantiator_p.h index aa098817cd..842a0b947b 100644 --- a/src/qml/types/qqmlinstantiator_p.h +++ b/src/qml/types/qqmlinstantiator_p.h @@ -34,6 +34,17 @@ #ifndef QQMLINSTANTIATOR_P_H #define QQMLINSTANTIATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h index 21de392234..b3ae806c5e 100644 --- a/src/qml/types/qqmllistmodel_p.h +++ b/src/qml/types/qqmllistmodel_p.h @@ -34,6 +34,17 @@ #ifndef QQMLLISTMODEL_H #define QQMLLISTMODEL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/types/qqmlmodelsmodule_p.h b/src/qml/types/qqmlmodelsmodule_p.h index 7fd02b600a..3471a16684 100644 --- a/src/qml/types/qqmlmodelsmodule_p.h +++ b/src/qml/types/qqmlmodelsmodule_p.h @@ -34,6 +34,17 @@ #ifndef QQMLMODELSMODULE_H #define QQMLMODELSMODULE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/types/qqmlobjectmodel_p.h b/src/qml/types/qqmlobjectmodel_p.h index f6ab2a19e2..868f736147 100644 --- a/src/qml/types/qqmlobjectmodel_p.h +++ b/src/qml/types/qqmlobjectmodel_p.h @@ -34,6 +34,17 @@ #ifndef QQMLINSTANCEMODEL_P_H #define QQMLINSTANCEMODEL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qml/types/qqmltimer_p.h b/src/qml/types/qqmltimer_p.h index 0da81b481f..2dcf827926 100644 --- a/src/qml/types/qqmltimer_p.h +++ b/src/qml/types/qqmltimer_p.h @@ -34,6 +34,17 @@ #ifndef QQMLTIMER_H #define QQMLTIMER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qml/types/qquickpackage_p.h b/src/qml/types/qquickpackage_p.h index 6398e6a4fa..1c7f255eb4 100644 --- a/src/qml/types/qquickpackage_p.h +++ b/src/qml/types/qquickpackage_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPACKAGE_H #define QQUICKPACKAGE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qml/util/qqmladaptormodel_p.h b/src/qml/util/qqmladaptormodel_p.h index b0f211a0f2..9da04462aa 100644 --- a/src/qml/util/qqmladaptormodel_p.h +++ b/src/qml/util/qqmladaptormodel_p.h @@ -34,6 +34,17 @@ #ifndef QQMLADAPTORMODEL_P_H #define QQMLADAPTORMODEL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "private/qqmllistaccessor_p.h" diff --git a/src/qml/util/qqmllistaccessor_p.h b/src/qml/util/qqmllistaccessor_p.h index cf0ec52be4..1d9069118a 100644 --- a/src/qml/util/qqmllistaccessor_p.h +++ b/src/qml/util/qqmllistaccessor_p.h @@ -34,6 +34,17 @@ #ifndef QQMLLISTACCESSOR_H #define QQMLLISTACCESSOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/qmltest/qtestoptions_p.h b/src/qmltest/qtestoptions_p.h index af6764f98b..48d1c3f473 100644 --- a/src/qmltest/qtestoptions_p.h +++ b/src/qmltest/qtestoptions_p.h @@ -34,6 +34,17 @@ #ifndef QTESTOPTIONS_P_H #define QTESTOPTIONS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h index 338464c6b3..0cba644cba 100644 --- a/src/qmltest/quicktestevent_p.h +++ b/src/qmltest/quicktestevent_p.h @@ -34,6 +34,17 @@ #ifndef QUICKTESTEVENT_P_H #define QUICKTESTEVENT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h index 45df83621f..ee38c07498 100644 --- a/src/qmltest/quicktestresult_p.h +++ b/src/qmltest/quicktestresult_p.h @@ -34,6 +34,17 @@ #ifndef QUICKTESTRESULT_P_H #define QUICKTESTRESULT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/accessible/qaccessiblequickitem_p.h b/src/quick/accessible/qaccessiblequickitem_p.h index deefb10e60..1ec569731e 100644 --- a/src/quick/accessible/qaccessiblequickitem_p.h +++ b/src/quick/accessible/qaccessiblequickitem_p.h @@ -34,6 +34,17 @@ #ifndef QACCESSIBLEQUICKITEM_H #define QACCESSIBLEQUICKITEM_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/accessible/qaccessiblequickview_p.h b/src/quick/accessible/qaccessiblequickview_p.h index f08b78528d..049fa385ba 100644 --- a/src/quick/accessible/qaccessiblequickview_p.h +++ b/src/quick/accessible/qaccessiblequickview_p.h @@ -34,6 +34,17 @@ #ifndef QAccessibleQuickView_H #define QAccessibleQuickView_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/accessible/qquickaccessiblefactory_p.h b/src/quick/accessible/qquickaccessiblefactory_p.h index f7936b140e..98512f9fb4 100644 --- a/src/quick/accessible/qquickaccessiblefactory_p.h +++ b/src/quick/accessible/qquickaccessiblefactory_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKACCESSIBLEFACTORY_H #define QQUICKACCESSIBLEFACTORY_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h index b7a7f6db71..0010862044 100644 --- a/src/quick/items/context2d/qquickcanvascontext_p.h +++ b/src/quick/items/context2d/qquickcanvascontext_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCANVASCONTEXT_P_H #define QQUICKCANVASCONTEXT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 4a1a59d61e..a32ce5389d 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCANVASITEM_P_H #define QQUICKCANVASITEM_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 78fa26d791..94762fe7a2 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCONTEXT2D_P_H #define QQUICKCONTEXT2D_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h index 54bf209c79..48cf21ad71 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCONTEXT2DCOMMANDBUFFER_P_H #define QQUICKCONTEXT2DCOMMANDBUFFER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickcontext2d_p.h" diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h index 88d7b6858f..50ce95e19b 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture_p.h +++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCONTEXT2DTEXTURE_P_H #define QQUICKCONTEXT2DTEXTURE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickcanvasitem_p.h" #include "qquickcontext2d_p.h" diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h index d923313a28..781261c8d2 100644 --- a/src/quick/items/context2d/qquickcontext2dtile_p.h +++ b/src/quick/items/context2d/qquickcontext2dtile_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCONTEXT2DTILE_P_H #define QQUICKCONTEXT2DTILE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickcontext2d_p.h" #include diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h index be78e74b19..617b5aa886 100644 --- a/src/quick/items/qquickaccessibleattached_p.h +++ b/src/quick/items/qquickaccessibleattached_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKACCESSIBLEATTACHED_H #define QQUICKACCESSIBLEATTACHED_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h index a2328162e5..4157e4bf6d 100644 --- a/src/quick/items/qquickanchors_p.h +++ b/src/quick/items/qquickanchors_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANCHORS_P_H #define QQUICKANCHORS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h index 409933817f..42f2d4cb64 100644 --- a/src/quick/items/qquickanimatedimage_p.h +++ b/src/quick/items/qquickanimatedimage_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATEDIMAGE_P_H #define QQUICKANIMATEDIMAGE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimage_p.h" #ifndef QT_NO_MOVIE diff --git a/src/quick/items/qquickanimatedsprite_p.h b/src/quick/items/qquickanimatedsprite_p.h index a10ebb4b73..fa022af4ee 100644 --- a/src/quick/items/qquickanimatedsprite_p.h +++ b/src/quick/items/qquickanimatedsprite_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATEDSPRITE_P_H #define QQUICKANIMATEDSPRITE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquickborderimage_p.h b/src/quick/items/qquickborderimage_p.h index 8a88e3d0d3..02e01dedd5 100644 --- a/src/quick/items/qquickborderimage_p.h +++ b/src/quick/items/qquickborderimage_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKBORDERIMAGE_P_H #define QQUICKBORDERIMAGE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimagebase_p.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickclipnode_p.h b/src/quick/items/qquickclipnode_p.h index 2e7fa1f495..70dbf149b2 100644 --- a/src/quick/items/qquickclipnode_p.h +++ b/src/quick/items/qquickclipnode_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKCLIPNODE_P_H #define QQUICKCLIPNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickdrag_p.h b/src/quick/items/qquickdrag_p.h index 2b4b2a51d4..5599831b6f 100644 --- a/src/quick/items/qquickdrag_p.h +++ b/src/quick/items/qquickdrag_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKDRAG_P_H #define QQUICKDRAG_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h index 3223f4203b..127b3bd4a3 100644 --- a/src/quick/items/qquickdroparea_p.h +++ b/src/quick/items/qquickdroparea_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKDROPAREA_P_H #define QQUICKDROPAREA_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h index c974da66d6..ac072f0e50 100644 --- a/src/quick/items/qquickflickable_p.h +++ b/src/quick/items/qquickflickable_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFLICKABLE_P_H #define QQUICKFLICKABLE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickflickablebehavior_p.h b/src/quick/items/qquickflickablebehavior_p.h index a79297894c..69fca4d0fb 100644 --- a/src/quick/items/qquickflickablebehavior_p.h +++ b/src/quick/items/qquickflickablebehavior_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFLICKABLEBEHAVIOR_H #define QQUICKFLICKABLEBEHAVIOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* ### Platform specific flickable mechanics are defined either here, or in mkspec files. Long-term (QtQuick 3) Flickable needs to allow such mechanic details to be controlled via QML so that platforms can easily diff --git a/src/quick/items/qquickflipable_p.h b/src/quick/items/qquickflipable_p.h index 31bfe97923..93610031f6 100644 --- a/src/quick/items/qquickflipable_p.h +++ b/src/quick/items/qquickflipable_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFLIPABLE_P_H #define QQUICKFLIPABLE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickfocusscope_p.h b/src/quick/items/qquickfocusscope_p.h index b0e92cb312..eb42cf83b5 100644 --- a/src/quick/items/qquickfocusscope_p.h +++ b/src/quick/items/qquickfocusscope_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFOCUSSCOPE_P_H #define QQUICKFOCUSSCOPE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickgridview_p.h b/src/quick/items/qquickgridview_p.h index 389ef27585..8c93f4ce97 100644 --- a/src/quick/items/qquickgridview_p.h +++ b/src/quick/items/qquickgridview_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKGRIDVIEW_P_H #define QQUICKGRIDVIEW_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitemview_p.h" diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h index 421360bd35..82bd005463 100644 --- a/src/quick/items/qquickimage_p.h +++ b/src/quick/items/qquickimage_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKIMAGE_P_H #define QQUICKIMAGE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimagebase_p.h" #include diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h index 98943a235c..b6d592c826 100644 --- a/src/quick/items/qquickimagebase_p.h +++ b/src/quick/items/qquickimagebase_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKIMAGEBASE_P_H #define QQUICKIMAGEBASE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" #include diff --git a/src/quick/items/qquickimplicitsizeitem_p.h b/src/quick/items/qquickimplicitsizeitem_p.h index 3499cf22c5..1acbb7791d 100644 --- a/src/quick/items/qquickimplicitsizeitem_p.h +++ b/src/quick/items/qquickimplicitsizeitem_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKIMPLICITSIZEITEM_H #define QQUICKIMPLICITSIZEITEM_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickpainteditem.h" #include diff --git a/src/quick/items/qquickitemanimation_p.h b/src/quick/items/qquickitemanimation_p.h index 9f0b3dccb8..338af46ecb 100644 --- a/src/quick/items/qquickitemanimation_p.h +++ b/src/quick/items/qquickitemanimation_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKITEMANIMATION_H #define QQUICKITEMANIMATION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickitemsmodule_p.h b/src/quick/items/qquickitemsmodule_p.h index a7442e972a..b04e9ff23f 100644 --- a/src/quick/items/qquickitemsmodule_p.h +++ b/src/quick/items/qquickitemsmodule_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKITEMSMODULE_P_H #define QQUICKITEMSMODULE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h index 3e28ff336d..789b5a3e55 100644 --- a/src/quick/items/qquickitemview_p.h +++ b/src/quick/items/qquickitemview_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKITEMVIEW_P_H #define QQUICKITEMVIEW_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickflickable_p.h" #include #include diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h index 0931db4e56..8af703eb03 100644 --- a/src/quick/items/qquickitemview_p_p.h +++ b/src/quick/items/qquickitemview_p_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKITEMVIEW_P_P_H #define QQUICKITEMVIEW_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitemview_p.h" #include "qquickitemviewtransition_p.h" #include "qquickflickable_p_p.h" diff --git a/src/quick/items/qquickitemviewtransition_p.h b/src/quick/items/qquickitemviewtransition_p.h index 6f93697cc5..b4c2705fd3 100644 --- a/src/quick/items/qquickitemviewtransition_p.h +++ b/src/quick/items/qquickitemviewtransition_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKITEMVIEWTRANSITION_P_P_H #define QQUICKITEMVIEWTRANSITION_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h index 7f64e12bba..5f8be2ab02 100644 --- a/src/quick/items/qquicklistview_p.h +++ b/src/quick/items/qquicklistview_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKLISTVIEW_P_H #define QQUICKLISTVIEW_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitemview_p.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickloader_p.h b/src/quick/items/qquickloader_p.h index 6ed4f2437b..e9d765fa5c 100644 --- a/src/quick/items/qquickloader_p.h +++ b/src/quick/items/qquickloader_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKLOADER_P_H #define QQUICKLOADER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h index 4ad14e6bdd..e3cbf2553c 100644 --- a/src/quick/items/qquickmousearea_p.h +++ b/src/quick/items/qquickmousearea_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKMOUSEAREA_P_H #define QQUICKMOUSEAREA_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include #include diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h index e5c547da81..792724a9c8 100644 --- a/src/quick/items/qquickmultipointtoucharea_p.h +++ b/src/quick/items/qquickmultipointtoucharea_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKMULTIPOINTTOUCHAREA_H #define QQUICKMULTIPOINTTOUCHAREA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include "qevent.h" diff --git a/src/quick/items/qquickpainteditem_p.h b/src/quick/items/qquickpainteditem_p.h index e77254c0e6..d0e4f9481d 100644 --- a/src/quick/items/qquickpainteditem_p.h +++ b/src/quick/items/qquickpainteditem_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPAINTEDITEM_P_P_H #define QQUICKPAINTEDITEM_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem_p.h" #include diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h index 0f2e4a956c..0973d65a58 100644 --- a/src/quick/items/qquickpathview_p.h +++ b/src/quick/items/qquickpathview_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPATHVIEW_P_H #define QQUICKPATHVIEW_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickpincharea_p.h b/src/quick/items/qquickpincharea_p.h index 602b2804cc..d623a70010 100644 --- a/src/quick/items/qquickpincharea_p.h +++ b/src/quick/items/qquickpincharea_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPINCHAREA_H #define QQUICKPINCHAREA_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickpositioners_p.h b/src/quick/items/qquickpositioners_p.h index bc67701306..fca64b0a22 100644 --- a/src/quick/items/qquickpositioners_p.h +++ b/src/quick/items/qquickpositioners_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPOSITIONERS_P_H #define QQUICKPOSITIONERS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" #include "qquickitemviewtransition_p.h" diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h index 16afa39bdd..feca74cb41 100644 --- a/src/quick/items/qquickrectangle_p.h +++ b/src/quick/items/qquickrectangle_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKRECTANGLE_P_H #define QQUICKRECTANGLE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickrepeater_p.h b/src/quick/items/qquickrepeater_p.h index 5f652da975..c0a0a32f5f 100644 --- a/src/quick/items/qquickrepeater_p.h +++ b/src/quick/items/qquickrepeater_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKREPEATER_P_H #define QQUICKREPEATER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/items/qquickscalegrid_p_p.h b/src/quick/items/qquickscalegrid_p_p.h index b12da7a706..1d067f1a94 100644 --- a/src/quick/items/qquickscalegrid_p_p.h +++ b/src/quick/items/qquickscalegrid_p_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSCALEGRID_P_P_H #define QQUICKSCALEGRID_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickborderimage_p.h" #include diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h index 266f7bfed8..d8c8cbde2f 100644 --- a/src/quick/items/qquickscreen_p.h +++ b/src/quick/items/qquickscreen_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSCREEN_P_H #define QQUICKSCREEN_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquickshadereffect_p.h b/src/quick/items/qquickshadereffect_p.h index 75a8319615..a5e993ee0c 100644 --- a/src/quick/items/qquickshadereffect_p.h +++ b/src/quick/items/qquickshadereffect_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSHADEREFFECT_P_H #define QQUICKSHADEREFFECT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h index b392753bf8..eb0f03ea81 100644 --- a/src/quick/items/qquickshadereffectmesh_p.h +++ b/src/quick/items/qquickshadereffectmesh_p.h @@ -43,6 +43,17 @@ #ifndef QQUICKSHADEREFFECTMESH_P_H #define QQUICKSHADEREFFECTMESH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + QT_BEGIN_NAMESPACE class QSGGeometry; diff --git a/src/quick/items/qquickshadereffectnode_p.h b/src/quick/items/qquickshadereffectnode_p.h index 28382c483c..420ca1237b 100644 --- a/src/quick/items/qquickshadereffectnode_p.h +++ b/src/quick/items/qquickshadereffectnode_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSHADEREFFECTNODE_P_H #define QQUICKSHADEREFFECTNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h index 629acf0f55..c9d50cef9e 100644 --- a/src/quick/items/qquickshadereffectsource_p.h +++ b/src/quick/items/qquickshadereffectsource_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSHADEREFFECTSOURCE_P_H #define QQUICKSHADEREFFECTSOURCE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include #include diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h index 86350738a0..43c5e44be3 100644 --- a/src/quick/items/qquicksprite_p.h +++ b/src/quick/items/qquicksprite_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSPRITE_P_H #define QQUICKSPRITE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h index ef52bcc9fe..48808e73c9 100644 --- a/src/quick/items/qquickspriteengine_p.h +++ b/src/quick/items/qquickspriteengine_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSPRITEENGINE_P_H #define QQUICKSPRITEENGINE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/items/qquickspritesequence_p.h b/src/quick/items/qquickspritesequence_p.h index f5d467580d..54ed2636b2 100644 --- a/src/quick/items/qquickspritesequence_p.h +++ b/src/quick/items/qquickspritesequence_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSPRITESEQUENCE_P_H #define QQUICKSPRITESEQUENCE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickstateoperations_p.h b/src/quick/items/qquickstateoperations_p.h index 1999e23a83..f1959fa374 100644 --- a/src/quick/items/qquickstateoperations_p.h +++ b/src/quick/items/qquickstateoperations_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSTATEOPERATIONS_P_H #define QQUICKSTATEOPERATIONS_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include "qquickanchors_p.h" diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index 6a4b128f6e..5b385aeb0a 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTEXT_P_H #define QQUICKTEXT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" #include #include diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h index cfe599c0d3..f8b7100cfa 100644 --- a/src/quick/items/qquicktextedit_p.h +++ b/src/quick/items/qquicktextedit_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTEXTEDIT_P_H #define QQUICKTEXTEDIT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" #include diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h index b91149f5f3..8733b31960 100644 --- a/src/quick/items/qquicktextinput_p.h +++ b/src/quick/items/qquicktextinput_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTEXTINPUT_P_H #define QQUICKTEXTINPUT_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickimplicitsizeitem_p.h" #include #include diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h index 31cc23bf2a..c6a1059e8a 100644 --- a/src/quick/items/qquicktextnode_p.h +++ b/src/quick/items/qquicktextnode_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTEXTNODE_P_H #define QQUICKTEXTNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquicktext_p.h" #include diff --git a/src/quick/items/qquicktextnodeengine_p.h b/src/quick/items/qquicktextnodeengine_p.h index f9ebe43183..2eae950f06 100644 --- a/src/quick/items/qquicktextnodeengine_p.h +++ b/src/quick/items/qquicktextnodeengine_p.h @@ -44,6 +44,17 @@ #ifndef QQUICKTEXTNODEENGINE_P_H #define QQUICKTEXTNODEENGINE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + QT_BEGIN_NAMESPACE // Engine that takes glyph runs as input, and produces a set of glyph nodes, clip nodes, diff --git a/src/quick/items/qquicktranslate_p.h b/src/quick/items/qquicktranslate_p.h index 6dfb5a08b7..09868b5939 100644 --- a/src/quick/items/qquicktranslate_p.h +++ b/src/quick/items/qquicktranslate_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTRANSLATE_P_H #define QQUICKTRANSLATE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickitem.h" #include diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h index 57aafd086a..6f970f959d 100644 --- a/src/quick/items/qquickview_p.h +++ b/src/quick/items/qquickview_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKVIEW_P_H #define QQUICKVIEW_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickview.h" #include diff --git a/src/quick/items/qquickwindowattached_p.h b/src/quick/items/qquickwindowattached_p.h index 8138ab216a..98b28430b2 100644 --- a/src/quick/items/qquickwindowattached_p.h +++ b/src/quick/items/qquickwindowattached_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKWINDOW_ATTACHED_P_H #define QQUICKWINDOW_ATTACHED_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h index bfc51953ca..8396019102 100644 --- a/src/quick/items/qquickwindowmodule_p.h +++ b/src/quick/items/qquickwindowmodule_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKWINDOWMODULE_H #define QQUICKWINDOWMODULE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/qtquick2_p.h b/src/quick/qtquick2_p.h index f501323cde..523842a4cd 100644 --- a/src/quick/qtquick2_p.h +++ b/src/quick/qtquick2_p.h @@ -34,6 +34,17 @@ #ifndef QTQUICK2_P_H #define QTQUICK2_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h index c5504513f4..17de89bf11 100644 --- a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h @@ -34,6 +34,17 @@ #ifndef QSGABSTRACTRENDERER_P_H #define QSGABSTRACTRENDERER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsgabstractrenderer.h" #include "qsgnode.h" diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 6e52d6a849..8cd9e7e3ff 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -34,6 +34,17 @@ #ifndef QSGBATCHRENDERER_P_H #define QSGBATCHRENDERER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/coreapi/qsggeometry_p.h b/src/quick/scenegraph/coreapi/qsggeometry_p.h index c52a45b25b..152fcb3427 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry_p.h +++ b/src/quick/scenegraph/coreapi/qsggeometry_p.h @@ -34,6 +34,17 @@ #ifndef QSGGEOMETRY_P_H #define QSGGEOMETRY_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsggeometry.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h b/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h index fab6d00f84..6b31e406ca 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h +++ b/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h @@ -34,6 +34,17 @@ #ifndef QSGMATERIALSHADER_P_H #define QSGMATERIALSHADER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/coreapi/qsgnode_p.h b/src/quick/scenegraph/coreapi/qsgnode_p.h index c455e342c8..7fbb65ef81 100644 --- a/src/quick/scenegraph/coreapi/qsgnode_p.h +++ b/src/quick/scenegraph/coreapi/qsgnode_p.h @@ -34,6 +34,17 @@ #ifndef QSGNODE_P_H #define QSGNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qsgnode.h" diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h index e578586a19..2e408d0dbe 100644 --- a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h +++ b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h @@ -34,6 +34,17 @@ #ifndef QSGNODEUPDATER_P_H #define QSGNODEUPDATER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h index 7e4d52730a..319d0a46b6 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h @@ -34,6 +34,17 @@ #ifndef QSGRENDERER_P_H #define QSGRENDERER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsgabstractrenderer.h" #include "qsgabstractrenderer_p.h" #include "qsgnode.h" diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index ceb455fb28..c7ed398d1b 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -34,6 +34,17 @@ #ifndef QSGADAPTATIONLAYER_P_H #define QSGADAPTATIONLAYER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index 49b6f6e2a0..b1900cba76 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -34,6 +34,17 @@ #ifndef QSGCONTEXT_H #define QSGCONTEXT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index 66f28f3ac0..eb30ed18a4 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -34,6 +34,17 @@ #ifndef QSGCONTEXTPLUGIN_H #define QSGCONTEXTPLUGIN_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h index cffe02330a..59fa9850bc 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h @@ -34,6 +34,17 @@ #ifndef QSGDEFAULTDISTANCEFIELDGLYPHCACHE_H #define QSGDEFAULTDISTANCEFIELDGLYPHCACHE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsgadaptationlayer_p.h" #include #include diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p.h index 157c5f480c..cd178b932d 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.h @@ -34,6 +34,17 @@ #ifndef QSGDEFAULTGLYPHNODE_P_H #define QSGDEFAULTGLYPHNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h index 736b2de9ea..64d7116bbd 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h @@ -34,6 +34,17 @@ #ifndef QSGDEFAULTGLYPHNODE_P_P_H #define QSGDEFAULTGLYPHNODE_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgdefaultimagenode_p.h b/src/quick/scenegraph/qsgdefaultimagenode_p.h index c77321ae51..ff611e102b 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode_p.h +++ b/src/quick/scenegraph/qsgdefaultimagenode_p.h @@ -35,6 +35,17 @@ #ifndef QSGDEFAULTIMAGENODE_P_H #define QSGDEFAULTIMAGENODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/qsgdefaultlayer_p.h b/src/quick/scenegraph/qsgdefaultlayer_p.h index 7baaed5f67..7fb30436d1 100644 --- a/src/quick/scenegraph/qsgdefaultlayer_p.h +++ b/src/quick/scenegraph/qsgdefaultlayer_p.h @@ -33,6 +33,17 @@ #ifndef QSGDEFAULTLAYER_P_H #define QSGDEFAULTLAYER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h index 18e679d8b4..0987b1f9b4 100644 --- a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h +++ b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h @@ -35,6 +35,17 @@ #ifndef QSGDEFAULTRECTANGLENODE_P_H #define QSGDEFAULTRECTANGLENODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h index bce9379bee..ab171c4fb8 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h @@ -34,6 +34,17 @@ #ifndef QSGDISTANCEFIELDGLYPHNODE_P_H #define QSGDISTANCEFIELDGLYPHNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h index 9aba26e5f0..d6538a39ed 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h @@ -34,6 +34,17 @@ #ifndef QSGDISTANCEFIELDGLYPHNODE_P_P_H #define QSGDISTANCEFIELDGLYPHNODE_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qsgdistancefieldglyphnode_p.h" #include "qsgadaptationlayer_p.h" diff --git a/src/quick/scenegraph/qsgrenderloop_p.h b/src/quick/scenegraph/qsgrenderloop_p.h index 3336731fda..1292e7ad9b 100644 --- a/src/quick/scenegraph/qsgrenderloop_p.h +++ b/src/quick/scenegraph/qsgrenderloop_p.h @@ -34,6 +34,17 @@ #ifndef QSGRenderLoop_P_H #define QSGRenderLoop_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h index 67df9dcd31..3fef6a0a88 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h +++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h @@ -34,6 +34,17 @@ #ifndef QSGTHREADEDRENDERLOOP_P_H #define QSGTHREADEDRENDERLOOP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/qsgwindowsrenderloop_p.h b/src/quick/scenegraph/qsgwindowsrenderloop_p.h index fd2dde6f2f..654a0ebbfd 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop_p.h +++ b/src/quick/scenegraph/qsgwindowsrenderloop_p.h @@ -34,6 +34,17 @@ #ifndef QSGWINDOWSRENDERLOOP_P_H #define QSGWINDOWSRENDERLOOP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/util/qsgareaallocator_p.h b/src/quick/scenegraph/util/qsgareaallocator_p.h index d2823ce3ac..f7f753bb9c 100644 --- a/src/quick/scenegraph/util/qsgareaallocator_p.h +++ b/src/quick/scenegraph/util/qsgareaallocator_p.h @@ -34,6 +34,17 @@ #ifndef QSGAREAALLOCATOR_P_H #define QSGAREAALLOCATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/util/qsgatlastexture_p.h b/src/quick/scenegraph/util/qsgatlastexture_p.h index c0f6ab912d..e77e0fa104 100644 --- a/src/quick/scenegraph/util/qsgatlastexture_p.h +++ b/src/quick/scenegraph/util/qsgatlastexture_p.h @@ -34,6 +34,17 @@ #ifndef QSGATLASTEXTURE_P_H #define QSGATLASTEXTURE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h index 115ddc66f2..6b6f485915 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h +++ b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h @@ -34,6 +34,17 @@ #ifndef QSGDEFAULTPAINTERNODE_P_H #define QSGDEFAULTPAINTERNODE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qsgtexturematerial.h" #include "qsgtexture_p.h" diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h index e9d07ae605..c6d0de4435 100644 --- a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h +++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h @@ -34,6 +34,17 @@ #ifndef QSGDEPTHSTENCILBUFFER_P_H #define QSGDEPTHSTENCILBUFFER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h index 7ed4b44a6d..3ee29230d5 100644 --- a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h +++ b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h @@ -34,6 +34,17 @@ #ifndef QSGDISTANCEFIELDUTIL_H #define QSGDISTANCEFIELDUTIL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/scenegraph/util/qsgengine_p.h b/src/quick/scenegraph/util/qsgengine_p.h index 770c4a536c..9bae09ea71 100644 --- a/src/quick/scenegraph/util/qsgengine_p.h +++ b/src/quick/scenegraph/util/qsgengine_p.h @@ -34,6 +34,17 @@ #ifndef QSGENGINE_P_H #define QSGENGINE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsgengine.h" #include diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h b/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h index a270acb6ab..180ced7990 100644 --- a/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h +++ b/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h @@ -34,6 +34,17 @@ #ifndef QSGSHADERSOURCEBUILDER_P_H #define QSGSHADERSOURCEBUILDER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h index c4edee6d29..221b85c2f7 100644 --- a/src/quick/scenegraph/util/qsgtexture_p.h +++ b/src/quick/scenegraph/util/qsgtexture_p.h @@ -34,6 +34,17 @@ #ifndef QSGTEXTURE_P_H #define QSGTEXTURE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/scenegraph/util/qsgtexturematerial_p.h b/src/quick/scenegraph/util/qsgtexturematerial_p.h index 7146ea95ec..5abd25977c 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial_p.h +++ b/src/quick/scenegraph/util/qsgtexturematerial_p.h @@ -34,6 +34,17 @@ #ifndef TEXTUREMATERIAL_P_H #define TEXTUREMATERIAL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qsgtexturematerial.h" #include diff --git a/src/quick/util/qquickanimation_p.h b/src/quick/util/qquickanimation_p.h index c4d5cd20cd..4d3532ce84 100644 --- a/src/quick/util/qquickanimation_p.h +++ b/src/quick/util/qquickanimation_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATION_H #define QQUICKANIMATION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickstate_p.h" #include diff --git a/src/quick/util/qquickanimationcontroller_p.h b/src/quick/util/qquickanimationcontroller_p.h index 171090b6a7..efd1dbafc4 100644 --- a/src/quick/util/qquickanimationcontroller_p.h +++ b/src/quick/util/qquickanimationcontroller_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATIONCONTROLLER_H #define QQUICKANIMATIONCONTROLLER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickanimation_p.h" diff --git a/src/quick/util/qquickanimator_p.h b/src/quick/util/qquickanimator_p.h index 7647e582b8..1ba0367839 100644 --- a/src/quick/util/qquickanimator_p.h +++ b/src/quick/util/qquickanimator_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATOR_P_H #define QQUICKANIMATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickanimation_p.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/util/qquickanimator_p_p.h b/src/quick/util/qquickanimator_p_p.h index ad16b1c361..f5f0295f74 100644 --- a/src/quick/util/qquickanimator_p_p.h +++ b/src/quick/util/qquickanimator_p_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATOR_P_P_H #define QQUICKANIMATOR_P_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickanimator_p.h" #include "qquickanimation_p_p.h" #include diff --git a/src/quick/util/qquickanimatorcontroller_p.h b/src/quick/util/qquickanimatorcontroller_p.h index 4de485c37c..5dd9b09e0b 100644 --- a/src/quick/util/qquickanimatorcontroller_p.h +++ b/src/quick/util/qquickanimatorcontroller_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATORCONTROLLER_P_H #define QQUICKANIMATORCONTROLLER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickanimatorjob_p.h" #include #include diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h index ca70aecb8e..fd2543ea8a 100644 --- a/src/quick/util/qquickanimatorjob_p.h +++ b/src/quick/util/qquickanimatorjob_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKANIMATORJOB_P_H #define QQUICKANIMATORJOB_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/util/qquickapplication_p.h b/src/quick/util/qquickapplication_p.h index c22d8cfe6b..082f68101a 100644 --- a/src/quick/util/qquickapplication_p.h +++ b/src/quick/util/qquickapplication_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKAPPLICATION_P_H #define QQUICKAPPLICATION_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/util/qquickbehavior_p.h b/src/quick/util/qquickbehavior_p.h index d566ca8ba1..a8bff1511b 100644 --- a/src/quick/util/qquickbehavior_p.h +++ b/src/quick/util/qquickbehavior_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKBEHAVIOR_H #define QQUICKBEHAVIOR_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickfontloader_p.h b/src/quick/util/qquickfontloader_p.h index 507d0210ee..1e2a70be7d 100644 --- a/src/quick/util/qquickfontloader_p.h +++ b/src/quick/util/qquickfontloader_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFONTLOADER_H #define QQUICKFONTLOADER_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickfontmetrics_p.h b/src/quick/util/qquickfontmetrics_p.h index 88880a2be8..37aaef7345 100644 --- a/src/quick/util/qquickfontmetrics_p.h +++ b/src/quick/util/qquickfontmetrics_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKFONTMETRICS_H #define QQUICKFONTMETRICS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h index 5230a3cdea..b39b6e5c01 100644 --- a/src/quick/util/qquickpath_p.h +++ b/src/quick/util/qquickpath_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPATH_H #define QQUICKPATH_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickpathinterpolator_p.h b/src/quick/util/qquickpathinterpolator_p.h index 895aa56078..38c5debbed 100644 --- a/src/quick/util/qquickpathinterpolator_p.h +++ b/src/quick/util/qquickpathinterpolator_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPATHINTERPOLATOR_P_H #define QQUICKPATHINTERPOLATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickpixmapcache_p.h b/src/quick/util/qquickpixmapcache_p.h index 482a2e5653..6ab318ba7b 100644 --- a/src/quick/util/qquickpixmapcache_p.h +++ b/src/quick/util/qquickpixmapcache_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPIXMAPCACHE_H #define QQUICKPIXMAPCACHE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/util/qquickpropertychanges_p.h b/src/quick/util/qquickpropertychanges_p.h index 15e5ec2936..d5938fd102 100644 --- a/src/quick/util/qquickpropertychanges_p.h +++ b/src/quick/util/qquickpropertychanges_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKPROPERTYCHANGES_H #define QQUICKPROPERTYCHANGES_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickstatechangescript_p.h" #include diff --git a/src/quick/util/qquicksmoothedanimation_p.h b/src/quick/util/qquicksmoothedanimation_p.h index efac9217f5..9f18170283 100644 --- a/src/quick/util/qquicksmoothedanimation_p.h +++ b/src/quick/util/qquicksmoothedanimation_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSMOOTHEDANIMATION_H #define QQUICKSMOOTHEDANIMATION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickanimation_p.h" diff --git a/src/quick/util/qquickspringanimation_p.h b/src/quick/util/qquickspringanimation_p.h index 082fd341f7..b924c4c72e 100644 --- a/src/quick/util/qquickspringanimation_p.h +++ b/src/quick/util/qquickspringanimation_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSPRINGANIMATION_H #define QQUICKSPRINGANIMATION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include "qquickanimation_p.h" diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h index 1870b70626..6d051ff578 100644 --- a/src/quick/util/qquickstate_p.h +++ b/src/quick/util/qquickstate_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSTATE_H #define QQUICKSTATE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/util/qquickstatechangescript_p.h b/src/quick/util/qquickstatechangescript_p.h index 6c019a43d2..f9580a53df 100644 --- a/src/quick/util/qquickstatechangescript_p.h +++ b/src/quick/util/qquickstatechangescript_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSTATEOPERATIONS_H #define QQUICKSTATEOPERATIONS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickstate_p.h" #include diff --git a/src/quick/util/qquickstategroup_p.h b/src/quick/util/qquickstategroup_p.h index 8ea2dbc4b3..03676a68fb 100644 --- a/src/quick/util/qquickstategroup_p.h +++ b/src/quick/util/qquickstategroup_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSTATEGROUP_H #define QQUICKSTATEGROUP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickstate_p.h" QT_BEGIN_NAMESPACE diff --git a/src/quick/util/qquickstyledtext_p.h b/src/quick/util/qquickstyledtext_p.h index 2f07a740e5..cd6710ff26 100644 --- a/src/quick/util/qquickstyledtext_p.h +++ b/src/quick/util/qquickstyledtext_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSTYLEDTEXT_H #define QQUICKSTYLEDTEXT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quick/util/qquicksvgparser_p.h b/src/quick/util/qquicksvgparser_p.h index ed9a7558d0..60661a7840 100644 --- a/src/quick/util/qquicksvgparser_p.h +++ b/src/quick/util/qquicksvgparser_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSVGPARSER_P_H #define QQUICKSVGPARSER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquicksystempalette_p.h b/src/quick/util/qquicksystempalette_p.h index fb898eb1fa..99654d76f7 100644 --- a/src/quick/util/qquicksystempalette_p.h +++ b/src/quick/util/qquicksystempalette_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKSYSTEMPALETTE_H #define QQUICKSYSTEMPALETTE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquicktextmetrics_p.h b/src/quick/util/qquicktextmetrics_p.h index c0265d9507..96e304b907 100644 --- a/src/quick/util/qquicktextmetrics_p.h +++ b/src/quick/util/qquicktextmetrics_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTEXTMETRICS_H #define QQUICKTEXTMETRICS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquicktransition_p.h b/src/quick/util/qquicktransition_p.h index 826df6794b..d4cd1a087b 100644 --- a/src/quick/util/qquicktransition_p.h +++ b/src/quick/util/qquicktransition_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKTRANSITION_H #define QQUICKTRANSITION_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickstate_p.h" #include #include diff --git a/src/quick/util/qquickutilmodule_p.h b/src/quick/util/qquickutilmodule_p.h index 77d0e7dd3b..c2e80d22ce 100644 --- a/src/quick/util/qquickutilmodule_p.h +++ b/src/quick/util/qquickutilmodule_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKUTILMODULE_H #define QQUICKUTILMODULE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include QT_BEGIN_NAMESPACE diff --git a/src/quick/util/qquickvalidator_p.h b/src/quick/util/qquickvalidator_p.h index 59d7884afc..da071ef2f5 100644 --- a/src/quick/util/qquickvalidator_p.h +++ b/src/quick/util/qquickvalidator_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKVALIDATOR_P_H #define QQUICKVALIDATOR_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include diff --git a/src/quick/util/qquickvaluetypes_p.h b/src/quick/util/qquickvaluetypes_p.h index 7a2e8888b7..3b196da206 100644 --- a/src/quick/util/qquickvaluetypes_p.h +++ b/src/quick/util/qquickvaluetypes_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKVALUETYPES_P_H #define QQUICKVALUETYPES_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/src/quickwidgets/qquickwidget_p.h b/src/quickwidgets/qquickwidget_p.h index fa8bb3beb7..46f6ac5d8a 100644 --- a/src/quickwidgets/qquickwidget_p.h +++ b/src/quickwidgets/qquickwidget_p.h @@ -34,6 +34,17 @@ #ifndef QQUICKWIDGET_P_H #define QQUICKWIDGET_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include "qquickwidget.h" #include diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h index 440cf34e81..d544a89ff2 100644 --- a/tests/auto/qml/debugger/shared/debugutil_p.h +++ b/tests/auto/qml/debugger/shared/debugutil_p.h @@ -35,6 +35,17 @@ #ifndef DEBUGUTIL_H #define DEBUGUTIL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include -- cgit v1.2.3 From d9541bde71f1adc81753283dc40ea6a8af009d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 30 Sep 2015 18:47:42 +0200 Subject: Remove special handling of shortcut events The logic is already handled in QGuiApplicationPrivate::processKeyEvent(), so doing it in the QQuickWindow is redundant. In addition, the logic will soon move to QPA which will break this code if left in. Change-Id: I4d22362dedfa62ada4ab4683e15c6c0cad45e4b5 Reviewed-by: Gabriel de Dietrich Reviewed-by: Christian Stromme --- src/quick/items/qquickwindow.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 48b7c5841a..18ffcb3732 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1434,13 +1434,6 @@ void QQuickWindowPrivate::deliverKeyEvent(QKeyEvent *e) { Q_Q(QQuickWindow); -#ifndef QT_NO_SHORTCUT - // Try looking for a Shortcut before sending key events - if (e->type() == QEvent::KeyPress - && QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(q->focusObject(), e)) - return; -#endif - if (activeFocusItem) q->sendEvent(activeFocusItem, e); #ifdef Q_OS_MAC -- cgit v1.2.3 From 8e7d1a91196197eee4e45bbfa9886ab935e2b67c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 14 Sep 2015 22:02:55 +0200 Subject: Make QML composite types inherit attached properties Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis Reviewed-by: Liang Qi Reviewed-by: Lars Knoll --- src/qml/compiler/qqmlirbuilder.cpp | 4 +- src/qml/compiler/qqmltypecompiler.cpp | 38 ++++++++++++- src/qml/compiler/qqmltypecompiler_p.h | 2 + src/qml/qml/qqmlengine.cpp | 9 ++-- src/qml/qml/qqmlmetatype.cpp | 62 ++++++++++++++-------- src/qml/qml/qqmlmetatype_p.h | 11 ++-- src/qml/qml/qqmlobjectcreator.cpp | 7 ++- src/qml/qml/qqmlproperty.cpp | 10 ++-- src/qml/qml/qqmltypewrapper.cpp | 5 +- .../data/CompositeTypeWithAttachedProperty.qml | 4 ++ ...registeredCompositeTypeWithAttachedProperty.qml | 6 +++ tests/auto/qml/qqmllanguage/testtypes.h | 2 + tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 16 ++++++ tools/qmlplugindump/main.cpp | 21 ++++---- 14 files changed, 146 insertions(+), 51 deletions(-) create mode 100644 tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml create mode 100644 tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 7b0d4240c4..6fef1ae372 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1615,10 +1615,10 @@ static QV4::IR::Type resolveQmlType(QQmlEnginePrivate *qmlEngine, QV4::IR::Membe member->kind = QV4::IR::Member::MemberOfSingletonObject; return resolver->resolveMember(qmlEngine, resolver, member); } - } else if (const QMetaObject *attachedMeta = type->attachedPropertiesType()) { + } else if (const QMetaObject *attachedMeta = type->attachedPropertiesType(qmlEngine)) { QQmlPropertyCache *cache = qmlEngine->cache(attachedMeta); initMetaObjectResolver(resolver, cache); - member->setAttachedPropertiesId(type->attachedPropertiesId()); + member->setAttachedPropertiesId(type->attachedPropertiesId(qmlEngine)); return resolver->resolveMember(qmlEngine, resolver, member); } diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index e36ba76326..cde7a2acb4 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -520,7 +520,24 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r } else if (instantiatingBinding && instantiatingBinding->isAttachedProperty()) { QQmlCompiledData::TypeReference *typeRef = resolvedTypes->value(instantiatingBinding->propertyNameIndex); Q_ASSERT(typeRef); - const QMetaObject *attachedMo = typeRef->type ? typeRef->type->attachedPropertiesType() : 0; + QQmlType *qmltype = typeRef->type; + if (!qmltype) { + QString propertyName = stringAt(instantiatingBinding->propertyNameIndex); + if (imports->resolveType(propertyName, &qmltype, 0, 0, 0)) { + if (qmltype->isComposite()) { + QQmlTypeData *tdata = enginePrivate->typeLoader.getType(qmltype->sourceUrl()); + Q_ASSERT(tdata); + Q_ASSERT(tdata->isComplete()); + + QQmlCompiledData *data = tdata->compiledData(); + qmltype = QQmlMetaType::qmlType(data->metaTypeId); + + tdata->release(); + } + } + } + + const QMetaObject *attachedMo = qmltype ? qmltype->attachedPropertiesType(enginePrivate) : 0; if (!attachedMo) { recordError(instantiatingBinding->location, tr("Non-existent attached object")); return false; @@ -880,7 +897,9 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob SignalHandlerConverter::SignalHandlerConverter(QQmlTypeCompiler *typeCompiler) : QQmlCompilePass(typeCompiler) + , enginePrivate(typeCompiler->enginePrivate()) , qmlObjects(*typeCompiler->qmlObjects()) + , imports(typeCompiler->imports()) , customParsers(typeCompiler->customParserCache()) , resolvedTypes(*typeCompiler->resolvedTypes()) , illegalNames(QV8Engine::get(QQmlEnginePrivate::get(typeCompiler->enginePrivate()))->illegalNames()) @@ -918,7 +937,22 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio const QmlIR::Object *attachedObj = qmlObjects.at(binding->value.objectIndex); QQmlCompiledData::TypeReference *typeRef = resolvedTypes.value(binding->propertyNameIndex); QQmlType *type = typeRef ? typeRef->type : 0; - const QMetaObject *attachedType = type ? type->attachedPropertiesType() : 0; + if (!type) { + if (imports->resolveType(propertyName, &type, 0, 0, 0)) { + if (type->isComposite()) { + QQmlTypeData *tdata = enginePrivate->typeLoader.getType(type->sourceUrl()); + Q_ASSERT(tdata); + Q_ASSERT(tdata->isComplete()); + + QQmlCompiledData *data = tdata->compiledData(); + type = QQmlMetaType::qmlType(data->metaTypeId); + + tdata->release(); + } + } + } + + const QMetaObject *attachedType = type ? type->attachedPropertiesType(enginePrivate) : 0; if (!attachedType) COMPILE_EXCEPTION(binding, tr("Non-existent attached object")); QQmlPropertyCache *cache = compiler->enginePrivate()->cache(attachedType); diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 4bf9830014..c5be92d256 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -169,7 +169,9 @@ public: private: bool convertSignalHandlerExpressionsToFunctionDeclarations(const QmlIR::Object *obj, const QString &typeName, QQmlPropertyCache *propertyCache); + QQmlEnginePrivate *enginePrivate; const QList &qmlObjects; + const QQmlImports *imports; const QHash &customParsers; const QHash &resolvedTypes; const QSet &illegalNames; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 0c003790dd..be535025e6 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1434,7 +1434,8 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre if (rv || !create) return rv; - QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(id); + QQmlEnginePrivate *engine = QQmlEnginePrivate::get(data->context); + QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(engine, id); if (!pf) return 0; @@ -1449,8 +1450,10 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, const QMetaObject *attachedMetaObject, bool create) { - if (*idCache == -1) - *idCache = QQmlMetaType::attachedPropertiesFuncId(attachedMetaObject); + if (*idCache == -1) { + QQmlEngine *engine = object ? qmlEngine(object) : 0; + *idCache = QQmlMetaType::attachedPropertiesFuncId(engine ? QQmlEnginePrivate::get(engine) : 0, attachedMetaObject); + } if (*idCache == -1 || !object) return 0; diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 04c001d305..26271e3f03 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -474,18 +474,24 @@ QQmlType *QQmlType::superType() const return d->superType; } -int QQmlType::resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const +QQmlType *QQmlType::resolveCompositeBaseType(QQmlEnginePrivate *engine) const { Q_ASSERT(isComposite()); - *ok = false; if (!engine) - return -1; + return 0; QQmlTypeData *td = engine->typeLoader.getType(sourceUrl()); if (!td || !td->isComplete()) - return -1; + return 0; QQmlCompiledData *cd = td->compiledData(); const QMetaObject *mo = cd->rootPropertyCache->firstCppMetaObject(); - QQmlType *type = QQmlMetaType::qmlType(mo); + return QQmlMetaType::qmlType(mo); +} + +int QQmlType::resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const +{ + Q_ASSERT(isComposite()); + *ok = false; + QQmlType *type = resolveCompositeBaseType(engine); if (!type) return -1; return type->enumValue(engine, name, ok); @@ -856,18 +862,26 @@ int QQmlType::metaObjectRevision() const return d->revision; } -QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction() const +QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction(QQmlEnginePrivate *engine) const { - if (d->regType != CppType) - return 0; - return d->extraData.cd->attachedPropertiesFunc; + if (d->regType == CppType) + return d->extraData.cd->attachedPropertiesFunc; + + QQmlType *base = 0; + if (d->regType == CompositeType) + base = resolveCompositeBaseType(engine); + return base ? base->attachedPropertiesFunction(engine) : 0; } -const QMetaObject *QQmlType::attachedPropertiesType() const +const QMetaObject *QQmlType::attachedPropertiesType(QQmlEnginePrivate *engine) const { - if (d->regType != CppType) - return 0; - return d->extraData.cd->attachedPropertiesType; + if (d->regType == CppType) + return d->extraData.cd->attachedPropertiesType; + + QQmlType *base = 0; + if (d->regType == CompositeType) + base = resolveCompositeBaseType(engine); + return base ? base->attachedPropertiesType(engine) : 0; } /* @@ -875,11 +889,15 @@ This is the id passed to qmlAttachedPropertiesById(). This is different from th for the case that a single class is registered under two or more names (eg. Item in Qt 4.7 and QtQuick 1.0). */ -int QQmlType::attachedPropertiesId() const +int QQmlType::attachedPropertiesId(QQmlEnginePrivate *engine) const { - if (d->regType != CppType) - return 0; - return d->extraData.cd->attachedPropertiesId; + if (d->regType == CppType) + return d->extraData.cd->attachedPropertiesId; + + QQmlType *base = 0; + if (d->regType == CompositeType) + base = resolveCompositeBaseType(engine); + return base ? base->attachedPropertiesId(engine) : 0; } int QQmlType::parserStatusCast() const @@ -1560,25 +1578,25 @@ int QQmlMetaType::listType(int id) return 0; } -int QQmlMetaType::attachedPropertiesFuncId(const QMetaObject *mo) +int QQmlMetaType::attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMetaObject *mo) { QMutexLocker lock(metaTypeDataLock()); QQmlMetaTypeData *data = metaTypeData(); QQmlType *type = data->metaObjectToType.value(mo); - if (type && type->attachedPropertiesFunction()) - return type->attachedPropertiesId(); + if (type && type->attachedPropertiesFunction(engine)) + return type->attachedPropertiesId(engine); else return -1; } -QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(int id) +QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(QQmlEnginePrivate *engine, int id) { if (id < 0) return 0; QMutexLocker lock(metaTypeDataLock()); QQmlMetaTypeData *data = metaTypeData(); - return data->types.at(id)->attachedPropertiesFunction(); + return data->types.at(id)->attachedPropertiesFunction(engine); } QMetaProperty QQmlMetaType::defaultProperty(const QMetaObject *metaObject) diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h index 40765d461a..c120941a03 100644 --- a/src/qml/qml/qqmlmetatype_p.h +++ b/src/qml/qml/qqmlmetatype_p.h @@ -92,8 +92,8 @@ public: static QObject *toQObject(const QVariant &, bool *ok = 0); static int listType(int); - static int attachedPropertiesFuncId(const QMetaObject *); - static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(int); + static int attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMetaObject *); + static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(QQmlEnginePrivate *, int); enum TypeCategory { Unknown, Object, List }; static TypeCategory typeCategory(int); @@ -169,9 +169,9 @@ public: int metaObjectRevision() const; bool containsRevisionedAttributes() const; - QQmlAttachedPropertiesFunc attachedPropertiesFunction() const; - const QMetaObject *attachedPropertiesType() const; - int attachedPropertiesId() const; + QQmlAttachedPropertiesFunc attachedPropertiesFunction(QQmlEnginePrivate *engine) const; + const QMetaObject *attachedPropertiesType(QQmlEnginePrivate *engine) const; + int attachedPropertiesId(QQmlEnginePrivate *engine) const; int parserStatusCast() const; const char *interfaceIId() const; @@ -212,6 +212,7 @@ public: int enumValue(QQmlEnginePrivate *engine, const QV4::String *, bool *ok) const; private: QQmlType *superType() const; + QQmlType *resolveCompositeBaseType(QQmlEnginePrivate *engine) const; int resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const; friend class QQmlTypePrivate; friend struct QQmlMetaTypeData; diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 58c0b49b3c..c03a463c83 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -706,7 +706,12 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con QQmlCompiledData::TypeReference *tr = resolvedTypes.value(binding->propertyNameIndex); Q_ASSERT(tr); QQmlType *attachedType = tr->type; - const int id = attachedType->attachedPropertiesId(); + if (!attachedType) { + QQmlTypeNameCache::Result res = context->imports->query(stringAt(binding->propertyNameIndex)); + if (res.isValid()) + attachedType = res.type; + } + const int id = attachedType->attachedPropertiesId(QQmlEnginePrivate::get(engine)); QObject *qmlObject = qmlAttachedPropertiesObjectById(id, _qobject); if (!populateInstance(binding->value.objectIndex, qmlObject, qmlObject, /*value type property*/0)) return false; diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index d3f7070528..1b78ada698 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -248,10 +248,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name) QQmlTypeNameCache::Result r = typeNameCache->query(pathName); if (r.isValid()) { if (r.type) { - QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); + QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine); + QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(enginePrivate); if (!func) return; // Not an attachable type - currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject); + currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(enginePrivate), currentObject); if (!currentObject) return; // Something is broken with the attachable type } else if (r.importNamespace) { if ((ii + 1) == path.count()) return; // No type following the namespace @@ -259,10 +260,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name) ++ii; r = typeNameCache->query(path.at(ii), r.importNamespace); if (!r.type) return; // Invalid type in namespace - QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(); + QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine); + QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(enginePrivate); if (!func) return; // Not an attachable type - currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject); + currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(enginePrivate), currentObject); if (!currentObject) return; // Something is broken with the attachable type } else if (r.scriptIndex != -1) { diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index d70a4019b2..6c29f2fbb5 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -185,7 +185,7 @@ ReturnedValue QmlTypeWrapper::get(const Managed *m, String *name, bool *hasPrope // Fall through to base implementation } else if (w->d()->object) { - QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object); + QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(QQmlEnginePrivate::get(v4->qmlEngine())), object); if (ao) return QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty); @@ -241,7 +241,8 @@ void QmlTypeWrapper::put(Managed *m, String *name, const Value &value) QQmlType *type = w->d()->type; if (type && !type->isSingleton() && w->d()->object) { QObject *object = w->d()->object; - QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object); + QQmlEngine *e = scope.engine->qmlEngine(); + QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(QQmlEnginePrivate::get(e)), object); if (ao) QV4::QObjectWrapper::setQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value); } else if (type && type->isSingleton()) { diff --git a/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml new file mode 100644 index 0000000000..6a14e72a31 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 + +MyCompositeBaseType { +} diff --git a/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml new file mode 100644 index 0000000000..d34e4650b3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +RegisteredCompositeTypeWithAttachedProperty { + RegisteredCompositeTypeWithAttachedProperty.objectName: "test" + property string attachedProperty: RegisteredCompositeTypeWithAttachedProperty.objectName +} diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 985acc2539..c64fda5ea1 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -1086,6 +1086,7 @@ class MyCompositeBaseType : public QObject public: enum CompositeEnum { EnumValue0, EnumValue42 = 42 }; + static QObject *qmlAttachedProperties(QObject *parent) { return new QObject(parent); } }; Q_DECLARE_METATYPE(MyEnum2Class::EnumB) @@ -1100,6 +1101,7 @@ QML_DECLARE_TYPE(MyRevisionedSubclass) QML_DECLARE_TYPE(MySubclass) QML_DECLARE_TYPE(MyReceiversTestObject) QML_DECLARE_TYPE(MyCompositeBaseType) +QML_DECLARE_TYPEINFO(MyCompositeBaseType, QML_HAS_ATTACHED_PROPERTIES) class CustomBinding : public QObject, public QQmlParserStatus { diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index b48f3640f4..54e9c361e4 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -160,6 +160,7 @@ private slots: void receivers(); void registeredCompositeType(); void registeredCompositeTypeWithEnum(); + void registeredCompositeTypeWithAttachedProperty(); void implicitImportsLast(); void basicRemote_data(); @@ -3176,6 +3177,7 @@ void tst_qqmllanguage::initTestCase() qmlRegisterType(testFileUrl("CompositeType.DoesNotExist.qml"), "Test", 1, 0, "RegisteredCompositeType2"); qmlRegisterType(testFileUrl("invalidRoot.1.qml"), "Test", 1, 0, "RegisteredCompositeType3"); qmlRegisterType(testFileUrl("CompositeTypeWithEnum.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithEnum"); + qmlRegisterType(testFileUrl("CompositeTypeWithAttachedProperty.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithAttachedProperty"); // Registering the TestType class in other modules should have no adverse effects qmlRegisterType("org.qtproject.TestPre", 1, 0, "Test"); @@ -3367,6 +3369,20 @@ void tst_qqmllanguage::registeredCompositeTypeWithEnum() delete o; } +// QTBUG-43581 +void tst_qqmllanguage::registeredCompositeTypeWithAttachedProperty() +{ + QQmlComponent component(&engine, testFileUrl("registeredCompositeTypeWithAttachedProperty.qml")); + + VERIFY_ERRORS(0); + QObject *o = component.create(); + QVERIFY(o != 0); + + QCOMPARE(o->property("attachedProperty").toString(), QStringLiteral("test")); + + delete o; +} + // QTBUG-18268 void tst_qqmllanguage::remoteLoadCrash() { diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 0238a4aaae..5d1864a746 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -32,6 +32,7 @@ ****************************************************************************/ #include +#include #include #include #include @@ -129,11 +130,11 @@ void collectReachableMetaObjects(QObject *object, QSet *met } } -void collectReachableMetaObjects(const QQmlType *ty, QSet *metas) +void collectReachableMetaObjects(QQmlEnginePrivate *engine, const QQmlType *ty, QSet *metas) { collectReachableMetaObjects(ty->metaObject(), metas, ty->isExtendedType()); - if (ty->attachedPropertiesType()) - collectReachableMetaObjects(ty->attachedPropertiesType(), metas); + if (ty->attachedPropertiesType(engine)) + collectReachableMetaObjects(ty->attachedPropertiesType(engine), metas); } /* We want to add the MetaObject for 'Qt' to the list, this is a @@ -195,11 +196,11 @@ QByteArray convertToId(const QMetaObject *mo) // Collect all metaobjects for types registered with qmlRegisterType() without parameters -void collectReachableMetaObjectsWithoutQmlName( QSet& metas ) { +void collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate *engine, QSet& metas ) { foreach (const QQmlType *ty, QQmlMetaType::qmlAllTypes()) { if ( ! metas.contains(ty->metaObject()) ) { if (!ty->isComposite()) { - collectReachableMetaObjects(ty, &metas); + collectReachableMetaObjects(engine, ty, &metas); } else { qmlTypesByCompositeName[ty->elementName()] = ty; } @@ -225,7 +226,7 @@ QSet collectReachableMetaObjects(QQmlEngine *engine, qmlTypesByCppName[ty->metaObject()->className()].insert(ty); if (ty->isExtendedType()) extensions[ty->typeName()].insert(ty->metaObject()->className()); - collectReachableMetaObjects(ty, &metas); + collectReachableMetaObjects(QQmlEnginePrivate::get(engine), ty, &metas); } else { qmlTypesByCompositeName[ty->elementName()] = ty; } @@ -324,7 +325,7 @@ QSet collectReachableMetaObjects(QQmlEngine *engine, } } - collectReachableMetaObjectsWithoutQmlName(metas); + collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate::get(engine), metas); return metas; } @@ -510,7 +511,7 @@ public: qml->writeEndObject(); } - void dump(const QMetaObject *meta, bool isUncreatable, bool isSingleton) + void dump(QQmlEnginePrivate *engine, const QMetaObject *meta, bool isUncreatable, bool isSingleton) { qml->writeStartObject("Component"); @@ -556,7 +557,7 @@ public: } qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions); - if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType()) { + if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType(engine)) { // Can happen when a type is registered that returns itself as attachedPropertiesType() // because there is no creatable type to attach to. if (attachedType != meta) { @@ -1173,7 +1174,7 @@ int main(int argc, char *argv[]) if (relocatable) dumper.setRelocatableModuleUri(pluginImportUri); foreach (const QMetaObject *meta, nameToMeta) { - dumper.dump(meta, uncreatableMetas.contains(meta), singletonMetas.contains(meta)); + dumper.dump(QQmlEnginePrivate::get(&engine), meta, uncreatableMetas.contains(meta), singletonMetas.contains(meta)); } foreach (const QQmlType *compositeType, qmlTypesByCompositeName) dumper.dumpComposite(&engine, compositeType, defaultReachableNames); -- cgit v1.2.3 From c95fbaf3698b5766e16aa1685136b539ab56a8c4 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 28 Sep 2015 17:57:51 +1000 Subject: Don't send delayed mouse presses to ancestors of the replaying Flickable. If a Flickable delayed a mouse press event and then replayed it later, ancestor items of that Flickable would receive the press twice: once when filtering events of the Flickable, and again when the event was replayed to a descendent of the Flickable. Extend the protection against a Flickable receiving that repeat event to all ancestor items so this doesn't happen. Change-Id: I438c146130c24a7d47e9e8712a1ab08f3d915a06 Reviewed-by: Shawn Rutledge Reviewed-by: Martin Jones --- src/quick/items/qquickflickable.cpp | 6 +-- src/quick/items/qquickflickable_p_p.h | 1 - src/quick/items/qquickitem.cpp | 1 + src/quick/items/qquickitem_p.h | 1 + src/quick/items/qquickwindow.cpp | 6 ++- .../qquickflickable/data/nestedPressDelay.qml | 10 ++++- .../quick/qquickflickable/tst_qquickflickable.cpp | 43 ++++++++++++++++++++++ 7 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index bef766a516..9d6c51f37a 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -218,7 +218,7 @@ QQuickFlickablePrivate::QQuickFlickablePrivate() , hMoved(false), vMoved(false) , stealMouse(false), pressed(false) , scrollingPhase(false), interactive(true), calcVelocity(false) - , pixelAligned(false), replayingPressEvent(false) + , pixelAligned(false) , lastPosTime(-1) , lastPressTime(0) , deceleration(QML_FLICK_DEFAULTDECELERATION) @@ -2202,10 +2202,6 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event) d->handleMouseMoveEvent(mouseEvent.data()); break; case QEvent::MouseButtonPress: - // Don't process a replayed event during replay - if (d->replayingPressEvent) - return false; - d->handleMousePressEvent(mouseEvent.data()); d->captureDelayedPress(item, event); stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h index 65bb3e802d..9d75533c8a 100644 --- a/src/quick/items/qquickflickable_p_p.h +++ b/src/quick/items/qquickflickable_p_p.h @@ -211,7 +211,6 @@ public: bool interactive : 1; bool calcVelocity : 1; bool pixelAligned : 1; - bool replayingPressEvent : 1; QElapsedTimer timer; qint64 lastPosTime; qint64 lastPressTime; diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index fdbd4c90a3..e646d59976 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3077,6 +3077,7 @@ QQuickItemPrivate::QQuickItemPrivate() , implicitAntialiasing(false) , antialiasingValid(false) , isTabFence(false) + , replayingPressEvent(false) , dirtyAttributes(0) , nextDirtyItem(0) , prevDirtyItem(0) diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 6670975f20..9172f7eff1 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -433,6 +433,7 @@ public: // when any of the item's descendants gets focus, the item constrains the tab // focus chain and prevents tabbing outside. bool isTabFence:1; + bool replayingPressEvent:1; enum DirtyType { TransformOrigin = 0x00000001, diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 18ffcb3732..98d16709b7 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2449,9 +2449,11 @@ bool QQuickWindowPrivate::sendFilteredMouseEvent(QQuickItem *target, QQuickItem if (!target) return false; - bool filtered = false; - QQuickItemPrivate *targetPrivate = QQuickItemPrivate::get(target); + if (targetPrivate->replayingPressEvent) + return false; + + bool filtered = false; if (targetPrivate->filtersChildMouseEvents && !hasFiltered->contains(target)) { hasFiltered->insert(target); if (target->childMouseEventFilter(item, event)) diff --git a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml index 742656641f..bdb866ce65 100644 --- a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml +++ b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml @@ -8,12 +8,18 @@ Flickable { contentHeight: 320 flickableDirection: Flickable.HorizontalFlick pressDelay: 10000 - Rectangle { + MouseArea { + objectName: "filteringMouseArea" x: 20 y: 20 width: 400 height: 300 - color: "yellow" + drag.filterChildren: true + Rectangle { + id: rectangle + color: "yellow" + anchors.fill: parent + } Flickable { objectName: "innerFlickable" anchors.fill: parent diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index f7267800c9..dc7171746c 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -67,6 +67,7 @@ private slots: void flickDeceleration(); void pressDelay(); void nestedPressDelay(); + void filterReplayedPress(); void nestedClickThenFlick(); void flickableDirection(); void resizeContent(); @@ -522,6 +523,48 @@ void tst_qquickflickable::nestedPressDelay() QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(90, 150)); } +void tst_qquickflickable::filterReplayedPress() +{ + QScopedPointer window(new QQuickView); + window->setSource(testFileUrl("nestedPressDelay.qml")); + QTRY_COMPARE(window->status(), QQuickView::Ready); + QQuickViewTestUtil::centerOnScreen(window.data()); + QQuickViewTestUtil::moveMouseAway(window.data()); + window->show(); + QVERIFY(QTest::qWaitForWindowActive(window.data())); + QVERIFY(window->rootObject() != 0); + + QQuickFlickable *outer = qobject_cast(window->rootObject()); + QVERIFY(outer != 0); + + QQuickFlickable *inner = window->rootObject()->findChild("innerFlickable"); + QVERIFY(inner != 0); + + QQuickItem *filteringMouseArea = outer->findChild("filteringMouseArea"); + QVERIFY(filteringMouseArea); + + moveAndPress(window.data(), QPoint(150, 150)); + // the MouseArea filtering the Flickable is pressed immediately. + QCOMPARE(filteringMouseArea->property("pressed").toBool(), true); + + // Some event causes the mouse area to set keepMouseGrab. + filteringMouseArea->setKeepMouseGrab(true); + QCOMPARE(filteringMouseArea->keepMouseGrab(), true); + + // The inner pressDelay will prevail (50ms, vs. 10sec) + // QTRY_VERIFY() has 5sec timeout, so will timeout well within 10sec. + QTRY_VERIFY(outer->property("pressed").toBool()); + + // The replayed press event isn't delivered to parent items of the + // flickable with the press delay, and the state of the parent mouse + // area is therefore unaffected. + QCOMPARE(filteringMouseArea->property("pressed").toBool(), true); + QCOMPARE(filteringMouseArea->keepMouseGrab(), true); + + QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150)); +} + + // QTBUG-37316 void tst_qquickflickable::nestedClickThenFlick() { -- cgit v1.2.3 From dfa4361183a7a189b087b18e01c89d1c1adbc088 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 9 Oct 2015 16:53:15 +0200 Subject: Privately export QQuickTransitionManager We use QQuickTransitionManager for tracking transitions in QtQuick templates, specially in the Panel type. Change-Id: I394814576176b6d6766a44651673a5c8147e11ba Reviewed-by: J-P Nurmi --- src/quick/util/qquicktransitionmanager_p_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/util/qquicktransitionmanager_p_p.h b/src/quick/util/qquicktransitionmanager_p_p.h index a6d91d7efd..43e63b80d9 100644 --- a/src/quick/util/qquicktransitionmanager_p_p.h +++ b/src/quick/util/qquicktransitionmanager_p_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE class QQuickStatePrivate; class QQuickTransitionManagerPrivate; -class Q_AUTOTEST_EXPORT QQuickTransitionManager +class Q_QUICK_PRIVATE_EXPORT QQuickTransitionManager { public: QQuickTransitionManager(); -- cgit v1.2.3 From 86fdf2c914ec5e4867cc7fa281db190d9583f960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 30 Sep 2015 19:03:51 +0200 Subject: Remove special handling of popup windows on OS X The handling should be taken care of at the QPA level, not in the individual QWindow subclasses. Change-Id: Iff564dac0c997eb97b426962d126e88c4703cdaa Reviewed-by: Gabriel de Dietrich --- src/quick/items/qquickwindow.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 98d16709b7..c8256ed62a 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1436,20 +1436,6 @@ void QQuickWindowPrivate::deliverKeyEvent(QKeyEvent *e) if (activeFocusItem) q->sendEvent(activeFocusItem, e); -#ifdef Q_OS_MAC - else { - // This is the case for popup windows on Mac, where popup windows get focus - // in Qt (after exposure) but they are not "key windows" in the Cocoa sense. - // Therefore, the will never receive key events from Cocoa. Instead, the - // toplevel non-popup window (the application current "key window") will - // receive them. (QWidgetWindow does something similar for widgets, by keeping - // a list of popup windows, and forwarding the key event to the top-most popup.) - QWindow *focusWindow = QGuiApplication::focusWindow(); - if (focusWindow && focusWindow != q - && (focusWindow->flags() & Qt::Popup) == Qt::Popup) - QGuiApplication::sendEvent(focusWindow, e); - } -#endif } QMouseEvent *QQuickWindowPrivate::cloneMouseEvent(QMouseEvent *event, QPointF *transformedLocalPos) -- cgit v1.2.3 From c2472e9105713784493f3df620047cab5e6cecc8 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 13 Oct 2015 12:25:20 +0200 Subject: Initialize member variable. It's never used (because it's qSwap()ed), but still. Change-Id: I64cbb39dcd9f9368c73b5b9bf98dc1f3a52a13ef Reviewed-by: Lars Knoll --- src/qml/compiler/qv4ssa.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 32169f3352..bc4068085a 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -2038,6 +2038,7 @@ public: EliminateDeadCode(DefUses &defUses, StatementWorklist &worklist) : _defUses(defUses) , _worklist(worklist) + , _sideEffect(false) { _collectedTemps.reserve(8); } -- cgit v1.2.3 From 16154fba86798bd6bbee90eb79a9f3b26cae2fad Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 12:26:45 +0200 Subject: Tools: Fix single-character string literals. Use character literals where applicable. Change-Id: I55679dcc13c4c79567712c0dfaaabc2b84fee010 Reviewed-by: Ulf Hermann --- tools/qmleasing/segmentproperties.cpp | 2 +- tools/qmleasing/splineeditor.cpp | 7 ++++--- tools/qmlimportscanner/main.cpp | 6 +++--- tools/qmljs/qmljs.cpp | 4 ++-- tools/qmlmin/main.cpp | 20 ++++++++++++-------- tools/qmlplugindump/main.cpp | 6 +++--- tools/qmlprofiler/qmlprofilerapplication.cpp | 2 +- tools/qmlprofiler/qmlprofilerdata.cpp | 4 ++-- tools/qmlscene/main.cpp | 6 +++--- 9 files changed, 31 insertions(+), 26 deletions(-) diff --git a/tools/qmleasing/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp index cfc10b7f54..cf49b2488c 100644 --- a/tools/qmleasing/segmentproperties.cpp +++ b/tools/qmleasing/segmentproperties.cpp @@ -103,7 +103,7 @@ void SegmentProperties::invalidate() { m_blockSignals = true; - m_ui_pane_p.label->setText(QLatin1String("p") + QString::number(m_segment)); + m_ui_pane_p.label->setText(QLatin1Char('p') + QString::number(m_segment)); m_ui_pane_p.smooth->setChecked(m_smooth); m_ui_pane_p.smooth->parentWidget()->setEnabled(!m_last); diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index b957cab4fe..9e35af6189 100644 --- a/tools/qmleasing/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp @@ -291,10 +291,11 @@ QString SplineEditor::generateCode() { QString s = QLatin1String("["); foreach (const QPointF &point, m_controlPoints) { - s += QString::number(point.x(), 'g', 2) + "," + QString::number(point.y(), 'g', 3) + ","; + s += QString::number(point.x(), 'g', 2) + QLatin1Char(',') + + QString::number(point.y(), 'g', 3) + QLatin1Char(','); } s.chop(1); //removing last "," - s += "]"; + s += QLatin1Char(']'); return s; } @@ -673,7 +674,7 @@ void SplineEditor::setEasingCurve(const QString &code) { if (m_block) return; - if (code.left(1) == QLatin1String("[") && code.right(1) == QLatin1String("]")) { + if (code.startsWith(QLatin1Char('[')) && code.endsWith(QLatin1Char(']'))) { QString cleanCode = code; cleanCode.remove(0, 1); cleanCode.chop(1); diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp index 7f8c3080c4..395c31a710 100644 --- a/tools/qmlimportscanner/main.cpp +++ b/tools/qmlimportscanner/main.cpp @@ -129,10 +129,10 @@ QVariantMap pluginsForModulePath(const QString &modulePath) { line = qmldirFile.readLine(); if (line.startsWith("plugin")) { plugins += QString::fromUtf8(line.split(' ').at(1)); - plugins += QStringLiteral(" "); + plugins += QLatin1Char(' '); } else if (line.startsWith("classname")) { classnames += QString::fromUtf8(line.split(' ').at(1)); - classnames += QStringLiteral(" "); + classnames += QLatin1Char(' '); } else if (line.startsWith("depends")) { QList dep = line.split(' '); if (dep.length() != 3) @@ -199,7 +199,7 @@ QVariantList findPathsForModuleImports(const QVariantList &imports) if (plugininfo.contains(QStringLiteral("dependencies"))) { QStringList dependencies = plugininfo.value(QStringLiteral("dependencies")).toStringList(); foreach (const QString &line, dependencies) { - QList dep = line.split(QStringLiteral(" ")); + QList dep = line.split(QLatin1Char(' ')); QVariantMap depImport; depImport[QStringLiteral("type")] = QStringLiteral("module"); depImport[QStringLiteral("name")] = dep[0]; diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index 132817ff8c..27aeed4c0c 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -126,8 +126,8 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::Value &exceptio foreach (const QV4::StackFrame &frame, trace) { std::cerr << " at " << qPrintable(frame.function) << " (" << qPrintable(frame.source); if (frame.line >= 0) - std::cerr << ":" << frame.line; - std::cerr << ")" << std::endl; + std::cerr << ':' << frame.line; + std::cerr << ')' << std::endl; } } diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp index 35b62ef6fd..a3f2b92bde 100644 --- a/tools/qmlmin/main.cpp +++ b/tools/qmlmin/main.cpp @@ -245,7 +245,7 @@ void Minify::escape(const QChar &ch, QString *out) switch (hx.length()) { case 1: out->append(QLatin1String("000")); break; case 2: out->append(QLatin1String("00")); break; - case 3: out->append(QLatin1String("0")); break; + case 3: out->append(QLatin1Char('0')); break; case 4: break; default: Q_ASSERT(!"unreachable"); } @@ -274,7 +274,8 @@ bool Minify::parse(int startToken) _tokens.append(tokenKind()); _tokenStrings.append(tokenText()); } else { - std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl; + std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':' + << tokenStartColumn() << ": syntax error" << std::endl; return false; } } @@ -394,7 +395,8 @@ bool Minify::parse(int startToken) goto again; } - std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl; + std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':' << tokenStartColumn() + << ": syntax error" << std::endl; return false; } @@ -447,7 +449,8 @@ bool Tokenize::parse(int startToken) _tokens.append(tokenKind()); _tokenStrings.append(tokenText()); } else { - std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl; + std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':' + << tokenStartColumn() << ": syntax error" << std::endl; return false; } } @@ -511,7 +514,8 @@ bool Tokenize::parse(int startToken) goto again; } - std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl; + std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':' + << tokenStartColumn() << ": syntax error" << std::endl; return false; } @@ -599,7 +603,7 @@ int runQmlmin(int argc, char *argv[]) else { usage(/*show help*/ isInvalidOpt); if (isInvalidOpt) - std::cerr << "qmlmin: invalid option '" << qPrintable(arg) << "'" << std::endl; + std::cerr << "qmlmin: invalid option '" << qPrintable(arg) << '\'' << std::endl; else std::cerr << "qmlmin: too many input files specified" << std::endl; return EXIT_FAILURE; @@ -632,7 +636,7 @@ int runQmlmin(int argc, char *argv[]) // QQmlJS::Minify secondMinify(width); if (! secondMinify(fileName, minify.minifiedCode()) || secondMinify.minifiedCode() != minify.minifiedCode()) { - std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl; + std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << '\'' << std::endl; return EXIT_FAILURE; } @@ -641,7 +645,7 @@ int runQmlmin(int argc, char *argv[]) minimizedTokens(fileName, minify.minifiedCode()); if (originalTokens.tokenStream().size() != minimizedTokens.tokenStream().size()) { - std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl; + std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << '\'' << std::endl; return EXIT_FAILURE; } diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 5d1864a746..98c9b54bcd 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -375,7 +375,7 @@ public: if (qmlTyName.startsWith("./")) { qmlTyName.remove(0, 2); } - if (qmlTyName.startsWith("/")) { + if (qmlTyName.startsWith(QLatin1Char('/'))) { qmlTyName.remove(0, 1); } const QString exportString = enquote( @@ -736,7 +736,7 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil std::cerr << "parsing " << qPrintable( dependenciesFile ) << " skipping"; foreach (const QString &uriToSkip, urisToSkip) - std::cerr << " " << qPrintable(uriToSkip); + std::cerr << ' ' << qPrintable(uriToSkip); std::cerr << std::endl; } QJsonParseError parseError; @@ -829,7 +829,7 @@ static bool getDependencies(const QQmlEngine &engine, const QString &pluginImpor if (!importScanner.waitForFinished()) { std::cerr << "failure to start " << qPrintable(command); foreach (const QString &arg, commandArgs) - std::cerr << " " << qPrintable(arg); + std::cerr << ' ' << qPrintable(arg); std::cerr << std::endl; return false; } diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index 1eab1a0a8c..347e7d3b55 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -485,7 +485,7 @@ void QmlProfilerApplication::run() connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished())); logStatus(QString("Starting '%1 %2' ...").arg(m_programPath, - arguments.join(" "))); + arguments.join(QLatin1Char(' ')))); m_process->start(m_programPath, arguments); if (!m_process->waitForStarted()) { logError(QString("Could not run '%1': %2").arg(m_programPath, diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp index ac7b51159f..307b9d3686 100644 --- a/tools/qmlprofiler/qmlprofilerdata.cpp +++ b/tools/qmlprofiler/qmlprofilerdata.cpp @@ -262,8 +262,8 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type, if (data.isEmpty()) details = tr("Source code not available"); else { - details = data.join(QStringLiteral(" ")).replace( - QLatin1Char('\n'),QStringLiteral(" ")).simplified(); + details = data.join(QLatin1Char(' ')).replace( + QLatin1Char('\n'), QLatin1Char(' ')).simplified(); QRegExp rewrite(QStringLiteral("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)")); bool match = rewrite.exactMatch(details); if (match) { diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 14845ed433..ab37b6457d 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -204,7 +204,7 @@ static int displayOptionsDialog(Options *options) QFileInfoList fileInfos = findQmlFiles(":/bundle") + findQmlFiles("./qmlscene-resources"); foreach (QFileInfo fileInfo, fileInfos) - qmlFileComboBox->addItem(fileInfo.dir().dirName() + "/" + fileInfo.fileName(), QVariant::fromValue(fileInfo)); + qmlFileComboBox->addItem(fileInfo.dir().dirName() + QLatin1Char('/') + fileInfo.fileName(), QVariant::fromValue(fileInfo)); QCheckBox *originalCheckBox = new QCheckBox(&dialog); originalCheckBox->setText("Use original QML viewer"); @@ -235,7 +235,7 @@ static int displayOptionsDialog(Options *options) QVariant variant = qmlFileComboBox->itemData(qmlFileComboBox->currentIndex()); QFileInfo fileInfo = variant.value(); - if (fileInfo.canonicalFilePath().startsWith(":")) + if (fileInfo.canonicalFilePath().startsWith(QLatin1Char(':'))) options->file = QUrl("qrc" + fileInfo.canonicalFilePath()); else options->file = QUrl::fromLocalFile(fileInfo.canonicalFilePath()); @@ -270,7 +270,7 @@ static bool checkVersion(const QUrl &url) bool codeFound= false; while (!codeFound) { QString line = stream.readLine(); - if (line.contains("{")) { + if (line.contains(QLatin1Char('{'))) { codeFound = true; } else { QString import; -- cgit v1.2.3 From 0f5a7217617e30bfb06991390b4bf673c67ed4aa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 13:06:26 +0200 Subject: Tests: Fix single-character string literals. Use character literals where applicable. Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687 Reviewed-by: Ulf Hermann Reviewed-by: Simon Hausmann --- .../qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp | 2 +- tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp | 2 +- tests/auto/qml/qjsvalue/tst_qjsvalue.cpp | 2 +- tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp | 2 +- tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp | 9 ++++++--- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 +- tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp | 4 ++-- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 4 ++-- tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp | 2 +- tests/auto/qml/qqmllocale/tst_qqmllocale.cpp | 6 +++--- .../auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 11 +++++++---- .../qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | 2 +- .../tst_qquickfolderlistmodel.cpp | 4 ++-- .../quick/qquickfontloader/tst_qquickfontloader.cpp | 2 +- tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp | 2 +- .../auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 2 +- .../qquickxmllistmodel/tst_qquickxmllistmodel.cpp | 18 +++++++++--------- tests/auto/quick/shared/viewtestutil.cpp | 4 ++-- .../scenegraph_lancelot/scenegraph/tst_scenegraph.cpp | 2 +- 19 files changed, 44 insertions(+), 38 deletions(-) diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 4ab1ac0a4c..98ef590317 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -98,7 +98,7 @@ bool tst_QQmlDebuggingEnabler::init(bool blockMode, bool qmlscene, int portFrom, if (qmlscene) { process->start(QStringList() << QLatin1String("-qmljsdebugger=port:") + - QString::number(portFrom) + QLatin1String(",") + QString::number(portTo) + + QString::number(portFrom) + QLatin1Char(',') + QString::number(portTo) + QLatin1String(blockMode ? ",block": "") << testFile(QLatin1String("test.qml"))); } else { diff --git a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp index e01ea73e1b..52d676ef3c 100644 --- a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp +++ b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp @@ -110,7 +110,7 @@ QJsonValue tst_qjsonbinding::valueFromJson(const QByteArray &json) // QJsonDocument::fromJson() only handles objects and arrays... // Wrap the JSON inside a dummy object and extract the value. - QByteArray wrappedJson = "{\"prop\":" + json + "}"; + QByteArray wrappedJson = "{\"prop\":" + json + '}'; doc = QJsonDocument::fromJson(wrappedJson); Q_ASSERT(doc.isObject()); return doc.object().value("prop"); diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp index bea44cb6e3..bf9bd18807 100644 --- a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp +++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp @@ -2436,7 +2436,7 @@ void tst_QJSValue::prettyPrinter() QFETCH(QString, function); QFETCH(QString, expected); QJSEngine eng; - QJSValue val = eng.evaluate("(" + function + ")"); + QJSValue val = eng.evaluate(QLatin1Char('(') + function + QLatin1Char(')')); QVERIFY(val.isCallable()); QString actual = val.toString(); QSKIP("Function::toString() doesn't give the whole function on v4"); diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index 2a534b5913..28d687bd1c 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -84,7 +84,7 @@ void tst_qmlplugindump::builtins() if (dumper.error() != QProcess::UnknownError || dumper.exitStatus() != QProcess::NormalExit) { qWarning() << QString("Error while running '%1 %2'").arg( - qmlplugindumpPath, args.join(QLatin1String(" "))); + qmlplugindumpPath, args.join(QLatin1Char(' '))); } if (dumper.error() == QProcess::FailedToStart) { diff --git a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp index 6b2add309a..6f2febaccf 100644 --- a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp +++ b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp @@ -73,7 +73,7 @@ namespace { QString toString(const QQmlDirParser::Plugin &p) { - return p.name + "|" + p.path; + return p.name + QLatin1Char('|') + p.path; } QStringList toStringList(const QList &plugins) @@ -88,7 +88,9 @@ namespace { QString toString(const QQmlDirParser::Component &c) { - return c.typeName + "|" + c.fileName + "|" + QString::number(c.majorVersion) + "|" + QString::number(c.minorVersion) + "|" + (c.internal ? "true" : "false"); + return c.typeName + QLatin1Char('|') + c.fileName + QLatin1Char('|') + + QString::number(c.majorVersion) + QLatin1Char('|') + QString::number(c.minorVersion) + + QLatin1Char('|') + (c.internal ? "true" : "false"); } QStringList toStringList(const QQmlDirComponents &components) @@ -104,7 +106,8 @@ namespace { QString toString(const QQmlDirParser::Script &s) { - return s.nameSpace + "|" + s.fileName + "|" + QString::number(s.majorVersion) + "|" + QString::number(s.minorVersion); + return s.nameSpace + QLatin1Char('|') + s.fileName + QLatin1Char('|') + + QString::number(s.majorVersion) + '|' + QString::number(s.minorVersion); } QStringList toStringList(const QList &scripts) diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 87815c8821..f238bf6b90 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7330,7 +7330,7 @@ void tst_qqmlecmascript::sequenceSort_data() for (size_t t=0 ; t < sizeof(types)/sizeof(types[0]) ; ++t) { for (size_t s=0 ; s < sizeof(sort)/sizeof(sort[0]) ; ++s) { for (int c=0 ; c < 2 ; ++c) { - QString testName = QLatin1String(types[t]) + QLatin1String("_") + QLatin1String(sort[s]); + QString testName = QLatin1String(types[t]) + QLatin1Char('_') + QLatin1String(sort[s]); QString fnName = QLatin1String("test_") + testName; bool useComparer = c != 0; testName += useComparer ? QLatin1String("[custom]") : QLatin1String("[default]"); diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp index 4f559b0d33..2f581e296a 100644 --- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp +++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp @@ -96,8 +96,8 @@ private: QList actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 54e9c361e4..3c7584bfa1 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -282,8 +282,8 @@ private: QList errors = component.errors(); \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ diff --git a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp index 519ee7ac26..d26c1c584b 100644 --- a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp +++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp @@ -625,7 +625,7 @@ void tst_qqmllistmodel::enumerate() int expectedStringCount = sizeof(expectedStrings) / sizeof(expectedStrings[0]); - QStringList r = item->property("result").toString().split(":"); + QStringList r = item->property("result").toString().split(QLatin1Char(':')); int matchCount = 0; for (int i=0 ; i < expectedStringCount ; ++i) { diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index ba3f72f2c1..030af07a70 100644 --- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -676,7 +676,7 @@ void tst_qqmllocale::addDateTimeFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; @@ -768,7 +768,7 @@ void tst_qqmllocale::addDateFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; @@ -860,7 +860,7 @@ void tst_qqmllocale::addTimeFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index 0e326abad9..77fc67a1ac 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -110,8 +110,8 @@ void tst_qqmlmoduleplugin::initTestCase() QList actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ @@ -202,8 +202,11 @@ void tst_qqmlmoduleplugin::incorrectPluginCase() caseSensitive = false; QString libname = "PluGin.dll"; #endif - if (!caseSensitive) - expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\""); + if (!caseSensitive) { + expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + + QLatin1Char('"'); + } #endif QCOMPARE(errors.at(0).description(), expectedError); diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index 47bf151a37..68f85daacd 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -621,7 +621,7 @@ void tst_qqmlxmlhttprequest::send_options() QVERIFY(!object.isNull()); QString url = server.baseUrl().toString(); if (url_suffix != "/") - url.append("/"); + url.append(QLatin1Char('/')); if (!url_suffix.isEmpty()) url.append(url_suffix); object->setProperty("url", url); diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp index dc6e2fa561..aca809a137 100644 --- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp +++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp @@ -93,8 +93,8 @@ void tst_qquickfolderlistmodel::checkNoErrors(const QQmlComponent& component) QList errors = component.errors(); for (int ii = 0; ii < errors.count(); ++ii) { const QQmlError &error = errors.at(ii); - QByteArray errorStr = QByteArray::number(error.line()) + ":" + - QByteArray::number(error.column()) + ":" + + QByteArray errorStr = QByteArray::number(error.line()) + ':' + + QByteArray::number(error.column()) + ':' + error.description().toUtf8(); qWarning() << errorStr; } diff --git a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp index f4f1e290c1..b16e89dc39 100644 --- a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp +++ b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp @@ -119,7 +119,7 @@ void tst_qquickfontloader::localFont() void tst_qquickfontloader::failLocalFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("dummy.ttf").toString() + "\" }"; - QTest::ignoreMessage(QtWarningMsg, QString(":2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + "\"").toUtf8().constData()); + QTest::ignoreMessage(QtWarningMsg, QString(":2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + QLatin1Char('"')).toUtf8().constData()); QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickFontLoader *fontObject = qobject_cast(component.create()); diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index eda3be5c1d..ece9a0841b 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -72,7 +72,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. - QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; + QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png"; if (!QFile::exists(expectfile)) { actual.save(expectfile); diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 85123c6f92..ec62d1a57b 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -71,7 +71,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. - QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; + QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png"; if (!QFile::exists(expectfile)) { actual.save(expectfile); diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp index c0bf86a212..09ceb7aebd 100644 --- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp +++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp @@ -115,15 +115,15 @@ private: QString xml; if (!data.isEmpty()) { - QStringList items = data.split(";"); + QStringList items = data.split(QLatin1Char(';')); foreach(const QString &item, items) { if (item.isEmpty()) continue; QVariantList variants; xml += QLatin1String(""); - QStringList fields = item.split(","); + QStringList fields = item.split(QLatin1Char(',')); foreach(const QString &field, fields) { - QStringList values = field.split("="); + QStringList values = field.split(QLatin1Char('=')); if (values.count() != 2) { qWarning() << "makeItemXmlAndData: invalid field:" << field; continue; @@ -857,22 +857,22 @@ void tst_qquickxmllistmodel::threading() QModelIndex index = m1->index(i, 0); QList roles = m1->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m1->data(index, roles.at(0)).toString(), QString("A" + QString::number(i))); - QCOMPARE(m1->data(index, roles.at(1)).toString(), QString("1" + QString::number(i))); + QCOMPARE(m1->data(index, roles.at(0)).toString(), QLatin1Char('A') + QString::number(i)); + QCOMPARE(m1->data(index, roles.at(1)).toString(), QLatin1Char('1') + QString::number(i)); QCOMPARE(m1->data(index, roles.at(2)).toString(), QString("Football")); index = m2->index(i, 0); roles = m2->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m2->data(index, roles.at(0)).toString(), QString("B" + QString::number(i))); - QCOMPARE(m2->data(index, roles.at(1)).toString(), QString("2" + QString::number(i))); + QCOMPARE(m2->data(index, roles.at(0)).toString(), QLatin1Char('B') + QString::number(i)); + QCOMPARE(m2->data(index, roles.at(1)).toString(), QLatin1Char('2') + QString::number(i)); QCOMPARE(m2->data(index, roles.at(2)).toString(), QString("Athletics")); index = m3->index(i, 0); roles = m3->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m3->data(index, roles.at(0)).toString(), QString("C" + QString::number(i))); - QCOMPARE(m3->data(index, roles.at(1)).toString(), QString("3" + QString::number(i))); + QCOMPARE(m3->data(index, roles.at(0)).toString(), QLatin1Char('C') + QString::number(i)); + QCOMPARE(m3->data(index, roles.at(1)).toString(), QLatin1Char('3') + QString::number(i)); QCOMPARE(m3->data(index, roles.at(2)).toString(), QString("Curling")); } } diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp index 86d61a0c23..1330cbccc9 100644 --- a/tests/auto/quick/shared/viewtestutil.cpp +++ b/tests/auto/quick/shared/viewtestutil.cpp @@ -277,11 +277,11 @@ void QQuickViewTestUtil::QaimModel::resetItems(const QList > &other, const QString &error1, const QString &error2) { for (int i=0; i Date: Tue, 13 Oct 2015 13:08:27 +0200 Subject: Libraries: Fix single-character string literals. Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann --- src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 2 +- src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 2 +- src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp | 2 +- src/qml/jit/qv4isel_masm.cpp | 4 ++-- src/qml/jsruntime/qv4functionobject.cpp | 2 +- src/qml/jsruntime/qv4jsonobject.cpp | 5 +++-- src/qml/qml/qqmlpropertycache.cpp | 6 +++--- src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 4 ++-- src/quick/items/qquickitem.cpp | 2 +- src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | 2 +- 10 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 0f4a5bda54..8bfbf09769 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -197,7 +197,7 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path) QUrl localUrl = QUrl(localPath); QString fullPath = localUrl.path(); if (localUrl.scheme().length()) - fullPath = localUrl.scheme() + ":" + fullPath; + fullPath = localUrl.scheme() + QLatin1Char(':') + fullPath; return QDir::cleanPath(fullPath); } diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index 832f484c13..50aa061213 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -416,7 +416,7 @@ void QQuickXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QS if (keysQueries.count() == 1) keysQuery = currentJob.prefix + keysQueries[0]; else if (keysQueries.count() > 1) - keysQuery = currentJob.prefix + QLatin1String("concat(") + keysQueries.join(QLatin1String(",")) + QLatin1String(")"); + keysQuery = currentJob.prefix + QLatin1String("concat(") + keysQueries.join(QLatin1Char(',')) + QLatin1Char(')'); if (!keysQuery.isEmpty()) { query->setQuery(keysQuery); diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp index 89820c9f56..0fb6df7fd2 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp @@ -148,7 +148,7 @@ public: { QString msg = QStringLiteral("unimplemented command \""); msg += req.value(QStringLiteral("command")).toString(); - msg += QStringLiteral("\""); + msg += QLatin1Char('"'); createErrorResponse(msg); } }; diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp index 5dfd891b80..782b0c8659 100644 --- a/src/qml/jit/qv4isel_masm.cpp +++ b/src/qml/jit/qv4isel_masm.cpp @@ -195,7 +195,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize) if (name.isEmpty()) { name = QByteArray::number(quintptr(_function), 16); name.prepend("IR::Function(0x"); - name.append(")"); + name.append(')'); } codeRef = linkBuffer.finalizeCodeWithDisassembly("%s", name.data()); @@ -236,7 +236,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize) if (name.isEmpty()) { name = QByteArray::number(quintptr(_function), 16); name.prepend("IR::Function(0x"); - name.append(")"); + name.append(')'); } } diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index a94c3f6db5..2944c7b421 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -263,7 +263,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData) if (scope.engine->hasException) return Encode::undefined(); - QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1String("}"); + QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1Char('}'); QQmlJS::Engine ee, *engine = ⅇ QQmlJS::Lexer lexer(engine); diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index f4f87f3aea..2e5283c639 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -801,10 +801,11 @@ QString Stringify::JO(Object *o) if (partial.isEmpty()) { result = QStringLiteral("{}"); } else if (gap.isEmpty()) { - result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QStringLiteral("}"); + result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QLatin1Char('}'); } else { QString separator = QStringLiteral(",\n") + indent; - result = QStringLiteral("{\n") + indent + partial.join(separator) + QStringLiteral("\n") + stepback + QStringLiteral("}"); + result = QStringLiteral("{\n") + indent + partial.join(separator) + QLatin1Char('\n') + + stepback + QLatin1Char('}'); } indent = stepback; diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 67b3f93bcb..e8c9989fdf 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -1274,19 +1274,19 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) if (data->propType != 0) returnType = QMetaType::typeName(data->propType); - QByteArray signature = methods.at(ii).first.toUtf8() + "("; + QByteArray signature = methods.at(ii).first.toUtf8() + '('; QQmlPropertyCacheMethodArguments *arguments = 0; if (data->hasArguments()) { arguments = (QQmlPropertyCacheMethodArguments *)data->arguments; Q_ASSERT(arguments->argumentsValid); for (int ii = 0; ii < arguments->arguments[0]; ++ii) { - if (ii != 0) signature.append(","); + if (ii != 0) signature.append(','); signature.append(QMetaType::typeName(arguments->arguments[1 + ii])); } } - signature.append(")"); + signature.append(')'); QMetaMethodBuilder method; if (data->isSignal()) { diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 5deac8343e..3fc7ac7748 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1380,13 +1380,13 @@ static QV4::ReturnedValue writeToConsole(ConsoleLogTypes logType, CallContext *c result.append(QLatin1Char(' ')); if (ctx->args()[i].as()) - result.append(QStringLiteral("[") + ctx->args()[i].toQStringNoThrow() + QStringLiteral("]")); + result.append(QLatin1Char('[') + ctx->args()[i].toQStringNoThrow() + QLatin1Char(']')); else result.append(ctx->args()[i].toQStringNoThrow()); } if (printStack) { - result.append(QLatin1String("\n")); + result.append(QLatin1Char('\n')); result.append(jsStack(v4)); } diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index e646d59976..ce56bd661d 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -5712,7 +5712,7 @@ QString QQuickItemPrivate::dirtyToString() const { #define DIRTY_TO_STRING(value) if (dirtyAttributes & value) { \ if (!rv.isEmpty()) \ - rv.append(QLatin1String("|")); \ + rv.append(QLatin1Char('|')); \ rv.append(QLatin1String(#value)); \ } diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp index 93a9c98ffb..0d6375de1e 100644 --- a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp +++ b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp @@ -373,7 +373,7 @@ QString QSGShaderSourceBuilder::resolveShaderPath(const QString &path) const if (contextProfile() != QSurfaceFormat::CoreProfile) { return path; } else { - int idx = path.lastIndexOf(QStringLiteral(".")); + int idx = path.lastIndexOf(QLatin1Char('.')); QString resolvedPath; if (idx != -1) resolvedPath = path.left(idx) -- cgit v1.2.3 From dbe0be38cbdd9beec08cf98cdb283318571a7b16 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 11 Oct 2015 01:03:46 +0200 Subject: qquickitemchangelistener_p.h: remove an extra semi-colon Change-Id: I034fa0093aa6dad41c2566a8c7ef8fba9e7d4b82 Reviewed-by: Mitch Curtis --- src/quick/items/qquickitemchangelistener_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h index d987b62454..8ae7fc8da5 100644 --- a/src/quick/items/qquickitemchangelistener_p.h +++ b/src/quick/items/qquickitemchangelistener_p.h @@ -55,7 +55,7 @@ class QQuickAnchorsPrivate; class QQuickItemChangeListener { public: - virtual ~QQuickItemChangeListener() {}; + virtual ~QQuickItemChangeListener() {} virtual void itemGeometryChanged(QQuickItem *, const QRectF & /* new */, const QRectF & /* old */ ) {} virtual void itemSiblingOrderChanged(QQuickItem *) {} -- cgit v1.2.3 From 83cd7c27ae3d733537cd2cbf54a3ddf0a3c7bb99 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 11 Oct 2015 01:07:58 +0200 Subject: qquickitemchangelistener_p.h: add comments for the sake of clarity Change-Id: I63728b127d196d692f42b096e670ea0a3e336968 Reviewed-by: Mitch Curtis --- src/quick/items/qquickitemchangelistener_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h index 8ae7fc8da5..fd8076c6a2 100644 --- a/src/quick/items/qquickitemchangelistener_p.h +++ b/src/quick/items/qquickitemchangelistener_p.h @@ -62,9 +62,9 @@ public: virtual void itemVisibilityChanged(QQuickItem *) {} virtual void itemOpacityChanged(QQuickItem *) {} virtual void itemDestroyed(QQuickItem *) {} - virtual void itemChildAdded(QQuickItem *, QQuickItem *) {} - virtual void itemChildRemoved(QQuickItem *, QQuickItem *) {} - virtual void itemParentChanged(QQuickItem *, QQuickItem *) {} + virtual void itemChildAdded(QQuickItem *, QQuickItem * /* child */ ) {} + virtual void itemChildRemoved(QQuickItem *, QQuickItem * /* child */ ) {} + virtual void itemParentChanged(QQuickItem *, QQuickItem * /* parent */ ) {} virtual void itemRotationChanged(QQuickItem *) {} virtual void itemImplicitWidthChanged(QQuickItem *) {} virtual void itemImplicitHeightChanged(QQuickItem *) {} -- cgit v1.2.3 From 9e15fb156a0ef58584661a0599f1f85d7597e87c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 12 Oct 2015 17:33:51 +0200 Subject: Handle QSG_NO_DEPTH_BUFFER correctly Just not requesting a depth buffer is insufficient since there's nothing guaranteeing that the EGL or other implementation will return depthless configs. When the depth buffer is always there, setting the environment variable is futile. To do what the user has requested, the value has to be checked in the renderer too. Change-Id: I1f572bc6f2f5b5aa94070a239d6e871e3421a51f Reviewed-by: Louai Al-Khanji Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 8632ea0b52..60ada14c32 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -821,7 +821,8 @@ Renderer::Renderer(QSGRenderContext *ctx) m_vao->create(); } - m_useDepthBuffer = ctx->openglContext()->format().depthBufferSize() > 0; + bool useDepth = qEnvironmentVariableIsEmpty("QSG_NO_DEPTH_BUFFER"); + m_useDepthBuffer = useDepth && ctx->openglContext()->format().depthBufferSize() > 0; } static void qsg_wipeBuffer(Buffer *buffer, QOpenGLFunctions *funcs) @@ -1087,8 +1088,10 @@ void Renderer::nodeWasRemoved(Node *node) e->removed = true; m_elementsToDelete.add(e); - if (m_renderNodeElements.isEmpty()) - m_useDepthBuffer = context()->openglContext()->format().depthBufferSize() > 0; + if (m_renderNodeElements.isEmpty()) { + static bool useDepth = qEnvironmentVariableIsEmpty("QSG_NO_DEPTH_BUFFER"); + m_useDepthBuffer = useDepth && context()->openglContext()->format().depthBufferSize() > 0; + } } } -- cgit v1.2.3 From 35da68a15c12586415484def802839e67372eac1 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 25 Sep 2015 10:30:59 +0200 Subject: Provide a threaded TestHTTPServer This allows us to do blocking operations that interact with the test server in the main thread. The threaded server is used in tests that don't explicitly require asynchronous operation. Change-Id: Ibcb28e79a1114cb9cfb812e86aae0a1af71c569e Reviewed-by: Simon Hausmann --- .../auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 +- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 24 ++----- .../qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 4 +- .../tst_qquickanimatedimage.cpp | 4 +- tests/auto/quick/qquickloader/tst_qquickloader.cpp | 21 ++---- .../quick/qquicktextedit/tst_qquicktextedit.cpp | 17 +++-- .../quick/qquicktextinput/tst_qquicktextinput.cpp | 5 +- tests/auto/shared/testhttpserver.cpp | 79 ++++++++++++++++++++-- tests/auto/shared/testhttpserver.h | 28 ++++++++ 9 files changed, 127 insertions(+), 59 deletions(-) diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index f238bf6b90..b30dfcbd0b 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -4203,9 +4203,7 @@ void tst_qqmlecmascript::importScripts() QFETCH(QStringList, propertyNames); QFETCH(QVariantList, propertyValues); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory() + "/remote"); + ThreadedTestHTTPServer server(dataDirectory() + "/remote"); QStringList importPathList = engine.importPathList(); diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 3c7584bfa1..f1e12a0c00 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -2543,9 +2543,7 @@ void tst_qqmllanguage::basicRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); url = server.baseUrl().resolved(url); @@ -2590,9 +2588,7 @@ void tst_qqmllanguage::importsRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); qml.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); @@ -2685,9 +2681,7 @@ void tst_qqmllanguage::importsInstalledRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QString serverdir = server.urlString("/lib/"); engine.setImportPathList(QStringList(defaultImportPathList) << serverdir); @@ -2752,9 +2746,7 @@ void tst_qqmllanguage::importsPath() QFETCH(QString, qml); QFETCH(QString, value); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); for (int i = 0; i < importPath.count(); ++i) importPath[i].replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); @@ -3386,9 +3378,7 @@ void tst_qqmllanguage::registeredCompositeTypeWithAttachedProperty() // QTBUG-18268 void tst_qqmllanguage::remoteLoadCrash() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Text {}", server.url("/remoteLoadCrash.qml")); @@ -3877,9 +3867,7 @@ void tst_qqmllanguage::compositeSingletonQmlDirError() // Load a remote composite singleton type via qmldir that defines the type as a singleton void tst_qqmllanguage::compositeSingletonRemote() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QFile f(testFile("singletonTest15.qml")); QVERIFY(f.open(QIODevice::ReadOnly)); diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index 77fc67a1ac..89477609ca 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -239,9 +239,7 @@ void tst_qqmlmoduleplugin::importPluginWithQmlFile() void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(m_dataImportsDirectory); + ThreadedTestHTTPServer server(m_dataImportsDirectory); QQmlEngine engine; QQmlComponent component(&engine); diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp index 45694f38dd..f4c37b4d66 100644 --- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp +++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp @@ -252,9 +252,7 @@ void tst_qquickanimatedimage::remote() QFETCH(QString, fileName); QFETCH(bool, paused); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlEngine engine; QQmlComponent component(&engine, server.url(fileName)); diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index e72b38e06c..f4fab1d79f 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -435,9 +435,7 @@ void tst_QQuickLoader::noResize() void tst_QQuickLoader::networkRequestUrl() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlComponent component(&engine); const QString qml = "import QtQuick 2.0\nLoader { property int signalCount : 0; source: \"" + server.baseUrl().toString() + "/Rect120x60.qml\"; onLoaded: signalCount += 1 }"; @@ -460,9 +458,7 @@ void tst_QQuickLoader::networkRequestUrl() /* XXX Component waits until all dependencies are loaded. Is this actually possible? */ void tst_QQuickLoader::networkComponent() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQmlComponent component(&engine); const QString qml = "import QtQuick 2.0\n" @@ -471,8 +467,9 @@ void tst_QQuickLoader::networkComponent() " Component { id: comp; NW.Rect120x60 {} }\n" " Loader { sourceComponent: comp } }"; component.setData(qml.toUtf8(), dataDirectory()); - QCOMPARE(component.status(), QQmlComponent::Loading); - server.sendDelayedItem(); + // The component may be loaded synchronously or asynchronously, so we cannot test for + // status == Loading here. Also, it makes no sense to instruct the server to send here + // because in the synchronous case we're already done loading. QTRY_COMPARE(component.status(), QQmlComponent::Ready); QQuickItem *item = qobject_cast(component.create()); @@ -492,9 +489,7 @@ void tst_QQuickLoader::networkComponent() void tst_QQuickLoader::failNetworkRequest() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QTest::ignoreMessage(QtWarningMsg, QString(server.baseUrl().toString() + "/IDontExist.qml: File not found").toUtf8()); @@ -708,9 +703,7 @@ void tst_QQuickLoader::initialPropertyValues() QFETCH(QStringList, propertyNames); QFETCH(QVariantList, propertyValues); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); foreach (const QString &warning, expectedWarnings) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index ece9a0841b..e4473b9540 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -2599,9 +2599,7 @@ void tst_qquicktextedit::cursorDelegate() void tst_qquicktextedit::remoteCursorDelegate() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQuickView view; @@ -2737,20 +2735,21 @@ void tst_qquicktextedit::delegateLoading() QFETCH(QString, qmlfile); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(testFile("httpfail"), TestHTTPServer::Disconnect); - server.serveDirectory(testFile("httpslow"), TestHTTPServer::Delay); - server.serveDirectory(testFile("http")); + QHash dirs; + dirs[testFile("httpfail")] = TestHTTPServer::Disconnect; + dirs[testFile("httpslow")] = TestHTTPServer::Delay; + dirs[testFile("http")] = TestHTTPServer::Normal; + ThreadedTestHTTPServer server(dirs); error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); + if (!error.isEmpty()) + QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QQuickView view(server.url(qmlfile)); view.show(); view.requestActivate(); if (!error.isEmpty()) { - QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QTRY_VERIFY(view.status()==QQuickView::Error); QTRY_VERIFY(!view.rootObject()); // there is fail item inside this test } else { diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index ec62d1a57b..493c03d00e 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -2857,10 +2857,7 @@ void tst_qquicktextinput::cursorDelegate() void tst_qquicktextinput::remoteCursorDelegate() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); - + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQuickView view; QQmlComponent component(view.engine(), server.url("/RemoteCursor.qml")); diff --git a/tests/auto/shared/testhttpserver.cpp b/tests/auto/shared/testhttpserver.cpp index 6c466293b6..80ce10cacd 100644 --- a/tests/auto/shared/testhttpserver.cpp +++ b/tests/auto/shared/testhttpserver.cpp @@ -36,6 +36,7 @@ #include #include #include +#include /*! \internal @@ -80,6 +81,16 @@ The following request urls will then result in the appropriate action: \row \li http://localhost:14445/slowMain.qml \li slowMain.qml returned after 500ms \endtable */ + +static QUrl localHostUrl(quint16 port) +{ + QUrl url; + url.setScheme(QStringLiteral("http")); + url.setHost(QStringLiteral("127.0.0.1")); + url.setPort(port); + return url; +} + TestHTTPServer::TestHTTPServer() : m_state(AwaitingHeader) { @@ -93,11 +104,12 @@ bool TestHTTPServer::listen() QUrl TestHTTPServer::baseUrl() const { - QUrl url; - url.setScheme(QStringLiteral("http")); - url.setHost(QStringLiteral("127.0.0.1")); - url.setPort(m_server.serverPort()); - return url; + return localHostUrl(m_server.serverPort()); +} + +quint16 TestHTTPServer::port() const +{ + return m_server.serverPort(); } QUrl TestHTTPServer::url(const QString &documentPath) const @@ -377,3 +389,60 @@ void TestHTTPServer::serveGET(QTcpSocket *socket, const QByteArray &data) socket->disconnectFromHost(); } } + +ThreadedTestHTTPServer::ThreadedTestHTTPServer(const QString &dir, TestHTTPServer::Mode mode) : + m_port(0) +{ + m_dirs[dir] = mode; + start(); +} + +ThreadedTestHTTPServer::ThreadedTestHTTPServer(const QHash &dirs) : + m_dirs(dirs), m_port(0) +{ + start(); +} + +ThreadedTestHTTPServer::~ThreadedTestHTTPServer() +{ + quit(); + wait(); +} + +QUrl ThreadedTestHTTPServer::baseUrl() const +{ + return localHostUrl(m_port); +} + +QUrl ThreadedTestHTTPServer::url(const QString &documentPath) const +{ + return baseUrl().resolved(documentPath); +} + +QString ThreadedTestHTTPServer::urlString(const QString &documentPath) const +{ + return url(documentPath).toString(); +} + +void ThreadedTestHTTPServer::run() +{ + TestHTTPServer server; + { + QMutexLocker locker(&m_mutex); + QVERIFY2(server.listen(), qPrintable(server.errorString())); + m_port = server.port(); + for (QHash::ConstIterator i = m_dirs.constBegin(); + i != m_dirs.constEnd(); ++i) { + server.serveDirectory(i.key(), i.value()); + } + m_condition.wakeAll(); + } + exec(); +} + +void ThreadedTestHTTPServer::start() +{ + QMutexLocker locker(&m_mutex); + QThread::start(); + m_condition.wait(&m_mutex); +} diff --git a/tests/auto/shared/testhttpserver.h b/tests/auto/shared/testhttpserver.h index 0fc8e4a79c..bf826b247b 100644 --- a/tests/auto/shared/testhttpserver.h +++ b/tests/auto/shared/testhttpserver.h @@ -37,6 +37,9 @@ #include #include #include +#include +#include +#include class TestHTTPServer : public QObject { @@ -45,6 +48,7 @@ public: TestHTTPServer(); bool listen(); + quint16 port() const; QUrl baseUrl() const; QUrl url(const QString &documentPath) const; QString urlString(const QString &documentPath) const; @@ -100,5 +104,29 @@ private: QTcpServer m_server; }; +class ThreadedTestHTTPServer : public QThread +{ + Q_OBJECT +public: + ThreadedTestHTTPServer(const QString &dir, TestHTTPServer::Mode mode = TestHTTPServer::Normal); + ThreadedTestHTTPServer(const QHash &dirs); + ~ThreadedTestHTTPServer(); + + QUrl baseUrl() const; + QUrl url(const QString &documentPath) const; + QString urlString(const QString &documentPath) const; + +protected: + void run(); + +private: + void start(); + + QHash m_dirs; + quint16 m_port; + QMutex m_mutex; + QWaitCondition m_condition; +}; + #endif // TESTHTTPSERVER_H -- cgit v1.2.3 From 5de27a90e5771535365bc2d1b5c1241368877bf8 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 13 Oct 2015 10:35:52 +0200 Subject: QmlTooling: Rearrange qmltooling.pro Make the distinction between connectors and services a bit clearer. Change-Id: I5a8de587beaaed4b4b2138d9d50c5b92fea38df9 Reviewed-by: Ulf Hermann --- src/plugins/qmltooling/qmltooling.pro | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index ae13826a4c..e00e75599b 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -1,10 +1,14 @@ TEMPLATE = subdirs +# Connectors SUBDIRS += \ - qmldbg_debugger \ - qmldbg_local \ - qmldbg_profiler \ qmldbg_server \ - qmldbg_tcp + qmldbg_local \ + qmldbg_tcp + +# Services +SUBDIRS += \ + qmldbg_debugger \ + qmldbg_profiler qtHaveModule(quick): SUBDIRS += qmldbg_inspector -- cgit v1.2.3 From 4f3379352a265bab00a7265f85ffc38a9ca4ffe4 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 14 Oct 2015 11:00:35 +0200 Subject: QQuickItem: correct focus reason for key navigation Before we used Qt::OtherFocusReason for normal key navigation, such as up/down/left/right. But in style world, the reason is critical for focus change. Now we follow the way in widgets world, use Qt::TabFocusReason and Qt::BacktabFocusReason for down/up and right/left(or reversed if mirrored). Task-number: QTBUG-41801 Change-Id: I99e97ea4ced2cef9b3280c578c3a463de8fe1727 Reviewed-by: J-P Nurmi --- src/quick/items/qquickitem.cpp | 8 ++++---- tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index ce56bd661d..e030144676 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -622,7 +622,7 @@ void QQuickKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post) mirror = QQuickItemPrivate::get(parentItem)->effectiveLayoutMirror; QQuickItem* leftItem = mirror ? d->right : d->left; if (leftItem) { - setFocusNavigation(leftItem, mirror ? "right" : "left"); + setFocusNavigation(leftItem, mirror ? "right" : "left", mirror ? Qt::TabFocusReason : Qt::BacktabFocusReason); event->accept(); } break; @@ -632,20 +632,20 @@ void QQuickKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post) mirror = QQuickItemPrivate::get(parentItem)->effectiveLayoutMirror; QQuickItem* rightItem = mirror ? d->left : d->right; if (rightItem) { - setFocusNavigation(rightItem, mirror ? "left" : "right"); + setFocusNavigation(rightItem, mirror ? "left" : "right", mirror ? Qt::BacktabFocusReason : Qt::TabFocusReason); event->accept(); } break; } case Qt::Key_Up: if (d->up) { - setFocusNavigation(d->up, "up"); + setFocusNavigation(d->up, "up", Qt::BacktabFocusReason); event->accept(); } break; case Qt::Key_Down: if (d->down) { - setFocusNavigation(d->down, "down"); + setFocusNavigation(d->down, "down", Qt::TabFocusReason); event->accept(); } break; diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 9f3de8292f..f3351fcc4e 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -2089,10 +2089,14 @@ void tst_QQuickItem::keyNavigation_focusReason() QVERIFY(key.isAccepted()); QCOMPARE(focusEventFilter.lastFocusReason, Qt::BacktabFocusReason); - // some arbitrary cursor key + // right - it's also one kind of key navigation key = QKeyEvent(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1); QGuiApplication::sendEvent(window, &key); QVERIFY(key.isAccepted()); + QCOMPARE(focusEventFilter.lastFocusReason, Qt::TabFocusReason); + + item->setFocus(true, Qt::OtherFocusReason); + QVERIFY(item->hasActiveFocus()); QCOMPARE(focusEventFilter.lastFocusReason, Qt::OtherFocusReason); delete window; -- cgit v1.2.3