aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-01 01:00:14 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-01 01:00:14 +0100
commit1a0b06bca7e6e23aede9dc624c7e4037cf486105 (patch)
tree199ea84d1c3410ef29414774dab1f07f099af6a3 /src/quick
parent3ed8744d24032fdaa9c84f32f918a3027cb0420f (diff)
parent2609429d7afc263ab8e44864b0f42f1c8356eda8 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/accessible/qaccessiblequickitem.cpp10
-rw-r--r--src/quick/items/qquickevents_p_p.h2
-rw-r--r--src/quick/items/qquickflickable_p.h9
-rw-r--r--src/quick/items/qquicktext_p.h6
-rw-r--r--src/quick/items/qquickwindow.cpp8
-rw-r--r--src/quick/scenegraph/qsgbasicinternalimagenode.cpp3
-rw-r--r--src/quick/util/qquickstategroup.cpp5
7 files changed, 31 insertions, 12 deletions
diff --git a/src/quick/accessible/qaccessiblequickitem.cpp b/src/quick/accessible/qaccessiblequickitem.cpp
index 87e581384b..98e7663c96 100644
--- a/src/quick/accessible/qaccessiblequickitem.cpp
+++ b/src/quick/accessible/qaccessiblequickitem.cpp
@@ -205,14 +205,16 @@ QAccessible::Role QAccessibleQuickItem::role() const
// Workaround for setAccessibleRole() not working for
// Text items. Text items are special since they are defined
// entirely from C++ (setting the role from QML works.)
- if (qobject_cast<QQuickText*>(const_cast<QQuickItem *>(item())))
- return QAccessible::StaticText;
QAccessible::Role role = QAccessible::NoRole;
if (item())
role = QQuickItemPrivate::get(item())->accessibleRole();
- if (role == QAccessible::NoRole)
- role = QAccessible::Client;
+ if (role == QAccessible::NoRole) {
+ if (qobject_cast<QQuickText*>(const_cast<QQuickItem *>(item())))
+ role = QAccessible::StaticText;
+ else
+ role = QAccessible::Client;
+ }
return role;
}
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index f3ce04d11e..d1a8bbd901 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -450,6 +450,8 @@ protected:
Qt::MouseButton m_button = Qt::NoButton;
Qt::MouseButtons m_pressedButtons;
+ friend class QQuickWindowPrivate;
+
Q_DISABLE_COPY(QQuickPointerEvent)
};
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h
index 57cc2533a0..7e9b18e101 100644
--- a/src/quick/items/qquickflickable_p.h
+++ b/src/quick/items/qquickflickable_p.h
@@ -267,10 +267,11 @@ Q_SIGNALS:
Q_REVISION(9) void horizontalOvershootChanged();
Q_REVISION(9) void verticalOvershootChanged();
- Q_REVISION(12) void atXEndChanged();
- Q_REVISION(12) void atYEndChanged();
- Q_REVISION(12) void atXBeginningChanged();
- Q_REVISION(12) void atYBeginningChanged();
+ // The next four signals should be marked as Q_REVISION(12). See QTBUG-71243
+ void atXEndChanged();
+ void atYEndChanged();
+ void atXBeginningChanged();
+ void atYBeginningChanged();
protected:
bool childMouseEventFilter(QQuickItem *, QEvent *) override;
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index f4e7fa7046..1af60051fb 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -272,8 +272,10 @@ Q_SIGNALS:
void textFormatChanged(QQuickText::TextFormat textFormat);
void elideModeChanged(QQuickText::TextElideMode mode);
void contentSizeChanged();
- Q_REVISION(12) void contentWidthChanged(qreal contentWidth);
- Q_REVISION(12) void contentHeightChanged(qreal contentHeight);
+ // The next two signals should be marked as Q_REVISION(12). See QTBUG-71247
+ void contentWidthChanged(qreal contentWidth);
+ void contentHeightChanged(qreal contentHeight);
+
void lineHeightChanged(qreal lineHeight);
void lineHeightModeChanged(LineHeightMode mode);
void fontSizeModeChanged();
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index d27ee54c89..4f14eedd39 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2548,6 +2548,10 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent *event,
}
for (QQuickItem *item : targetItems) {
+ if (!event->m_event) {
+ qWarning("event went missing during delivery! (nested sendEvent() is not allowed)");
+ break;
+ }
hasFiltered.clear();
if (!handlersOnly && sendFilteredPointerEvent(event, item)) {
if (event->isAccepted()) {
@@ -2562,6 +2566,10 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent *event,
// nor to any item which already had a chance to filter.
if (skipDelivery.contains(item))
continue;
+ if (!event->m_event) {
+ qWarning("event went missing during delivery! (nested sendEvent() is not allowed)");
+ break;
+ }
deliverMatchingPointsToItem(item, event, handlersOnly);
if (event->allPointsAccepted())
handlersOnly = true;
diff --git a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
index 53271af9ab..03b48b4b8a 100644
--- a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
+++ b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
@@ -230,6 +230,9 @@ QSGGeometry *QSGBasicInternalImageNode::updateGeometry(const QRectF &targetRect,
++vCells;
if (innerTargetRect.bottom() != targetRect.bottom())
++vCells;
+ if (hCells * vCells * 4 >= 0x10000)
+ qWarning("QTBUG-58924 - Too many tiles in QSGInternalImageNode, rendering will be partially missing.");
+
QVarLengthArray<X, 32> xData(2 * hCells);
QVarLengthArray<Y, 32> yData(2 * vCells);
X *xs = xData.data();
diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp
index 3d8c5e0507..d8daec2f07 100644
--- a/src/quick/util/qquickstategroup.cpp
+++ b/src/quick/util/qquickstategroup.cpp
@@ -302,7 +302,8 @@ void QQuickStateGroup::componentComplete()
Q_D(QQuickStateGroup);
d->componentComplete = true;
- QSet<QString> names;
+ QVarLengthArray<QString, 4> names;
+ names.reserve(d->states.count());
for (int ii = 0; ii < d->states.count(); ++ii) {
QQuickState *state = d->states.at(ii);
if (!state->isNamed())
@@ -312,7 +313,7 @@ void QQuickStateGroup::componentComplete()
if (names.contains(stateName)) {
qmlWarning(state->parent()) << "Found duplicate state name: " << stateName;
} else {
- names << stateName;
+ names.append(std::move(stateName));
}
}