diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 12:39:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 12:39:11 +0200 |
commit | e137877eaaa3975a6769fd2dd574bd75876fcfa5 (patch) | |
tree | a397bdb1389ea02e6fb7b083e3e149b8a0de50cf | |
parent | 6b53e7e16df0a2451d2b7948ad35485301c564b6 (diff) | |
parent | 369998639b37b5de46ab1b19b3dd6ca6c2b77d34 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
examples/quick/demos/photoviewer/i18n/qml_de.ts
examples/quick/demos/photoviewer/i18n/qml_fr.ts
examples/quick/demos/photoviewer/photoviewer.pro
examples/quick/demos/photoviewer/qml.qrc
src/qml/compiler/qv4instr_moth_p.h
tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
Change-Id: Ibea76b468577c2a68bd305cee82ae6444d0f8073
-rw-r--r-- | examples/qml/qml-i18n/i18n/base.ts | 4 | ||||
-rw-r--r-- | examples/qml/qml-i18n/i18n/qml_en.ts | 4 | ||||
-rw-r--r-- | examples/qml/qml-i18n/i18n/qml_en_AU.ts | 4 | ||||
-rw-r--r-- | examples/qml/qml-i18n/i18n/qml_fr.ts | 4 | ||||
-rw-r--r-- | examples/quick/demos/photoviewer/i18n/qml_en.qm | bin | 0 -> 23 bytes | |||
-rw-r--r-- | examples/quick/demos/photoviewer/i18n/qml_en.ts | 4 | ||||
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 4 | ||||
-rw-r--r-- | src/qml/types/qqmlitemselectionmodel.qdoc | 41 | ||||
-rw-r--r-- | src/quick/doc/src/qtquick.qdoc | 2 | ||||
-rw-r--r-- | src/quick/util/qquicktransition.cpp | 1 | ||||
-rw-r--r-- | tests/auto/quick/qquickanimations/data/replacingTransitions.qml | 51 | ||||
-rw-r--r-- | tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | 37 |
12 files changed, 57 insertions, 99 deletions
diff --git a/examples/qml/qml-i18n/i18n/base.ts b/examples/qml/qml-i18n/i18n/base.ts index 07e00f3ad2..77c640f370 100644 --- a/examples/qml/qml-i18n/i18n/base.ts +++ b/examples/qml/qml-i18n/i18n/base.ts @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" sourcelanguage="en"> +<TS version="2.1" sourcelanguage="en"> <context> <name>qml-i18n</name> <message> - <location filename="../qml-i18n.qml" line="56"/> + <location filename="../qml-i18n.qml" line="66"/> <source>Hello</source> <translation type="unfinished"></translation> </message> diff --git a/examples/qml/qml-i18n/i18n/qml_en.ts b/examples/qml/qml-i18n/i18n/qml_en.ts new file mode 100644 index 0000000000..eb9b75f7bf --- /dev/null +++ b/examples/qml/qml-i18n/i18n/qml_en.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en" sourcelanguage="en"> +</TS> diff --git a/examples/qml/qml-i18n/i18n/qml_en_AU.ts b/examples/qml/qml-i18n/i18n/qml_en_AU.ts index 047817d006..86ccfb7bf8 100644 --- a/examples/qml/qml-i18n/i18n/qml_en_AU.ts +++ b/examples/qml/qml-i18n/i18n/qml_en_AU.ts @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="en_AU" sourcelanguage="en"> +<TS version="2.1" language="en_AU" sourcelanguage="en"> <context> <name>qml-i18n</name> <message> - <location filename="../qml-i18n.qml" line="56"/> + <location filename="../qml-i18n.qml" line="66"/> <source>Hello</source> <translation>G'day</translation> </message> diff --git a/examples/qml/qml-i18n/i18n/qml_fr.ts b/examples/qml/qml-i18n/i18n/qml_fr.ts index 41ca3a9194..363bebb395 100644 --- a/examples/qml/qml-i18n/i18n/qml_fr.ts +++ b/examples/qml/qml-i18n/i18n/qml_fr.ts @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="fr" sourcelanguage="en"> +<TS version="2.1" language="fr" sourcelanguage="en"> <context> <name>qml-i18n</name> <message> - <location filename="../qml-i18n.qml" line="56"/> + <location filename="../qml-i18n.qml" line="66"/> <source>Hello</source> <translation>Bonjour</translation> </message> diff --git a/examples/quick/demos/photoviewer/i18n/qml_en.qm b/examples/quick/demos/photoviewer/i18n/qml_en.qm Binary files differnew file mode 100644 index 0000000000..9dad8dffce --- /dev/null +++ b/examples/quick/demos/photoviewer/i18n/qml_en.qm diff --git a/examples/quick/demos/photoviewer/i18n/qml_en.ts b/examples/quick/demos/photoviewer/i18n/qml_en.ts new file mode 100644 index 0000000000..5315a75526 --- /dev/null +++ b/examples/quick/demos/photoviewer/i18n/qml_en.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en"> +</TS> diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 4e2dd370c4..ce92a31590 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -383,9 +383,7 @@ QT_BEGIN_NAMESPACE nargs, nargs, #define MOTH_DECODE_ARG(arg, type, nargs, offset) \ - arg = qFromLittleEndian<type>( \ - static_cast<const void *>( \ - &reinterpret_cast<const type *>(code)[-nargs + offset])); + arg = qFromLittleEndian<type>(qFromUnaligned<type>(reinterpret_cast<const type *>(code) - nargs + offset)); #define MOTH_ADJUST_CODE(type, nargs) \ code += static_cast<quintptr>(nargs*sizeof(type) + 1) diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc index 29ac1aa17a..64c0429acd 100644 --- a/src/qml/types/qqmlitemselectionmodel.qdoc +++ b/src/qml/types/qqmlitemselectionmodel.qdoc @@ -108,14 +108,55 @@ /*! \qmlmethod void ItemSelectionModel::setCurrentIndex(QModelIndex index, SelectionFlags command) + + Sets the model item \a index to be the current item, and emits + currentChanged(). The current item is used for keyboard navigation and + focus indication; it is independent of any selected items, although a + selected item can also be the current item. + + Depending on the specified \a command, the \a index can also become part + of the current selection. + + Valid \a command values are described in \l {itemselectionmodelselectindex} + {select(\e index, \e command)}. + + \sa select() */ /*! \qmlmethod void ItemSelectionModel::select(QModelIndex index, SelectionFlags command) + \keyword itemselectionmodelselectindex + + Selects the model item \a index using the specified \a command, and emits + selectionChanged(). + + Valid values for the \a command parameter, are: + + \value NoUpdate No selection will be made. + \value Clear The complete selection will be cleared. + \value Select All specified indexes will be selected. + \value Deselect All specified indexes will be deselected. + \value Toggle All specified indexes will be selected or + deselected depending on their current state. + \value Current The current selection will be updated. + \value Rows All indexes will be expanded to span rows. + \value Columns All indexes will be expanded to span columns. + \value SelectCurrent A combination of Select and Current, provided for + convenience. + \value ToggleCurrent A combination of Toggle and Current, provided for + convenience. + \value ClearAndSelect A combination of Clear and Select, provided for + convenience. */ /*! \qmlmethod void ItemSelectionModel::select(QItemSelection selection, SelectionFlags command) + + Selects the item \a selection using the specified \a command, and emits + selectionChanged(). + + Valid \a command values are described in \l {itemselectionmodelselectindex} + {select(\e index, \e command)}. */ /*! diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc index 4b843f366b..7f72217279 100644 --- a/src/quick/doc/src/qtquick.qdoc +++ b/src/quick/doc/src/qtquick.qdoc @@ -43,7 +43,7 @@ QML types for creating user interfaces with the QML language, and a \l{Qt Quick C++ Classes}{C++ API} for extending QML applications with C++ code. \note A set of Qt Quick-based UI controls is also available to create user -interfaces. See \l{Qt Quick Controls} for more information. +interfaces. See \l{Qt Quick Controls 2} for more information. For those new to QML and Qt Quick, please see \l{QML Applications} diff --git a/src/quick/util/qquicktransition.cpp b/src/quick/util/qquicktransition.cpp index ad451c8f8b..c8699426f2 100644 --- a/src/quick/util/qquicktransition.cpp +++ b/src/quick/util/qquicktransition.cpp @@ -211,7 +211,6 @@ QQuickTransitionInstance::QQuickTransitionInstance(QQuickTransition *transition, QQuickTransitionInstance::~QQuickTransitionInstance() { - stop(); removeStateChangeListener(); delete m_anim; } diff --git a/tests/auto/quick/qquickanimations/data/replacingTransitions.qml b/tests/auto/quick/qquickanimations/data/replacingTransitions.qml deleted file mode 100644 index ff7c50cd67..0000000000 --- a/tests/auto/quick/qquickanimations/data/replacingTransitions.qml +++ /dev/null @@ -1,51 +0,0 @@ -import QtQuick 2.9 - -Rectangle { - id: theRoot - property alias model: theModel - property alias addTimer: addToModel - property alias addTransition: addTrans - property alias displaceTransition: displaceTrans - - width: 400 - height: 400 - - ListModel { - id: theModel - } - Timer { - id: addToModel - interval: 1000 - running: false - repeat: true - onTriggered: { - theModel.insert(0, {"name": "item " + theModel.count}) - if (theModel.count > 2) - stop() - } - } - Component { - id: listDelegate - Text { - text: name - } - } - ListView { - id: listView - - property int animationDuration: 10000 - - anchors.fill: parent - model: theModel - delegate: listDelegate - add: Transition { - id: addTrans - NumberAnimation { properties: "x"; from: 400; duration: listView.animationDuration } - NumberAnimation { properties: "y"; from: 400; duration: listView.animationDuration } - } - addDisplaced: Transition { - id: displaceTrans - NumberAnimation { properties: "x,y"; duration: listView.animationDuration } - } - } -} diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index 0f095774e8..3cfe03a376 100644 --- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -29,8 +29,6 @@ #include <QtQml/qqmlengine.h> #include <QtQml/qqmlcomponent.h> #include <QtQuick/qquickview.h> -#include <QtQml/private/qqmltimer_p.h> -#include <QtQml/private/qqmllistmodel_p.h> #include <QtQml/private/qanimationgroupjob_p.h> #include <QtQuick/private/qquickrectangle_p.h> #include <QtQuick/private/qquickitemanimation_p.h> @@ -108,7 +106,6 @@ private slots: void pathLineUnspecifiedXYBug(); void unsetAnimatorProxyJobWindow(); void finished(); - void replacingTransitions(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -1689,40 +1686,6 @@ void tst_qquickanimations::finished() } } -void tst_qquickanimations::replacingTransitions() -{ - QQmlEngine engine; - QQmlComponent c(&engine, testFileUrl("replacingTransitions.qml")); - QScopedPointer<QQuickRectangle> rect(qobject_cast<QQuickRectangle*>(c.create())); - if (!c.errors().isEmpty()) - qDebug() << c.errorString(); - QVERIFY(rect); - - QQmlTimer *addTimer = rect->property("addTimer").value<QQmlTimer*>(); - QVERIFY(addTimer); - QCOMPARE(addTimer->isRunning(), false); - - QQuickTransition *addTrans = rect->property("addTransition").value<QQuickTransition*>(); - QVERIFY(addTrans); - QCOMPARE(addTrans->running(), false); - - QQuickTransition *displaceTrans = rect->property("displaceTransition").value<QQuickTransition*>(); - QVERIFY(displaceTrans); - QCOMPARE(displaceTrans->running(), false); - - QQmlListModel *model = rect->property("model").value<QQmlListModel *>(); - QVERIFY(model); - QCOMPARE(model->count(), 0); - - addTimer->start(); - QTest::qWait(1000 + 1000 + 10000); - - QTRY_COMPARE(addTimer->isRunning(), false); - QTRY_COMPARE(addTrans->running(), false); - QTRY_COMPARE(displaceTrans->running(), false); - QCOMPARE(model->count(), 3); -} - QTEST_MAIN(tst_qquickanimations) #include "tst_qquickanimations.moc" |