aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-14 15:48:12 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-14 15:48:12 +0200
commit7063fefe4b5e866b27001bb9b911fc2f68034e40 (patch)
tree1ce35139475d83399572a3265414c2da3443a321 /src/quick/items
parentf3446071da8357620d0c8593a04e3b4fbba88f21 (diff)
parent4f3379352a265bab00a7265f85ffc38a9ca4ffe4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/context2d/qquickcanvascontext_p.h11
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp23
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2d_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dtile_p.h11
-rw-r--r--src/quick/items/qquickaccessibleattached_p.h11
-rw-r--r--src/quick/items/qquickanchors_p.h11
-rw-r--r--src/quick/items/qquickanimatedimage_p.h11
-rw-r--r--src/quick/items/qquickanimatedsprite_p.h11
-rw-r--r--src/quick/items/qquickborderimage_p.h11
-rw-r--r--src/quick/items/qquickclipnode_p.h11
-rw-r--r--src/quick/items/qquickdrag_p.h11
-rw-r--r--src/quick/items/qquickdroparea_p.h11
-rw-r--r--src/quick/items/qquickflickable.cpp14
-rw-r--r--src/quick/items/qquickflickable_p.h11
-rw-r--r--src/quick/items/qquickflickable_p_p.h1
-rw-r--r--src/quick/items/qquickflickablebehavior_p.h11
-rw-r--r--src/quick/items/qquickflipable_p.h11
-rw-r--r--src/quick/items/qquickfocusscope_p.h11
-rw-r--r--src/quick/items/qquickframebufferobject.cpp6
-rw-r--r--src/quick/items/qquickgridview_p.h11
-rw-r--r--src/quick/items/qquickimage.cpp7
-rw-r--r--src/quick/items/qquickimage_p.h11
-rw-r--r--src/quick/items/qquickimagebase.cpp2
-rw-r--r--src/quick/items/qquickimagebase_p.h11
-rw-r--r--src/quick/items/qquickimplicitsizeitem_p.h11
-rw-r--r--src/quick/items/qquickitem.cpp30
-rw-r--r--src/quick/items/qquickitem_p.h1
-rw-r--r--src/quick/items/qquickitemanimation_p.h11
-rw-r--r--src/quick/items/qquickitemchangelistener_p.h8
-rw-r--r--src/quick/items/qquickitemsmodule_p.h11
-rw-r--r--src/quick/items/qquickitemview_p.h11
-rw-r--r--src/quick/items/qquickitemview_p_p.h11
-rw-r--r--src/quick/items/qquickitemviewtransition.cpp6
-rw-r--r--src/quick/items/qquickitemviewtransition_p.h11
-rw-r--r--src/quick/items/qquicklistview_p.h11
-rw-r--r--src/quick/items/qquickloader_p.h11
-rw-r--r--src/quick/items/qquickmousearea_p.h11
-rw-r--r--src/quick/items/qquickmultipointtoucharea_p.h11
-rw-r--r--src/quick/items/qquickpainteditem_p.h11
-rw-r--r--src/quick/items/qquickpathview_p.h11
-rw-r--r--src/quick/items/qquickpincharea.cpp2
-rw-r--r--src/quick/items/qquickpincharea_p.h11
-rw-r--r--src/quick/items/qquickpositioners_p.h11
-rw-r--r--src/quick/items/qquickrectangle_p.h11
-rw-r--r--src/quick/items/qquickrepeater_p.h11
-rw-r--r--src/quick/items/qquickscalegrid_p_p.h11
-rw-r--r--src/quick/items/qquickscreen.cpp27
-rw-r--r--src/quick/items/qquickscreen_p.h13
-rw-r--r--src/quick/items/qquickshadereffect.cpp8
-rw-r--r--src/quick/items/qquickshadereffect_p.h11
-rw-r--r--src/quick/items/qquickshadereffectmesh_p.h11
-rw-r--r--src/quick/items/qquickshadereffectnode_p.h11
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h11
-rw-r--r--src/quick/items/qquicksprite_p.h11
-rw-r--r--src/quick/items/qquickspriteengine_p.h11
-rw-r--r--src/quick/items/qquickspritesequence_p.h11
-rw-r--r--src/quick/items/qquickstateoperations_p.h11
-rw-r--r--src/quick/items/qquicktext_p.h11
-rw-r--r--src/quick/items/qquicktextedit.cpp19
-rw-r--r--src/quick/items/qquicktextedit_p.h11
-rw-r--r--src/quick/items/qquicktextedit_p_p.h5
-rw-r--r--src/quick/items/qquicktextinput.cpp19
-rw-r--r--src/quick/items/qquicktextinput_p.h11
-rw-r--r--src/quick/items/qquicktextinput_p_p.h5
-rw-r--r--src/quick/items/qquicktextnode_p.h11
-rw-r--r--src/quick/items/qquicktextnodeengine_p.h11
-rw-r--r--src/quick/items/qquicktranslate_p.h11
-rw-r--r--src/quick/items/qquickview_p.h11
-rw-r--r--src/quick/items/qquickwindow.cpp31
-rw-r--r--src/quick/items/qquickwindow_p.h2
-rw-r--r--src/quick/items/qquickwindowattached_p.h11
-rw-r--r--src/quick/items/qquickwindowmodule_p.h11
75 files changed, 750 insertions, 84 deletions
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 <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 9932747dd3..9abca59b1c 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
@@ -783,6 +774,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()) {
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 <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
#include <QtCore/QThread>
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 <QtQuick/qtquickglobal.h>
#include <QtQml/qqml.h>
#include <QtQml/qqmlcomponent.h>
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 <QtCore/qmutex.h>
#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 <QtQuick/qsgtexture.h>
#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 <QOpenGLFramebufferObject>
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 <QtQuick/qquickitem.h>
#include <QtCore/qobject.h>
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 <qqml.h>
#include <QtCore/QObject>
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 <QtQuick/QQuickItem>
#include <private/qquicksprite_p.h>
#include <QTime>
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 <private/qtquickglobal_p.h>
#include <QtQuick/qsgnode.h>
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 <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
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 <private/qqmlguard_p.h>
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index ea4398bc71..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)
@@ -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;
@@ -2206,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.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 <private/qtquickglobal_p.h>
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/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 <QtGui/qtransform.h>
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/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 74abd8cf9f..5ce3ae57f7 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -342,6 +342,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()) {
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.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;
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 <QtQuick/qsgtextureprovider.h>
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp
index 1ad37ef414..c37e6c942c 100644
--- a/src/quick/items/qquickimagebase.cpp
+++ b/src/quick/items/qquickimagebase.cpp
@@ -320,7 +320,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();
}
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 <private/qtquickglobal_p.h>
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 <private/qtquickglobal_p.h>
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 6b7d465b3b..b378398730 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;
@@ -3077,6 +3077,7 @@ QQuickItemPrivate::QQuickItemPrivate()
, implicitAntialiasing(false)
, antialiasingValid(false)
, isTabFence(false)
+ , replayingPressEvent(false)
, dirtyAttributes(0)
, nextDirtyItem(0)
, prevDirtyItem(0)
@@ -5711,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)); \
}
@@ -7445,9 +7446,11 @@ bool QQuickItem::event(QEvent *ev)
dropEvent(static_cast<QDropEvent*>(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);
}
@@ -7560,6 +7563,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)
{
@@ -7684,7 +7689,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)
@@ -7724,6 +7729,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)
@@ -7757,6 +7764,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)
@@ -7779,6 +7787,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)
@@ -7797,6 +7807,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)
@@ -7820,6 +7832,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)
@@ -7850,6 +7864,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)
@@ -7901,7 +7917,7 @@ void QQuickItemLayer::setTextureMirroring(QQuickShaderEffectSource::TextureMirro
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) {
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/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 <QtQuick/private/qquickanimation_p.h>
diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h
index d987b62454..fd8076c6a2 100644
--- a/src/quick/items/qquickitemchangelistener_p.h
+++ b/src/quick/items/qquickitemchangelistener_p.h
@@ -55,16 +55,16 @@ class QQuickAnchorsPrivate;
class QQuickItemChangeListener
{
public:
- virtual ~QQuickItemChangeListener() {};
+ virtual ~QQuickItemChangeListener() {}
virtual void itemGeometryChanged(QQuickItem *, const QRectF & /* new */, const QRectF & /* old */ ) {}
virtual void itemSiblingOrderChanged(QQuickItem *) {}
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 *) {}
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 <qqml.h>
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 <qpointer.h>
#include <QtCore/QLoggingCategory>
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.cpp b/src/quick/items/qquickitemviewtransition.cpp
index 6fa299bf03..565377df58 100644
--- a/src/quick/items/qquickitemviewtransition.cpp
+++ b/src/quick/items/qquickitemviewtransition.cpp
@@ -851,7 +851,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.
@@ -861,7 +861,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.
@@ -870,7 +870,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.
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 <QtQuick/private/qtquickglobal_p.h>
#include <QtCore/qobject.h>
#include <QtCore/qpoint.h>
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 <private/qtquickglobal_p.h>
#include <QtCore/qstringlist.h>
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 <QtGui/qcolor.h>
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 <private/qquickpath_p.h>
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/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 <QtGui/qbrush.h>
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 <QtQml/qqml.h>
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()));
diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h
index 3d0f00b22c..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 <qqml.h>
#include <QRect>
#include <QSize>
@@ -102,7 +113,7 @@ protected Q_SLOTS:
void screenChanged(QScreen*);
private:
- QScreen* m_screen;
+ QPointer<QScreen> m_screen;
QQuickWindow* m_window;
QQuickItem* m_attachee;
Qt::ScreenOrientations m_updateMask;
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
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 <QtQuick/qquickitem.h>
#include <QtQuick/qsgmaterial.h>
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 <QtQuick/qsgnode.h>
#include <QtQuick/qsgmaterial.h>
#include <QtQuick/qsgtextureprovider.h>
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 <QtQuick/qsgtextureprovider.h>
#include <private/qsgadaptationlayer_p.h>
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 <QObject>
#include <QUrl>
#include <QVariantMap>
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 <QObject>
#include <QVector>
#include <QTimer>
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 <QtQuick/QQuickItem>
#include <QTime>
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 <private/qtquickglobal_p.h>
#include <QtGui/qtextoption.h>
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 5523beb72a..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);
@@ -2115,7 +2128,7 @@ QQuickTextEditPrivate::ExtraData::ExtraData()
, explicitLeftPadding(false)
, explicitRightPadding(false)
, explicitBottomPadding(false)
- , explicitImplicitSize(false)
+ , implicitResize(true)
{
}
@@ -2346,7 +2359,7 @@ void QQuickTextEdit::updateSize()
const bool wasInLayout = d->inLayout;
d->inLayout = true;
- if (!d->extra.isAllocated() || !d->extra->explicitImplicitSize)
+ 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->explicitImplicitSize) {
+ 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.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 <QtGui/qtextoption.h>
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h
index e6f1c0ee21..a2b4c1ab99 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<ExtraData> extra;
@@ -159,6 +159,9 @@ public:
void setRightPadding(qreal value, bool reset = false);
void setBottomPadding(qreal value, bool reset = false);
+ bool isImplicitResizeEnabled() const;
+ void setImplicitResizeEnabled(bool enabled);
+
QColor color;
QColor selectionColor;
QColor selectedTextColor;
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index d69c489b2d..ab8e75bfef 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)
{
}
@@ -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->explicitImplicitSize)
+ 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->explicitImplicitSize) {
+ 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.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 <QtGui/qtextoption.h>
#include <QtGui/qvalidator.h>
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index fa7462c0c5..6aaa630839 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<ExtraData> extra;
@@ -447,6 +447,9 @@ public:
void setRightPadding(qreal value, bool reset = false);
void setBottomPadding(qreal value, bool reset = false);
+ bool isImplicitResizeEnabled() const;
+ void setImplicitResizeEnabled(bool enabled);
+
private:
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);
diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h
index 6063813a8d..01de0dbf2f 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 <QtQuick/qsgnode.h>
#include "qquicktext_p.h"
#include <qglyphrun.h>
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 <QtGui/qmatrix4x4.h>
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 <QtCore/qurl.h>
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 8ab910f299..c8256ed62a 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1401,9 +1401,11 @@ bool QQuickWindow::event(QEvent *e)
d->windowManager->handleUpdateRequest(this);
break;
}
+#ifndef QT_NO_GESTURES
case QEvent::NativeGesture:
d->deliverNativeGestureEvent(d->contentItem, static_cast<QNativeGestureEvent*>(e));
break;
+#endif
default:
break;
}
@@ -1432,29 +1434,8 @@ 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
- 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)
@@ -1780,6 +1761,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);
@@ -1811,6 +1793,7 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes
return false;
}
+#endif // QT_NO_GESTURES
bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event)
{
@@ -2452,9 +2435,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/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 0d33d2398a..e475c48b0a 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<QTouchEvent::TouchPoint> &, QSet<int> *,
QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *, QSet<QQuickItem*> *filtered);
void deliverTouchEvent(QTouchEvent *);
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 <qqml.h>
#include <QWindow>
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 <private/qtquickglobal_p.h>
#include <qquickwindow.h>
#include <qqmlparserstatus.h>