diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-02 20:56:11 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-02 20:56:12 +0200 |
commit | b1f45e8b04204d26ef0522e67d49f26247aa8b3b (patch) | |
tree | ca73598b798d309a5a82b858d8689889d03ee5bc | |
parent | 99c96eb1042575a7ca5ba534f453c679c6dc9cd8 (diff) | |
parent | f390e86c057265446f1467b158c1088212dc93b4 (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 17 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickrepeater.cpp | 9 | ||||
-rw-r--r-- | src/quick/items/qquicktextcontrol.cpp | 2 | ||||
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 9 | ||||
-rw-r--r-- | tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp | 3 |
6 files changed, 33 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index b4a045edfb..ce85e48b72 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -146,12 +146,29 @@ struct Q_QML_PRIVATE_EXPORT Value QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const { Heap::Base *b; +#ifdef __ia64 +// Restore bits 49-47 to bits 63-61, undoing the workaround explained in +// setM below. + quint64 _tmp; + + _tmp = _val & (7L << 47); // 0x3800000000000 + _tmp = (_tmp << 14) | (_val ^ _tmp); + memcpy(&b, &_tmp, 8); +#else memcpy(&b, &_val, 8); +#endif return b; } QML_NEARLY_ALWAYS_INLINE void setM(Heap::Base *b) { memcpy(&_val, &b, 8); +#ifdef __ia64 +// On ia64, bits 63-61 in a 64-bit pointer are used to store the virtual region +// number. Since this implementation is not 64-bit clean, we move bits 63-61 +// to bits 49-47 and hope for the best. This is undone in *m(), above. + _val |= ((_val & (7L << 61)) >> 14); + _val &= ((1L << 50)-1); +#endif } #elif QT_POINTER_SIZE == 4 QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 83196f4577..29b19b433f 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -2568,7 +2568,8 @@ void qmlUnregisterType(int typeIndex) QMutexLocker lock(metaTypeDataLock()); QQmlMetaTypeData *data = metaTypeData(); { - const QQmlTypePrivate *d = data->types.value(typeIndex).priv(); + const QQmlType type = data->types.value(typeIndex); + const QQmlTypePrivate *d = type.priv(); if (d) { removeQQmlTypePrivate(data->idToType, d); removeQQmlTypePrivate(data->nameToType, d); @@ -2580,6 +2581,7 @@ void qmlUnregisterType(int typeIndex) modulePrivate->remove(d); } data->types[typeIndex] = QQmlType(); + data->undeletableTypes.remove(type); } } } diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index 805b6fe190..0c00fecead 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -121,16 +121,17 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() Also, note that Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects. For example, it cannot be used to repeat QtObjects: - \code - //bad code + + \qml + // bad code: Item { - Can't repeat QtObject as it doesn't derive from Item. + // Can't repeat QtObject as it doesn't derive from Item. Repeater { model: 10 QtObject {} } } - \endcode + \endqml */ /*! diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp index caef24293a..ac8093e10b 100644 --- a/src/quick/items/qquicktextcontrol.cpp +++ b/src/quick/items/qquicktextcontrol.cpp @@ -1403,7 +1403,7 @@ QVariant QQuickTextControl::inputMethodQuery(Qt::InputMethodQuery property, QVar case Qt::ImAnchorPosition: return QVariant(d->cursor.anchor() - block.position()); case Qt::ImAbsolutePosition: - return QVariant(d->cursor.anchor()); + return QVariant(d->cursor.position()); case Qt::ImTextAfterCursor: { int maxLength = argument.isValid() ? argument.toInt() : 1024; diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index f1a0f0c863..b63f7de9f1 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1314,9 +1314,13 @@ void QQuickWidget::mouseDoubleClickEvent(QMouseEvent *e) void QQuickWidget::showEvent(QShowEvent *) { Q_D(QQuickWidget); + bool shouldTriggerUpdate = true; + if (!d->useSoftwareRenderer) { d->createContext(); + if (d->offscreenWindow->openglContext()) { + shouldTriggerUpdate = false; d->render(true); // render() may have led to a QQuickWindow::update() call (for // example, having a scene with a QQuickFramebufferObject::Renderer @@ -1329,11 +1333,12 @@ void QQuickWidget::showEvent(QShowEvent *) d->updatePending = false; update(); } - } else { - triggerUpdate(); } } + if (shouldTriggerUpdate) + triggerUpdate(); + // note offscreenWindow is "QQuickOffScreenWindow" instance d->offscreenWindow->setVisible(true); if (QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>()) diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp index fd5c3653ad..691dfd1bc6 100644 --- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp +++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp @@ -449,9 +449,6 @@ void tst_qquickwidget::reparentToNewWindow() qqw->setParent(&window2); qqw->show(); - if (QGuiApplication::platformName() == QLatin1String("offscreen")) - QEXPECT_FAIL("", "afterRendering not emitted after reparenting on offscreen", Continue); - QTRY_VERIFY(afterRenderingSpy.size() > 0); QImage img = qqw->grabFramebuffer(); |