aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-051-0/+45
|\ | | | | | | Change-Id: I081d9b15796b4133d2ba6f1a862f15b873a4846d
| * Flickable: add a trackpad (touchpad) autotestShawn Rutledge2016-10-041-0/+45
| | | | | | | | | | | | | | | | | | | | We've had this feature for a long time, to use pixel deltas and scroll phase effectively, but no autotest until now. It's still not very thorough but it's a start. Task-number: QTBUG-55871 Change-Id: Iaf6e7a842ce90828da3253e8673cac9905abd046 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-047-13/+54510
|\| | | | | | | Change-Id: I48764527fa1ab6d8d59c24552394459b1cdc58ee
| * Fix vtable for QQuickPaintedItemSimon Hausmann2016-09-302-2/+2
| | | | | | | | | | | | | | | | As mentioned in QTBUG-54404 this is an unfortunate breakage we choose to accept. Change-Id: Id511188a2dcd35e8e16e7651c9764c8be1b5afb1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| * BC test data files for Qt 5.6 for QtDeclarativeMilla Pohjanheimo2016-09-304-0/+54475
| | | | | | | | | | | | | | Data files for bic test added for QtDeclarative Change-Id: Id576ca010b9f18a6b8a4c79625375ee4cc3cbf93 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * qv4jsonobject: Make use of QVariant::toString in stringificationRobin Burchell2016-09-302-0/+22
| | | | | | | | | | | | | | | | This covers a whole host of missing cases, notably QUrl stored in a QV4::Value. Task-number: QTBUG-50592 Change-Id: I8afd772046c7bfbbcf916a7e90a57be5257b9df8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix crash with window-less QQuickItemsSimon Hausmann2016-09-301-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QQuickItem visual children directly in QQuickItem instead of relying on the item being a (grand) child of a window. [ChangeLog][QtQuick] Fix crash with QQuickItems created via JavaScript being garbage collected sometimes when they're not assigned to a window. This may happen even in qmlscene when between the creation of the root item and the assignment to the QQuickWindow the garbage collector runs. The previous approach of a persistent in QQuickView marking the visual item hierarchy relies on the existence of a view. The only thing left to do in the view and qml window implementation is enforcing the CppOwnership policy set on the content item in QQuickWindow by ensuring the presence of the JS wrapper, replacing the persistent with a weak value. This also introduces a new internal mechanism for QObject sub-classes to provide their own V4 JS wrapper types. Task-number: QTBUG-39888 Change-Id: Icd45a636a6d4e4528fc19165b13f4e1ca7967087 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-307-1/+255
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| * Fix incorrectly aligned text whose size depends on its implicit sizeMitch Curtis2016-09-292-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The if statement in QQuickTextPrivate::setupTextLayout() was missing an OR clause for the case where the line width is neither greater nor less than the old width/natural width, but has actually changed. If that sounds confusing, it's because it is. Basically, the outer layouting loop in that function needs to run twice for this scenario, so that's what this patch makes it do. Change-Id: I13777667eb13506d50f05e9766785a1c2c46125c Task-number: QTBUG-50738 Task-number: QTBUG-50740 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * QQuickText: fix paddings when wrapping or eliding is usedJ-P Nurmi2016-09-291-0/+12
| | | | | | | | | | | | Change-Id: I8ec8c8eff41e77225ef42f7bd9e52f4558d00130 Task-number: QTBUG-55779 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Flickable: do not emit movementEnded until it really doesShawn Rutledge2016-09-292-1/+24
| | | | | | | | | | | | | | | | | | | | This was occurring when using a physical mouse wheel: movementEnded was emitted, then contentYChanged would still be emitted a few more times. Task-number: QTBUG-55886 Change-Id: Ib5e833d5d84633bb07b8c240ea3ccc9977e443f8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Fix crash on Array.prototype.join.call(0)Robin Burchell2016-09-291-0/+9
| | | | | | | | | | | | | | | | | | We (incorrectly) didn't check the return value to make sure we had a valid self. At the same time, rename the self variable to match up with other methods. Task-number: QTBUG-53672 Change-Id: Ia0ae5a553e49c4c3b2834c7fdf649fe6373951a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix MouseArea sticky grab with drag.filterChildren enabledMartin Jones2016-09-222-0/+137
| | | | | | | | | | | | Task-number: QTBUG-56036 Change-Id: Iad776f42cc776e0d397173b3d2f3922eb7914392 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Fix Flickable state being reset when it replays a delayed press.Andrew den Exter2016-09-232-17/+85
| | | | | | | | | | | | | | | | | | Ignore mouseUngrabEvents() triggered by giving mouse grab to a child item when replaying a delayed press event. Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-167-3/+62
|\| | | | | | | Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
| * Propagate window enter event as hover enter event in QQuickWindowEike Hein2016-09-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindow currently propagates window leave events as hover leave events to its content item, but it does not propagate window enter events as corresponding hover enter events. Instead, hover enter is only triggered implicitly by mouse moves. This can cause problems when there is no mouse movement inbetween the window being entered and a subsequent button press event. A common example where this occurs is dismissing a mouse-grabbing popup window (e.g. a QMenu) by clicking outside the popup, and then clicking in the same spot that was clicked to dismiss the popup. Without this patch, hover state is not realized until movement occurs, so there may be no no visual feedback and code that needs to update state based on what is being hovered prior to handling a press event can't work correctly. This patch synthesizes a QHoverEvent and delivers it in response to QEvent::Enter, similar to how QEvent::Leave is already handled. QWidget handles this correctly via QWidget::enterEvent. The equivalent in Qt Quick is QQuickItem::hoverEnterEvent, ultimately called with the synthesized event. The patch also updates the touchmouse::hoverEnabled autotest. Due to the window enter event now being handled correctly, exitSpy2 would run up a count() of 2, as the cursor was not in a neutral position after previous test cases. The change makes sure the cursor is in a neutral position before test case activity. [ChangeLog][QQuickWindow] The relevant child item is now sent a hover event when the window receives a QEnterEvent, making sure hovering is recognized without waiting for mouse movement. Change-Id: If0586f6cd971df0dfc266bb1a39c9cdb184fd286 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Destroy an incubating delegate if it is removed before incubation completesMartin Jones2016-09-151-3/+4
| | | | | | | | | | | | | | | | | | Removing an item from a model after its delegate has started incubation, but before it has completed results is an orphaned item. Task-number: QTBUG-55901 Change-Id: I3d3136dc05a950ca38d53687ae7d38a6d0c7ec35 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| * Allow for garbage collection of types with errors in trimCache()Michael Brasser2016-08-305-0/+54
| | | | | | | | | | | | | | Change-Id: I821ea14f60871735bface4e2cf4e61fcb61b2784 Task-number: QTBUG-55567 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix crash on exit when using default property aliases with layoutsMitch Curtis2016-09-153-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The layout was being destroyed before the text, which meant that the removeItemChangeListener() call never got hit. To ensure that the listener is always removed, loop through each child in QQuickLayout's destructor. This is a manual cherry-pick of 59c6c0e0b1b5b46747595a58e11311b7393d7e70. Task-number: QTBUG-51927 Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Simon Hausmann2016-08-251-0/+4
|\| | | | | | | Change-Id: I12efb77e812364052eca12ea35219ceff64d7cc3
| * Prospective fix for the plugin check on Apple platformsSimon Hausmann2016-08-251-0/+4
| | | | | | | | | | | | | | | | | | | | After enabling separate debug info for Apple platforms, the toolchain creates dSYM directory hierarchies that mirror the real hierarchy. The contained .dylib files are not dylib files, they cannot be loaded. Try to skip any paths that may point to such a hierarchy. Change-Id: Iaee98a657495f31229c29ecd53a63e6493e70aff Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | V4: Correctly format on Number.toPrecision(n)Ulf Hermann2016-08-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The ecmascript standard mandates that we add trailing zeroes if the given precision is greater than the number of digits available. The only way to request this from QLocale is currently QString::asprintf(), which adds a few other incompatibilities that are easier to 'fix' by editing the resulting string. Thus we use it as a stop gap measure until we can expose better API from qtbase. Task-number: QTBUG-55358 Change-Id: Iafc11f21abb341fbe458ad75b46b4222ae5bc1db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | autotests: remove qWait(1) in touch sequencesShawn Rutledge2016-08-133-22/+0
| | | | | | | | | | | | | | | | | | | | After d04982dc84d66bec92b4b3767538676cf925ef17 in qtbase, QTest::touchEvent() and QTouchEventSequence::commit() slow down every sequence of touch events, so we don't need to do it in individual tests. Change-Id: Id8133b100797d4bd2d7282ee874dbb81ed2cab47 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1319-358/+396
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| * PathView: fix infinite construction/destruction loopAnton Kudryavtsev2016-08-122-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... when all (or almost all) items are in the cache. When all items are in cache, check lower bound is equal to upper_bound. In rare cases, especially when almost all items are in cache, the inserting code was used (not only appending and prepending). In this code there was not bound check before creation of item and there was such situation: 1. Create item by inserting code (without bound check) 2. At the next call of refill() remove this item by life cycle because this item does not meet the conditions. And go to step 1. In other words at the first call we create some item, at the second remove this item. And again. So we had infinite construction/destruction loop. To break it we should check position of new item before creation in inserting code too (like we do in appending and prepending code). Task-number: QTBUG-37815 Change-Id: I015cdeb67ca5fcd06c34b3145b49cbd3e38d4078 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix test failure: wait between mouse events the proper wayJan Arve Saether2016-08-121-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, QTest::mouseEvent() disregards the wall time for the time stamps for events, but synthesizes the timestamps instead. The proper way is to specify the waiting time in the delay argument. This will adjust both the timestamp and perform a qWait() before the event handler is called. Without this patch, the qWait(doubleClickInterval) was disregarded, which lead to that a doubleclick event was generated, and it failed with the following message: Actual (((window->rootObject()->property("doubleClicks").toInt()))): 2 Expected (1) : 1 tst_qquickmousearea.cpp(1105) : failure location Change-Id: Ieda3b670d3cda0bd522db2f9677dad5745c88a21 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * PathView: fix item creationAnton Kudryavtsev2016-08-122-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First call of QQuickPathView::refill() did not use currentIndex for item prepending and there was situation when items were not created, e.g.: PathView with current item in center and currentIndex was set so that item with index 0 was after current item and before path end. The result of this situation: items from path begin to current item were not created. The reason was that idx always equaled (modelCount-1) for item prepending. Now first filling uses currentIndex to calculate valid idx. Task-number: QTBUG-53464 Change-Id: I7e343b0712c9c5c5cd56b1d8e020cf8c0f6e6301 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix char conversions in QMLChristian Strømme2016-08-092-39/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 90b06e2773842, as it had unwanted side effects. The original intention was to make assignment from char to string possible, or more specifically, we wanted a solution where a QChar could be assigned to a QString, as a character and not a string representation of its value. While this behavior is desirable for QChar, we most likely want the opposite for the regular character types. Task-number: QTBUG-49232 Change-Id: I82d5f72b900fe984c4db1478fd52a9eb69ad2ee6 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix crash with Component.onDestructionSimon Hausmann2016-08-052-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A call to a handler of Component.onDestruction may end up causing WeakValues such as QQmlData::jsWrapper to be set again, even though they've been set to undefined in an earlier iteration of the loop that walks through the weak references. That in turn may result in invalid object references to objects that are scheduled for destruction by the collector. So after calling all destroy handlers for QObjects, reset all of the weak values again. Task-number: QTBUG-54939 Change-Id: I00ebabb76274e296fb1bd90d8d3e21dbbb920b57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * tst_librarymetrics_performance: Use QBENCHMARK macro instead of rolling our ownRobin Burchell2016-08-051-133/+14
| | | | | | | | | | | | | | | | | | This means we now respect -callgrind to show instruction counts (for instance). If benchmarks don't already throw out outliers and perform averaging, we should roll those features into testlib, not replace it. Change-Id: I21a3c4b41ec80a49b5b61bfe957f1165ac865010 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * benchmarks: Remove odd qqmlimage benchmarkRobin Burchell2016-08-054-113/+0
| | | | | | | | | | | | | | | | | | I have no idea what this was theoretically supposed to be testing, but it looks completely bogus (not representative of a real world scenario), is subject to massive variance thanks to memory allocation, and generally doesn't seem useful Change-Id: Ib7adc8a4753e49d2a3bd9515273bca79a88a5749 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_creation: Remove tst_creation::elementsRobin Burchell2016-08-051-25/+0
| | | | | | | | | | | | | | | | | | There is no real sense in testing what boils down to operator new/delete plus a little PLT overhead. For one thing, the allocator is too variant to test at such a level. For another, it's not representative of any real-world scenario. Change-Id: Ib455bb00839ff4e25099977059759a7b328db306 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_creation: Remove qobject_alloc benchmarkRobin Burchell2016-08-051-30/+0
| | | | | | | | | | | | | | | | | | This is literally just testing operator new and delete, with a little PLT overhead. It is not useful as a result (not a real-world scenario, and obscenely variant thanks to allocators not being predictable in behavior). Change-Id: I42f758c503b37ff880fc4f0e38c220d0638356e9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_creation: Remove redundant widgets dependencyRobin Burchell2016-08-053-5/+3
| | | | | | | | | | | | | | Absolutely no need for this. Change-Id: I06ca2dab157fecf2c585b9f863d9893cd4ce7300 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Flickable: avoid infinite velocity during release after dragShawn Rutledge2016-08-054-0/+26
| | | | | | | | | | | | | | | | | | | | It sometimes happens on touchscreens that mouse events occur too close together. We cannot calculate velocity based on zero elapsed time, so just ignore the event. Task-number: QTBUG-45527 Change-Id: I120e73cfa60e2fcc594cb1f3b69f530e746abddd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | TextInput: fix horizontal alignment when implicit resizing is disabledJ-P Nurmi2016-08-101-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, TextInput updates its implicit width to match the content width. This implies that when TextInput does not have an explicit width set, there is no need to handle horizontal alignment. TextField wants to override the default implicit width, so it disables the "implicit resizing" feature of TextInput. In this scenario, the implicit width does not match the content width. Therefore the text layouting code should also treat the item as if it had an explicit width set to achieve the correct horizontal alignment. Task-number: QTBUG-55138 Change-Id: I8c04971a6aff44c6f1734df50153a9788849e98a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-055-31/+60
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
| * Test that we don't crash when items are sorted and filtered at the same timeOlivier Goffart2016-08-041-0/+32
| | | | | | | | | | | | | | | | This is a test for commit 49c892328223dfa2502b462d8e5e8e181f4f6cd5 in qtbase Change-Id: Id7be42ddd9136b73af08093117316fe2e86a000a Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Relax negativeYear EcmaScript testUlf Hermann2016-08-031-2/+5
| | | | | | | | | | | | | | | | | | EcmaScript doesn't in fact require the date to be represented in english. Thus, only test for the year number to be contained in the date string. Change-Id: I5b89c14a833b317f259f4cd2855b3f24310a7d72 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * autotests: fix finding data files when not in CWDDavid Faure2016-08-033-29/+23
| | | | | | | | | | | | | | | | | | | | These tests now can find their data files even when running from a different directory than the source directory, and they no longer misuse QUrl::fromLocalFile for a relative URL (resolved with QUrl::resolved). Change-Id: If18afd2e29571cca2a4c820eda6b9f6713e08a92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | 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>