aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QML: clear the property cache on QObjectWrapper destuctionErik Verbruggen2017-04-261-0/+15
| | | | | | | | | | | | | If an external QObject is exposed to an engine through a QObjectWrapper, make sure to deref and clear the propertyCache reference in the object's declarative data when the QObjectWrapper is destroyed. This makes sure that there is no dangling propertyCache pointer when the object is subsequently exposed to another engine. Task-number: QTBUG-57633 Change-Id: I37f6793d8be65b23b4e81bb4ed91db18271261b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 749a7212e903d8e8c6f256edb1836b9449cc7fe1)
* Enable PropertyChanges to correctly restore binding on aliasMichael Brasser2017-02-032-11/+52
| | | | | | | | Change-Id: I88ffdd1d1224705e980e449b6c799c9f186143b1 Task-number: QTBUG-58271 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 22b03fd6d3efdfa0385ced2450c6c7dfcf555d6e) Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix support for QJSValue as C++ signal parameter type, part 2Simon Hausmann2017-01-192-2/+13
| | | | | | | | | | | | | | | | | After commit 0e3380f9c6ab6e3ea7398caccf5aa84f1575f1cd we wouldn't crash anymore, if QJSValue::UndefinedValue was provided as value for a QJSValue C++ signal parameter. However that was not a complete fix for the regression of commit aa869cbb06bcf005e238059a2cb0205947ff0b5f, as other primitive values stored in QJSValue as QVariant were not converted, so for example QJSValue(42). So let's fix this once and for all by using QJSValuePrivate::valueForData, that handles all types of QJSValuePrivate encodings. Task-number: QTBUG-58133 Change-Id: Ib7c0461b18df6260ccd4bce729ae2348281eb7f3 Reviewed-by: Arnaud Vrac <avrac@freebox.fr> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 89c6bee139422b17534f79129eea2820d2ce952e)
* Fix crash when C++ QJSValue parameterized signal interacts with JSSimon Hausmann2017-01-143-0/+4
| | | | | | | | | | | | | When converting the parameters of a C++ signal to JS values to provide to a signal handler written in JS, the conversion of a QJSValue to a QV4::Value* may yield a null pointer in case of a default constructed QJSValue for example. This is a regression from commit aa869cbb06bcf005e238059a2cb0205947ff0b5f and we must check for this. Task-number: QTBUG-58133 Change-Id: I528b606b2851dfb3072e54902bd8843d31571a55 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 0e3380f9c6ab6e3ea7398caccf5aa84f1575f1cd)
* Improved robustness of the optimizer when removing expressionsSimon Hausmann2016-11-221-0/+8
| | | | | | | | | | | For example during dead code elimination we may invalidate statements, but at the same time there may still be instances left in the work list of optimizeSSA(). When we encounter then, we should not process them any further. Task-number: QTBUG-56255 Change-Id: I4c24b1a225ce1bde112172e9606f91c426c19f19 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix binding re-evaluation when list model properties changeSimon Hausmann2016-11-182-0/+40
| | | | | | | | | | | | | | | This is a regression from commit 4876ea6a18ccdfd72014582aa5d50ab9f6b6ec9e, which avoided returning an expensive QObject when calling get() but also lost the ability to perform binding captures when accessing the properties. This change restores the captures by performing them by hand in get() and also triggering the notifiers directly when the values change, without creating the QObject. Task-number: QTBUG-52356 Change-Id: Ia429ffafd4032b63d3e592aa63bb0864a24e0965 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Fix memory leak in a benchmarkErik Verbruggen2016-11-161-1/+4
| | | | | | Change-Id: I64b671243a107c518da2000e2ffd964f441af037 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* QML: Change C++ benchmark to reflect QML benchmarkErik Verbruggen2016-11-161-1/+2
| | | | | | | | | | The QQmlListReference will build a property cache entry, but it won't assign it to an engine when none is available (meaning: it would create the entry every time a QQmlListReference is created). QML won't do that, because it (obviously) has an engine available. Change-Id: I46eeaf3dffcb690902dd3d78be48c8509be6e84d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix reading of enum properties from gadgetsSimon Hausmann2016-11-161-0/+34
| | | | | | | | | | | | | | | | | QMetaProperty::type() maps an un-registered enum to QMetaType::Int, and so if a property cache is created for a gadget with enum properties, then their type will be int and we'll correctly read enum properties as ints in JavaScript. However if the enum is registered at the time we create the cache, then the property type will be the specific type and not QMetaType::Int. The property reading code in QV4::QObjectWrapper can deal with that, but the property reading code in the gadget value type wrapper code did not. [ChangeLog][Qt][Qml] Fix reading of enum properties from gadgets / value types when the enum was registered with qRegisterMetaType(). Change-Id: I7812b216a276dcc95c36e313507e1a1142250d0b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Setting Connection's target to null should disconnect implicit targetMichael Brasser2016-11-152-0/+36
| | | | | | Change-Id: Id7c8c7080e6db8bb6d09c1df13cddaef047cf611 Task-number: QTBUG-56499 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix more cases where DSE would optimize out too many storesErik Verbruggen2016-11-101-0/+5
| | | | | | | | | | | | | | GCC5/6 do aggressive dead store elimination on memory passed to placement-new. This resulted in the Heap::Object::prototype being a nullptr. qml.pro already contained the -fno-lifetime-dse flag, but there are other places where we ask the memory manager to allocate data. This is temporary band-aid, and is already fixed in 5.8. Change-Id: Ia61a69f65fab351068a588cfc36b5b3d762ffc9f Task-number: QTBUG-56932 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QV4String: properly detect overflow when trying to convert to an array indexGiuseppe D'Angelo2016-11-042-0/+29
| | | | | | | | | | | | | | | A wrong overflow detection caused strings like "240000000000" to pass the conversion, even though they would not fit into a uint when converted into base-10. This mis-conversion to uint then caused all sorts of side effects (broken comparisons, wrong listing of properties, and so on). So, properly fix the overflow detection by using our numeric private functions. Change-Id: Icbf67ac68cf5785d6c77b433c7a45aed5285a8c2 Task-number: QTBUG-56830 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a test for bitmap font rendering in Qt QuickEskil Abrahamsen Blomfeldt2016-10-251-0/+18
| | | | | | | | | | The "fixedsys" font is available on Windows at least, so while this test may not add any value on other platforms, it won't hurt either, and this was something that regressed on Windows before. Task-number: QTBUG-56659 Change-Id: Id01dedcbdc2fe74027caf31dd0dde6729ade8c63 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make tst_qquicktextedit::mouseSelection() passJ-P Nurmi2016-10-242-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Since qtbase commit beef975, QTestLib avoids generating accidental double click events by adding 500ms timestamp delta on release events. The test requires a press-and-drag-and-release type of sequence with double and triple clicks. The triple-click case is handled fine with QTest::mouseDClick() + press + move + release, but the double-click case is using QTest::mouseClick() + press + move + release and relies on the accidental double-click event generation that QTestLib now deliberately prevents. I can't think of a nice way to inject the move event in the middle of a double-click sequence generated by QTest::mouseDClick(), so we just send the missing double-click event by hand. We can also remove the QStyleHints::mouseDoubleClickInterval waits, which were there to prevent the aforementioned accidental double click events that can no longer happen. This reduces the total execution time of mouseSelection() by roughly 90%. Task-number: QTBUG-50022 Change-Id: I252e87d6a49ea86a44cfa347a29eebee12fd36d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* tst_qquicktextedit: remove mouseDoubleClickInterval waitJ-P Nurmi2016-10-231-3/+0
| | | | | | | | | | | | Since qtbase commit beef975, QTestLib avoids generating accidental double click events by adding 500ms timestamp delta on release events. Thus, now we can remove the QStyleHints::mouseDoubleClickInterval wait, which were there to prevent the aforementioned accidental double click events that can no longer happen. The default inverval is 400ms, so this saves us nearly half a second on most platforms. Change-Id: I7a670b70c012ac027dc951ebafdf5e7d53b89ce9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tst_qquicktext: remove bogus blacklistingJ-P Nurmi2016-10-231-2/+0
| | | | | | | There's no such test as mouseSelection in tst_qquicktext. Change-Id: I09bf4c61b53acd9811e020379a29c80fce9fe48b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QQuickWindow: don't discard timestamps for wheel eventsJ-P Nurmi2016-10-151-2/+5
| | | | | | | | | | | Noticed while debugging QTBUG-56075 on XCB. QQuickFlickable did not receive timestamps for wheel events provided by XI2. This alone does not fix the flicking speed issue with high-precision trackpads, but is needed to be able to calculate the appropriate velocity. Task-number: QTBUG-56075 Change-Id: I458e6302aee72863cdc1f8e8f7d99449016905a9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix corruption when adding or changing properties of JS objectsArnaud Vrac2016-10-101-0/+14
| | | | | | | | | | Commit 833c99db20 introduced this regression by only moving part of the value data to the proper offset. Task-number: QTBUG-53261 Change-Id: I11241c57057a57794bc3ca60ee437206e524f355 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>