aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-0221-15/+491
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-0110-1/+165
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| | * MSVC: Make Lancelot's scenegrabber compileEskil Abrahamsen Blomfeldt2016-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extern declaration needs Q_CORE_EXPORT (which resolves to an import declaration on MSVC). Also, the type of the qt_qhash_seed variable is a QBasicAtomicInt, not int, so with proper signature mangling it would not resolve (since memory layout is the same for an int and a QBasicAtomicInt, it would just work for linkers that did not detect it.) Change-Id: I92375afcfc13e045e78a4d6cfdd539bd01b66136 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * QQmlPropertyMap: Don't spuriously emit valueChanged() signalThomas McGuire2016-07-251-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The valueChanged() signal was emitted when the property was written with the same value. This increased the potential for binding loops in user code. Change-Id: Ifeb8f6f23e2022aa35cb6cac7cf1a3dbc0e8ca2f Task-number: QTBUG-48136 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix QQuickItem's setAcceptedMouseButtons functionDan Cape2016-07-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using setAcceptedMouseButtons to only allow the LeftButton, the user can click the LeftButton and while still holding it press the RightButton. There would be a press event sent for both. To resolve this, a check needed to be added to ensure the acceptedMouseButtons are checked when a second press comes in. [ChangeLog][QtQuick][QQuickItem] Fixed issue with mouse button events being sent even when they were disabled by setAcceptedMouseButtons. Change-Id: I064f3ff56ede12b1572e172be326eb337e280750 Task-number: QTBUG-31861 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix string property assignments to 2d vectors and quaternionsSimon Hausmann2016-07-213-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Just like it's possible to assign "1,2,3" to a QVector3D, the same should be possible for a QVector2D and a QQuaternion. Task-number: QTBUG-54858 Change-Id: I8f394279dcdf5c057876efaa316b4bad51a4c126 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * JS: Check for errors before using sub-expression resultsErik Verbruggen2016-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Specifically: don't de-reference a result and assume that it's not-null. Task-number: QTBUG-54687 Change-Id: If07d3250a95a7815ab7a3262b88e0227965ef8e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Add benchmark for pathological O(N^2) behavior in QQmlChangeSet.Milian Wolff2016-07-183-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is just here for documentation of this behavior and does not come with a fix yet. This hotspot was found while profiling the example code attached to QTBUG-34391. It is triggered by the repeated calls to _q_itemsMoved in QQmlDelegateModel::_q_layoutChanged. Change-Id: I758744b3650c3c47dc86b914b823c3e9f96ce81e Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Daniel Vrátil <daniel.vratil@kdab.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * | tst_qmlproperty: Fix access of dangling pointerThiago Macieira2016-07-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const char *name = propertyName.toLatin1().constData(); big no-no... valgrind was quite angry: ==49215== Invalid read of size 1 ==49215== at 0x4C304F2: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==49215== by 0x5E991C5: QMetaObject::indexOfProperty(char const*) const (qmetaobject.cpp:1007) ==49215== by 0x5ED1273: QObject::property(char const*) const (qobject.cpp:3912) ==49215== by 0x42AAA5: tst_qqmlproperty::floatToStringPrecision() (tst_qqmlproperty.cpp:2082) ==49215== by 0x42BB37: tst_qqmlproperty::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (tst_qqmlproperty.moc:533) ==49215== by 0x5E9B32D: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.cpp:2237) ==49215== by 0x40434FB: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.h:123) ==49215== by 0x403C39C: QTest::TestMethods::invokeTestOnData(int) const (qtestcase.cpp:838) ==49215== by 0x403CE98: QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const (qtestcase.cpp:1019) ==49215== by 0x403DF45: QTest::TestMethods::invokeTests(QObject*) const (qtestcase.cpp:1321) ==49215== by 0x403EA9F: QTest::qExec(QObject*, int, char**) (qtestcase.cpp:1733) ==49215== by 0x42B219: main (tst_qqmlproperty.cpp:2104) ==49215== Address 0x155bb3d0 is 16 bytes inside a block of size 18 free'd ==49215== at 0x4C2E38B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==49215== by 0x5C3F9FC: QArrayData::deallocate(QArrayData*, unsigned long, unsigned long) (qarraydata.cpp:215) ==49215== by 0x42F2CB: QTypedArrayData<char>::deallocate(QArrayData*) (qarraydata.h:459) ==49215== by 0x42CC7A: QByteArray::~QByteArray() (in /home/tjmaciei/obj/qt/qt5/qtdeclarative/tests/auto/qml/qqmlproperty/tst_qqmlproperty) ==49215== by 0x42AA8B: tst_qqmlproperty::floatToStringPrecision() (tst_qqmlproperty.cpp:2081) ==49215== by 0x42BB37: tst_qqmlproperty::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (tst_qqmlproperty.moc:533) ==49215== by 0x5E9B32D: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.cpp:2237) ==49215== by 0x40434FB: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.h:123) ==49215== by 0x403C39C: QTest::TestMethods::invokeTestOnData(int) const (qtestcase.cpp:838) ==49215== by 0x403CE98: QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const (qtestcase.cpp:1019) ==49215== by 0x403DF45: QTest::TestMethods::invokeTests(QObject*) const (qtestcase.cpp:1321) ==49215== by 0x403EA9F: QTest::qExec(QObject*, int, char**) (qtestcase.cpp:1733) ==49215== Block was alloc'd at ==49215== at 0x4C2D12F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==49215== by 0x5C3F4DE: allocateData(unsigned long, unsigned int) (qarraydata.cpp:107) ==49215== by 0x5C3F6DE: QArrayData::allocate(QArrayData**, unsigned long, unsigned long, unsigned long, QFlags<QArrayData::ArrayOption>) (qarraydata.cpp:155) ==49215== by 0x5C47BED: QTypedArrayData<char>::allocate(unsigned long, QFlags<QArrayData::ArrayOption>) (qarraydata.h:436) ==49215== by 0x5C42123: QByteArray::QByteArray(int, Qt::Initialization) (qbytearray.cpp:1627) ==49215== by 0x5D15F95: QString::toLatin1_helper(QChar const*, int) (qstring.cpp:4635) ==49215== by 0x5D15F5F: QString::toLatin1_helper(QString const&) (qstring.cpp:4630) ==49215== by 0x42D076: QString::toLatin1() const & (qstring.h:521) ==49215== by 0x42AA69: tst_qqmlproperty::floatToStringPrecision() (tst_qqmlproperty.cpp:2081) ==49215== by 0x42BB37: tst_qqmlproperty::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (tst_qqmlproperty.moc:533) ==49215== by 0x5E9B32D: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.cpp:2237) ==49215== by 0x40434FB: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.h:123) Change-Id: I0031aa609e714ae983c3fffd146543f79048468f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-1510-10/+323
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | * Relax QQmlProfilerService test for scene graph eventsUlf Hermann2016-07-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | The scene graph might decide to do an initial rendering, before the first SceneGraphContextFrame. Change-Id: Ie6d96574b5585cfda4dcd258b6031303f9a37715 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Fix logic bug when deleting properties of JS objectsLars Knoll2016-07-142-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used the size of the internal class in an inconsistent way. It should simply compute and work with the old internal class size, as that reflects the old object layout. [ChangeLog][QtQml] Fix assertion when deleting properties of JS objects Task-number: QTBUG-54589 Change-Id: Ie3db70437e780215d08a1a96491db75f8b859754 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * QQuickWindow: Fill out timestamps in QHoverEvents sent to QQuickItemsDaniel d'Andrada2016-07-121-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-54600 Change-Id: Ie24c44e2f68aae55ff1146c13c3dfc25349b7a29 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * tst_qquicklistview: Style fixesRobin Burchell2016-07-081-4/+2
| | | | | | | | | | | | | | | Change-Id: I18983b06d28bf8f31043070db5aa6c1540062197 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix crash in QQuickShaderEffect::updatePaintNodeAlbert Astals Cid2016-07-053-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When having a ShaderEffect and an Image sharing the texture via supportsAtlasTextures This used to work fine in 5.4 but 38cab579a0c5398b7621221fd8609bc43cf1f3c5 removed the check for the provider not being null Change-Id: I18cb969dbf8011ea01543cc079214e8ecbb66623 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * Flickable: fix minXExtent/minYExtent when content is smaller than viewAndrea Bernabei2016-07-012-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, defining leftMargin (or topMargin) and contentWidth (or contentHeight) so that "leftMargin+contentWidth < flickable.width" (or topMargin+contentHeight < flickable.height) leads to widthRatio (or heightRatio) having value != 1. The value should, however, be 1, as the content is completely visible inside the view, margins included. As a sideeffect, under the assumptions described above, it will now not be possible to scroll the leftMargin (or topMargin) out of screen, something which was possible (and it shouldn't have) before this fix. Task-number: QTBUG-53726 Change-Id: I22426c8038e90a2cfc7445914206eae0e781a3fb Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add a checksum to QQmlPropertyCacheSimon Hausmann2016-08-011-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | By running an md5 hash over the meta-object data and string tables this will allow us to detect changes to meta-objects and invalidate QML disk caches. Change-Id: I15b92de4cdf0cb525281b86e1c7b8ba0b11347a0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Add a function to QQmlPropertyCache to calculate the meta-object sizesSimon Hausmann2016-08-011-37/+124
| | | | | | | | | | | | | | | | | | | | | | | | This will be used later for calculating checksums of the meta-object data. Change-Id: Iba925eae298cbfc7b89196f4dd6fb2854ce75e2e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | V4: Make ExecutionEngine's debugger and profiler privateUlf Hermann2016-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This will allow us to #define them away on -no-qml-debug, saving two pointers per engine. Change-Id: I400cffd32cd7f55ff0e68565734b6002b9f901d5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-281-2/+0
| | | | | | | | | | | | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Expose HSV and HSL color values to QMLNikita Krupenko2016-07-254-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Added properties to access color values for the HSV and HSL color models to the basic QML color type. Task-number: QTBUG-48723 Change-Id: I45fa52f9f3878553e1b3d0a34b47804ede7794f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QML: Unify property reads/writes and use accessorsErik Verbruggen2016-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pass property reads/writes through utility functions in QQmlProperty, which in turn will try to use accessors when available (and no interceptors have to be called). Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Improve robustness of qml disk cachingSimon Hausmann2016-07-231-7/+114
| | | | | | | | | | | | | | | | | | | | | | | | Perform various basic checks before proceeding to load an existing cache file, including the qt version, architecture, data structure version and others. Change-Id: Ie822b056e944ac120643aad260e97f62616688bf Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Add support for saving/loading the moth interpreter byte codeSimon Hausmann2016-07-211-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | With the JIT and moth supporting persistence, we can enable the disk cache tests unconditionally. Change-Id: I6d6652411237001433a32a2de21d1f78f51b43ef Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add tryVerify()Mitch Curtis2016-07-201-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for conditions which can't be tested using tryCompare. One such situation is that of the currentItem property of ListView. In Qt Quick Controls 2, the currentItem property of the ListView that is internally a child of Tumbler can be null for a certain period of time, so using tryCompare() would result in errors due to trying to access a property of a null object: tryCompare(tumblerView.currentItem, "text", "2") The current workaround is to use wait(50) in a for loop, which is ugly and could lead to flaky tests: for (var delay = 1000; delay >= 0; delay -= 50) { if (tumblerView.currentItem) break; wait(50); } verify(tumblerView.currentItem); compare(tumblerView.currentItem.text, data.currentIndex.toString()); Using tryVerify(), we can first ensure that currentItem isn't null, and then use a regular synchronous compare afterwards: tryVerify(function(){ return tumblerView.currentItem; }); compare(tumbler.currentItem.text, data.currentIndex.toString()); [ChangeLog][QtTest][TestCase] Added tryVerify() function to allow verification of asynchronous conditions that can't be tested using tryCompare(). Change-Id: Ie93052b650f7fe0bf26853054a8f0f35a483e387 Task-number: QTBUG-19708 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Improve robustness of qml cache expiry checkingSimon Hausmann2016-07-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on two time stamps in the file system (source file and cache file), make the determination on whether the source file is newer than the cache solely depend on the time stamp of only the source file. This means that when cache files are stored in archives for example their modification date does not need to be preserved upon extraction. Change-Id: I0b4362663868c6fb9bd7e106028161b2d67274d4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Stabilize tst_QQuickView::resizemodeitemFrederik Gladhorn2016-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAIL! : tst_QQuickView::resizemodeitem() Compared values are not the same Actual (sizeListener.at(i)): QSize(80x100) Expected (view->size()) : QSize(200x300) Loc: [tst_qquickview.cpp(172)] The "SizeChangesListener" can be instantiated too early, catching signals from the previous resize events. Make sure to flush all events before. Change-Id: Ib0933429f5c589f120c263619f00893fa813e361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove redundant compare in testFrederik Gladhorn2016-07-191-1/+0
| | | | | | | | | | | | | | | | | | | | | The same condition is tested in the line above. Change-Id: I99720e3603b1ae5e2f5161696f1de3dd03f6ff50 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix alias resolution algorithmSimon Hausmann2016-07-155-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resolution of aliases needs to to be solved in iterations as an alias can refer to another alias, which may not be created yet in the property cache by the time we try to perform the resolution. Therefore the alias resolution code works off a list of pending aliases after the initial pass of resolution. This also requires the ability to detect circular references. Change-Id: Id4e159b9c713aa8a8a095759e22e3fac456a38a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Clean up implicit component registrationSimon Hausmann2016-07-151-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning an object to a property that is a QQmlComponent, we implicitly "wrap" a Component {} around the object declaration. In the QML IR this is only half-heartedly represented. In order to correctly determine dependencies later when saving and to support QML files that use implicit components but don't import QtQml or QtQuick explicitly, we must also extend the file imports accordingly. This is now done (and tested) by emulating a "import QtQml 2.0 as QmlInternals" and then using "QmlInternals.Component". Change-Id: I26f4f53a35675b52d4bd39f23359b0ac8f9678c5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix endian support in compiled data structuresSimon Hausmann2016-07-142-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to make the compiled data structures persistent on disk. In order to make it possible to create these data structures on a "host" system that may have a different endianness than the target system, we now make all the word sized fields little-endian. The template wrappers from QJson provide zero-overhead access for little-endian machines (the vast majority) while maintaining a large degree of source compatibility. Change-Id: I3d30da1fcf3bffb98dbe9337d3a35482fb7b57c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | tst_qquickwindow: make use of new QTest::createTouchDevice functionShawn Rutledge2016-07-132-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | So gui-private API isn't necessary anymore. Same as change 94324bd93fe9f4f61346b8f9e934c01279cb700e Task-number: QTBUG-44030 Change-Id: I780cc1eedf9285336b96219a1fb1cd4016512701 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Fix itemGeometryChanged() listenersJ-P Nurmi2016-07-131-102/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must iterate a (cheap) copy of changeListeners, because the container might be indirectly modified during the loop. For example, listeners may remove themselves from the list. In such scenario, the copy gets detached and the loop remains safe. I've added notes in comments, and extended the tests to prevent the issue re-surfacing again. Change-Id: Ib48d6e0765d45370d2fffa119a4c351e0119e40a Task-number: QTBUG-54732 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Set width and height simultaneously on SizeRootObjectToViewAlexandr Akulich2016-07-121-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On QQuickView/QQuickWidget size update we used set width (with the notify signal emission) and then height (with signal emission again). This way code, relying on width and height would be triggered twice and at the first time with there would be outdated height value. The new code takes care on proper value for both width and height. Change-Id: I6525911c40af0ca6a26ab3e7dac16d32a96d9a27 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove unused variableFrederik Gladhorn2016-07-121-1/+0
| | | | | | | | | | | | | | | Change-Id: I47c00941ef458c8b16c02960a7b37749a222a04e Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents re-calculation of what actually changed, and removes the now unused parameter newGeometry. Other than this change calculation, the only place where oldGeometry was used is QQuickListViewPrivate::itemGeometryChanged. To get rid of oldGeometry too, QQuickListViewPrivate now stores the current (i.e. last known) geometry, and updates it in itemGeometryChanged. Change-Id: I8a5286d08a04132c9a4c81de7ce221f5676946e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Add explanation to tst_QQuickMouseArea::moveAndReleaseWithoutPressFrederik Gladhorn2016-07-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test makes sure that no events are delivered after the initial press is released. In this context QTRY_* makes little sense, since we are confirming that the defaults have not changed. Thus rather spin the event loop 11 times and hope that if we would accidentally deliver events that we shouldn't, it will be caught in that time. Change-Id: Iadeed07a81978aa6679e5513c1fe0aebcaeeb997 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Prefer public API in testFrederik Gladhorn2016-07-081-7/+7
| | | | | | | | | | | | | | | Change-Id: Ib161ffaaea57bdf74e02d0f56c3e02d484a26fcc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | MouseArea: add autotest for subtreeHoverEnabledShawn Rutledge2016-07-072-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | Verify the fix in f7e462b. Task-number: QTBUG-54019 Change-Id: Ia9846f9b79473ea4f72e895320cf01d5d85cc1a3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Added two unit tests for alias nestingSimon Hausmann2016-07-073-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first test covers a use-case currently only otherwise see in QtQuickControls, and so having it here allows for catching regressions in that area before hitting the next qt5 build. Having an alias refer to another alias property within the same file only works if the second alias is resolved/processed before the first one. This works by chance when relying on the order of processing reverse to the declaration, but that's a bug. It should work regardless of the order. That is what the second test-case demonstrates and that is why it is marked as failure. Change-Id: Iba386437d21efa868d9814221092df5f7ef6f1f6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QmlProfiler: Extend test to check for timestamp orderingUlf Hermann2016-07-061-1/+22
| | | | | | | | | | | | | | | | | | | | | Timestamps should always increase monotonically. Change-Id: Idfd44e160193aab7bce37b58bc42a94ff087d15e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix tests in tst_QQuickMouseArea for big startDragDistanceFrederik Gladhorn2016-07-061-41/+60
| | | | | | | | | | | | | | | Change-Id: I8610887e7d1d3b0c6bd9ab60e55ce1e9209bcae7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::preventStealing for big startDragDistanceFrederik Gladhorn2016-07-051-17/+29
| | | | | | | | | | | | | | | Change-Id: I38c3a663409633bd7020c2630bf11c2e46082435 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::setDragOnPressed for big startDragDistanceFrederik Gladhorn2016-07-051-11/+10
| | | | | | | | | | | | | | | Change-Id: I9f2795bcaaec2b126a41c6a6a12a2d5e55d0beee Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::cancelDragging for big startDragDistanceFrederik Gladhorn2016-07-051-4/+10
| | | | | | | | | | | | | | | Change-Id: Ia39947f7b6f42c48738af81966deb9c98f708da5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::dragging for big startDragDistanceFrederik Gladhorn2016-07-051-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | On macOS the mouse move events go through qcursor's setPos. That in turn uses a native event, so the waits are there for a good reason. Change-Id: Icb616d303c5280f2a9ba5f78cf07032c298b84a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QtQuick: clean up shader effect property connectionsErik Verbruggen2016-07-051-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use a signal mapper, but handle the mapping using a custom slot object and a lambda to do the dispatching ourselves. - Don't do meta-calls by property name, but by index. - Cache the meta-object. - Resolve the property indices by using the QML property cache. For a shader with 6 property connections, the time spent goes from 320k instructions to 80k instructions (valgrind on x86_64). Task-number: QTBUG-53901 Change-Id: I2809198cf62f9716b3683798222203fc3e97fbb3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Improve tst_QQuickMouseArea::pressedCanceledOnWindowDeactivateFrederik Gladhorn2016-07-051-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it more reliable and faster - average run time goes down by ~400 ms while the test passes reliable for me after this change. Most QTRY_* will return instantly since the condition will be good in any case. On my laptop the test tended to fail roughly every 4th run without this patch. The failure was the second click on the new window not working without the QTRY_VERIFY. Removing the extra 200 ms wait time is what makes it faster - I see no good reason for the wait here. Change-Id: I5f45da91ef04a9b807ff0e9362c9d9b3881c227d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_qquickpincharea::pan with highdpi and document itFrederik Gladhorn2016-07-042-13/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was expanded slightly and documented, so that it's easier to understand the strangeness of the center. On my display the dragThreshold is returned as 16 while the test assued it's always <= 10. Explain the math and the coordinate changes due to everything being in item coordinates. Change-Id: I4bf72271895ecd9e248154c08bf36eab376c6d79 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Canvas test: make sure canvas is readyFrederik Gladhorn2016-07-043-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before: Totals: 80 passed, 653 failed, 0 skipped, 0 blacklisted, 35852ms after: Totals: 729 passed, 4 failed, 0 skipped, 0 blacklisted, 29599ms The last four failures are due to high dpi issues. Change-Id: Ie937091558395572dc281ee5a5b90848ea9d2081 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>