aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Accessible: Return StaticText if there is no explicit role setAndy Shaw2018-10-191-1/+69
| | | | | | | | | | Before, it would assume that StaticText was the role if the item could be cast to a QQuickText. It should only do this if the role is not explicitly set, in case it is not really StaticText in the attached property. Change-Id: I800810f1347fc9aa412c4ca5d180f78d27a89b38 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Warn, don't crash during nested delivery of mouse or touch pressesShawn Rutledge2018-10-132-0/+82
| | | | | | | | | | | | | If during delivery of a mouse press, user code calls qApp->sendEvent() with another mouse press, then when delivery of the nested event is finished, we call QQuickPointerMouseEvent::reset(nullptr). Then when delivery of the original mouse press resumes, crashes are possible because most of the code assumes that QQuickPointerEvent::m_event is not null during delivery. Change-Id: Id65b1f2f64351e40d03bcd4f4d16693d616729da Fixes: QTBUG-70898 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Qt Labs Settings: warn if failed to initialize internal QSettings instanceMitch Curtis2018-10-111-4/+30
| | | | | | | | | | | | | | | | First, warn the user that the QSettings instance failed to initialize if there was an error. Then, if the error was QSettings::AccessError, print the specific application identifiers that weren't set so they know what they have to do. For example: QML Settings: Failed to initialize QSettings instance. Status code is: 1 QML Settings: The following application identifiers have not been set: QVector("organizationName", "organizationDomain") In my case, the QSettings instance wasn't created on Windows because organizationName wasn't set. Change-Id: I7970209e09b78f785730422c45978775311b96ac Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Amend TouchMouse::buttonOnDelayedPressFlickable to test delayed tapShawn Rutledge2018-10-031-38/+66
| | | | | | | | | | | | | | | | | This test is for Flickable with pressDelay set to a testable timeout value. For some reason it only checked trying to flick before the press delay is over, or holding and waiting for the press delay to expire. But if the user taps a child MouseArea before the press delay expires (neither moving nor waiting), at the moment of release it's supposed to send the delayed press and then the release, so that the MouseArea gets "clicked" almost as if there was no delay. Lack of test coverage allowed a regression in this functionality for 2 minor versions: 5.10 and 5.11. Task-number: QTBUG-61144 Task-number: QTBUG-69059 Change-Id: I0d8867587e6877359c41ec5fc3a5cdd17447d0b8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Prevent PathView's parent stealing mouse grab during double-flickChris Adams2018-09-241-0/+55
| | | | | | | | | | | | | This commit fixes an issue where mouse events could be stolen by the parent of a PathView due to the PathView not correctly setting the keep-mouse-grab flag in handleMousePressEvent(). This commit ensures that the flag is correctly set, so that the second flick in a double flick is handled by the PathView rather than being stolen by the parent. Task-number: QTBUG-59620 Change-Id: Iccdfe16e7e80e6d1d31f95c3dba9c8839b20f30f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qmldiskcache: speed up testThiago Macieira2018-07-221-1/+7
| | | | | | | | On some systems, we *do* have sub-second file time resolution, so we don't have to wait one second. Change-Id: Id2be776c7ae0467c9d9ffffd1543325ce53f10fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "[Quick] Make sure an transition instance is stopped when destroyed"Simon Hausmann2018-07-172-88/+0
| | | | | | | | | | This reverts commit cf0b965aaab0ea7e777c1f8e8d35de3a73d7d08e because it causes crashes in qtquickcontrols tst_extras. Change-Id: I3809f2da84cf24b990b017a44837c02fc6c776d1 Task-number: QTBUG-69497 Task-number: QTBUG-38099 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* [Quick] Make sure an transition instance is stopped when destroyedErik Verbruggen2018-07-132-0/+88
| | | | | | | | | | | | | | | When a running transition does not finish of natural causes (reached the end state due to e.g. the timer finishing), it can happen that it will never be marked as finished. Specifically, when an transition is running (e.g. an add animation for a ListView), and that transition is replaced by another transition (a displace transition, because another item got added to the ListView before the add transition was finished), the first animation was never marked as stopped. The effect was that the running property would stay "true" for forever. Task-number: QTBUG-38099 Change-Id: Id7d7053cb2fc1912127d9f5e71f27eb984ba7435 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Increase timeouts in qqmldebugjs test by a factor of 6Ulf Hermann2018-07-121-44/+51
| | | | | | | | | The CI is slow. It takes up to a minute to start a process, and therefore I'm not surprised the resulting process won't hit a break point within 5s. Let's hope 30s is enough. Change-Id: Idd5b8ad517a866ad577693e3279a4ded031d4eb6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix items in layouts not being rendered when layers are usedMitch Curtis2018-07-092-0/+96
| | | | | | | | | | | | | | | | A layer effect is apparently considered a child item of the layout that manages the item, and this causes issues when layouting. As was done for positioners in 865b4ec8, exclude any items for which QQuickItemPrivate::isTransparentForPositioner() returns true from layouting. As that commit made QQuickItemLayer set it to true when the layer is enabled, QQuickShaderEffectSource will be excluded from layouting. Task-number: QTBUG-63269 Change-Id: I463ff8d0cea0dfd6c4273f376de347971040d3d0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Don't leak components in QQuickLoaderColin Ogilvie2018-07-051-0/+53
| | | | | | | | | | | Only create source component in loadFromSource if it does not already exist. Previously toggling the active status when loading from source would create a new source component every time active became true. [ChangeLog][QtQuick][Loader] Don't leak components when changing source url. Change-Id: I1e4cfd5613e3851fcb4f3f55e78981f7c070cc77 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_qquickitem::qtBug60123Sami Nurmenniemi2018-07-052-9/+8
| | | | | | | | | | | Fixes: - Call to waitForWindowExposed() is needed after change c9b46a130ec7f874a564bff1c9a70083705fc25b landed to qtbase. - Simplify geometry Task-number: QTBUG-66866 Change-Id: Id504fdf372292eb6cc76e387ae421096875863fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tighten expected output for floating point conversionsSimon Hausmann2018-07-021-18/+8
| | | | | | | | | | After the qt5 update this amends commit ffeaac704efc9eb85464d0a401d98e28991ec4d3 to test only the new values that the QString functions in qtbase produce. Task-number: QTBUG-69181 Change-Id: I3aa8bcc1dd4a9387dc983f40ab74bd2ce620b409 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Adapt floating point precision test to changes in QtBaseSimon Hausmann2018-06-281-11/+19
| | | | | | | | | | | After commit 91f3687ee51db83d9018bd61c3fbc736c6e9912e in qtbase, QString::number defaults to zero-padding the exponent. This change allows both variants to pass the test. After the next qt5 update we can remove the alternation. Change-Id: Ica6cfd49a7ab0ab5aab4c3ec204de7fe9e3afb93 Task-number: QTBUG-69181 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Clarify error message when using eval in signal handlersSimon Hausmann2018-06-281-1/+1
| | | | | | Task-number: QTBUG-64024 Change-Id: If8f749ef9ec072928cb352ad7cd4dcf140b6ed53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Show error message when type qmlRegisterType and friends failErik Verbruggen2018-06-261-9/+5
| | | | | | | | | When a type is registered through qmlRegisterType or similar functions, no error was shown. Task-number: QTBUG-68323 Change-Id: Iff44bf8744c67dba2fdd12c43aaee44a8e15364a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickPathViewPrivate: fix heap-use-after-freeMitch Curtis2018-06-252-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TabBar auto tests in Qt Quick Controls 2 repeats the following process very quickly for several data rows: 1. Creates a TabBar (PathView, when using the Universal style) 2. Moves items in its QQmlObjectModel 3. Deletes the TabBar When run with ASAN, this test would fail, because the TabButtons (which are child items of the PathView) would try to access a deleted QQuickItemChangeListener upon their destruction. The underlying issue is that QQuickPathView::modelUpdated() is called, and before a refill() can happen, the view is deleted. QQuickPathView::refill() was the only execution path that was releasing the cached items (QQuickPathViewPrivate::itemCache), and since part of releasing an item involves removing the QQuickPathView as a change listener from the item, the item would access the deleted view (listener) when the item was being destroyed. This patch fixes the issue by also releasing cached items in QQuickPathViewPrivate::clear(), which is always called by the destructor. Task-number: QTBUG-68964 Change-Id: Ic5bf0943be79948c86bf7c07ef13ecd1a7b971ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Remove dead test - compilerwarningsLiang Qi2018-06-221-38/+0
| | | | | | | A follow-up of 9d078c8f147ea875e862360b0d7480201fbbcff7 in qtqa repo. Change-Id: I4b6c2923827ba8929a8f9b0919e5017122ca95fc Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* revert change 353164263c55825a0ec72d30128c50560c626334Lars Knoll2018-06-191-0/+0
| | | | | | | | | | | The change was too aggressive in trying to avoid marking the array data. We didn't catch all cases where on could be inserting a GC controlled object into the array data. Let's be safe and always mark the content of array data objects. Task-number: QTBUG-68894 Change-Id: Ifbb628be898c0903596b1a483212384295b01df5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix CONFIG+=qtquickcompiler with umlauts in the file pathSimon Hausmann2018-06-197-4/+40
| | | | | | | | | | | | | | | Instead of replacing every character that is not allowed in C++ identifiers with an underscore (which in turn could lead to collissions), replace it with the hexadecimal value of the offending character's unicode value. In addition we must use the complete suffix when mapping Foo.qml to Foo_qml.cpp. Task-number: QTBUG-68608 Started-by: Erik Verbruggen <erik.verbruggen@qt.io> Change-Id: I7e2153f0e6671b37dcaee4efb9aaae1d9b230f0c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Attempt to stabilize tst_qquickwindow::openglContextCreatedSignalSimon Hausmann2018-06-191-1/+1
| | | | | | | | | | | | | | | | | | | The test creates a QQuickWindow, calls show() on it and then waits with qWaitForWindowExposed() to return true. The expectation of the test is that when that call returns, an expose event was also successfully delivered to the window and the scene graph's render loop has attempted rendering the window contents - using *RenderLoop*::renderWindow(), which would - in the case of the gui thread loop - create the GL context. This expectation is expressed using a QVERIFY on a signal spy that observes the emission of the GL context created signal of QQuickWindow. There is no guarantee that by the time qWaitForWindowExposed returned true, an expose event was delivered to the window. Therefore let's use QTRY_VERIFY. Change-Id: I604cbf40dfb7980448f406e26b77678a65faf359 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QQmlDebugProcess: Wait forever for debug messagesUlf Hermann2018-06-191-2/+0
| | | | | | | | | | | | If we don't get the expected message in 15s, output a warning and try again. This will eventually be terminated by the overall test watchdog, but experiments show that starting processes on the CI can take minutes, so it's not worth it to have a separate timeout here. We still output the warning, so that we see in the log when this happens. Task-number: QTBUG-68741 Change-Id: I1ca9d0726753d566d8d89dd682d7d503fcd3a337 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add binary compatibility files for Qt 5.11Milla Pohjanheimo2018-06-054-0/+57946
| | | | | | | Add files for binary compatibility test for QtDeclarative Change-Id: Ie7a156e40176cc98ce31d5e4189d1e41c7c6df62 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Set argumentsCanEscape when debuggingUlf Hermann2018-05-301-0/+22
| | | | | | | | | This causes the updated arguments to be reported to the debugger when they are overwritten in the function body. Task-number: QTBUG-68534 Change-Id: I30c22d31aa97da0d58a4bbaaa032180a919669a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Formals come after locals in the CallContextLars Knoll2018-05-291-0/+32
| | | | | | | | | | | The method updating the internal class for a CallContext messed up the order between locals and formals, leading to wrong name lookups for signal handlers taking implicit arguments Task-number: QTBUG-68522 Change-Id: I36d55b3b0cfe9af6397455782551498b7ddb940a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a crash in the modulus operationLars Knoll2018-05-281-0/+10
| | | | | | | | | | INT_MIN % -1 crashes in C++ with an arithmetic exception, so avoid passing negative numbers into the integer operation, use fmod() instead. Task-number: QTBUG-68513 Change-Id: Ib5a37b55a0f9d41a84c7e6c00ea3f87622155de5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Debugger: Don't crash when encoding JSON dataUlf Hermann2018-05-251-1/+62
| | | | | | | | | Apparently QVariant::save cannot deal with QJsonObject and friends. Transform them into QVariants before sending them over the wire. Task-number: QTBUG-68474 Change-Id: I8fc9fade4915c2b40f8d16aea51ea6ff65247dc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash when modifying list model in worker threadSimon Hausmann2018-05-241-0/+1
| | | | | | | | | | | | | | | | If we call get() on a model in a worker thread, we may end up creating a ModelNodeMetaObject (aka cacheObject). Subsequent mutation of properties may make us end up in emitDirectNotifies(). However since we can't have bindings in there, we should shortcut/suppress the notify emission, which we can do by checking ddata->context via qmlEngine(). The previous code crashed when qmlEngine() return a null pointer but QQmlEnginePrivate::get(const QQmlEngine *) would attempt to dereference the parameter. Started-by: Slava Monich<slava.monich@jolla.com> Change-Id: I880619c686436c053692faafa5dba2c96c2ace96 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Slava Monich <slava.monich@jolla.com>
* tst_gradient.qml: fix warnings about multiple var declarationsMitch Curtis2018-05-241-115/+115
| | | | | Change-Id: Iccfb86de6f8c14d10fcf12e1b7cbd58a13754aa7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_gradient.qml: fix warnings about type coercionMitch Curtis2018-05-241-108/+108
| | | | | Change-Id: Ic3ab7cb4fa1772a0d92c06285f9cddf3378bd411 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 debugger: Allow retrieval of non-CallContext scopesUlf Hermann2018-05-233-1/+88
| | | | | | | | | | | | | | We need to encode the scope type properly and we need to return something from the "scope" command. Previously the client didn't even get notified about QML contexts and couldn't actually retrieve anything but call context. The other scope types are not terribly interesting right now, but at least for the global context it should be possible to provide more data in the future. Task-number: QTBUG-68218 Change-Id: I88d3dbc15a93f19b00f6f12365e4fb64ec78862e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* On network redirects, update finalUrl, not urlUlf Hermann2018-05-237-1/+49
| | | | | | | | | | | | | | | We want all further imports to be relative to the redirected URL, not the base one. Note that this will incorporate any prior URL interceptions into the final URL if a redirect happens. We don't really want this to happen because the result of interception is not meant to be the base for further URL lookup. However, as interception occurs before redirection, this is unavoidable. Don't use URL interceptors on remote URLs. Task-number: QTBUG-67882 Change-Id: I2717bdd4de119ac67caa08fdccc041432025abff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash when incubating objects with non-existent initial propertiesSimon Hausmann2018-05-233-0/+31
| | | | | | | | | | | | | | | When incubation is triggered from C++ and reaches the state of setting the initial properties (as supplied to incubateObject), we'd set engine->currentStackFrame to a CppStackFrame that provides access to the correct QML context. As we're not called from the interpreter, the v4Function pointer would be a null pointer. If during the initial property setting an exception is thrown (due to non-existent property access) and a back-trace is created, we'd end up dereferencing v4Function. Change-Id: I7f6b0ba7893bfb4186f55d4c213b4bb602d29aa0 Task-number: QTBUG-68416 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash when modifying objects used as prototypesLars Knoll2018-05-231-0/+18
| | | | | | | | | | | | | | | | Changing the prototype of an object back and forth leads to a 'cyclic' reference in the internal class transition tables. If one of those objects then gets a new property, we would get an infinite stack recursion trying to update the internal class IDs of the classes using this prototype. Fixed by skipping protochanges and vtable changes in the update code. That's ok, as those classes will always be reached through other paths from the empty class. Task-number: QTBUG-68369 Change-Id: Ie54ca5171a92f8e8b146a91376e435478ff70185 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Ensure we restore QML-defined enumsMichael Brasser2018-05-233-0/+22
| | | | | | | | | | | | This code path was previously missed, leading to some AOT-compiled types generating errors of the form: Unable to assign [undefined] to int [ChangeLog][QtQml] Fix QML declared enums with CONFIG+=qtquickcompiler. Change-Id: Ib46a2b2505aa3863f091a6ccdebf8425e62fc38f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_qquickanimatedsprite: add all QML files to OTHER_FILESMitch Curtis2018-05-161-1/+1
| | | | | | | Makes it easier to open them via the locator, for example. Change-Id: I8a5a0beba315da25b14bf2d519974e175f39567f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix bug where Ungrab event was not sentJan Arve Sæther2018-05-111-0/+41
| | | | | | | | | | | | clearGrabbers() will also clear QQuickWindow::mouseGrabberItem(), so we have to retrieve a copy of the mouse grabber item in advance of calling clearGrabbers(). This could happen when a filtering parent actually called grabMouse() on mouse release(!) event. Change-Id: I287214dbdff802707be625d73c38dd9c5d723aef Task-number: QTBUG-68030 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix .import within .js files with CONFIG+=qtquickcompilerSimon Hausmann2018-05-115-0/+29
| | | | | | | | | | | | | | | | | When loading a .js file without QQC, we scan the sources and use the ScriptDirectivesCollector to extract things like .pragma library or .import ahead of time. That information is passed on to the compilation unit generator for serialization. When compiling .js files ahead of time, we also used the same collector, but we forgot to save the data into the right location before serialization, so we essentially lost the imports. This patch fixes that by centralizing this code into the ScriptDirectivesCollector itself. [ChangeLog][QtQml] Fix regression with .import in .js files not working when using CONFIG+=qtquickcompiler. Change-Id: I5413c14b1b8bd3114a997011534fe55cdb7634aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests: unblacklist tst_qquickwindow.cpp::touchEvent_propagationGatis Paeglis2018-05-081-3/+0
| | | | | | | | For details see QTBUG-67757. Task-number: QTBUG-53916 Change-Id: I142a418fc22e6cdf64ab571ea2759e00c8101c47 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Fix crash when changing the source of AnimatedImage after a frame changeLouis du Verdier2018-05-081-0/+28
| | | | | | | | | | | | | | | | | | | | | | QMovie emits the signals updated() and frameChanged(), and restarts right after its timer to prepare for the next frame. Since AnimatedImage destroys its underlying QMovie when its source changes, the lines after emit frameChanged() in QMovie will use free'd memory and will most of the time produce a crash. This fix delays the destruction of the underlying QMovie of AnimatedImage using deleteLater() to prevent this kind of behavior from happening without impact/behavior change in the code of QMovie. Unit tests added as well to cover this situation. This commit also fixes a similar crash when Component.onCompleted is called and when the source changes in the associated callback. Task-number: QTBUG-67427 Change-Id: Ic6568a1bc251e5fa2ee1cf8e5f50eaa56c3007db Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Louis du Verdier <louis.du.verdier@free.fr>
* Fix loading of composite singletons from resourcesSimon Hausmann2018-05-082-0/+18
| | | | | | | | | | | | | | Commit f6bbeeb417102c61e8bf23f41e412ed9753a348d began normalizing the resource urls in the type loader, which broke loading of qml singletons from resources, as the normalized url is also used for the "pragma singleton" verification to check that the singleton is in the meta-type registry. If the registration was done with a non-normalized url, the check would fail with a misleading error message. Task-number: QTBUG-68025 Change-Id: I1093ee0cbee884b4a51195c302c8908f748e747e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* tests: blacklist tst_qquickitem::qtBug60123Gatis Paeglis2018-05-081-0/+3
| | | | | | | | Its unreliable and we don't know why yet. Task-number: QTBUG-66866 Change-Id: I963a0070e5819b20d0e811f749cf623113eb9d26 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickItem: Guard against null deref in transformationsRobin Burchell2018-04-302-0/+27
| | | | | | | Change-Id: Ieb14322c104d816842e04e521b556bfc11855f1c Task-number: QTBUG-67024 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Tests: Silence Clang warningsFriedemann Kleint2018-04-272-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | ./stringmodel.h(63,9): warning: 'rowCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] int rowCount(const QModelIndex &) const ^ ./stringmodel.h(73,17): warning: 'columnCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual int columnCount(const QModelIndex &) const ^ ./stringmodel.h(83,25): warning: 'index' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual QModelIndex index(int row, int column, const QModelIndex &parent) const ./stringmodel.h(92,25): warning: 'parent' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual QModelIndex parent(const QModelIndex &) const ^ ./stringmodel.h(97,14): warning: 'data' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] QVariant data (const QModelIndex & index, int role) const ^ tst_qquicklistview.cpp(8695,18): warning: unused variable 'ctxt' [-Wunused-variable] QQmlContext *ctxt = window->rootContext(); Task-number: QTBUG-63512 Change-Id: Ie928981a601d0462cfadd093815d110f6971d7f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* test: fix flaky in tst_QQuickPathView::movementDirection()Liang Qi2018-04-271-1/+3
| | | | | | | | | Due to heavy load in ci test vm, the animation perhaps didn't start after QTest::qWait(100). Task-number: QTBUG-67939 Change-Id: I8c786c82ea41c3d3514ab6bddaefb0c584f35fe0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix qmlInfo and friends for anonymous componentsSimon Hausmann2018-04-272-0/+22
| | | | | | | | | When used on for example delegates we can and should also print the line number and column where the component is declared. Change-Id: I0f02c675425700cde119352d0001895cc31a4c73 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Normalize URL before loading typesErik Verbruggen2018-04-274-0/+36
| | | | | | | | | This prevents loading of types with slightly different paths multiple times, like "qrc:/One.qml" and "qrc:///One.qml". Task-number: QTBUG-65723 Change-Id: I6e26db6d1d271b2ed37b97eb990618843e99c372 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make the test pass on my high resolution screenLars Knoll2018-04-251-1/+1
| | | | | Change-Id: I08e952fb8c19c21caf33ffb1cfdc260b533a01d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix QQuickListViewPrivate::snapItemAt for lists with spacingJohan Klokkhammer Helsing2018-04-252-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If lists had spacing, snapping would have gaps where snapItemAt would return nullptr eventhough there were items above and below in the list. I.e. if we have a list with items of size 100, and a spacing of 100, and scroll to 110 (right below the first item), then the first item would fail because this is false: itemTop+itemSize()/2 >= pos (50 >= 110) And the next item (the one we should have snapped to), would fail because this is false: itemTop-prevItemSize/2 < pos (200-100/2 < 110) The meaning of first part was probably to see if the middle of the current item is inside the view. The meaning of the second part was probably to see if the middle of the previous item is outside the view. This patch refactors the code so it's more visible what's happening and fixes the bug by taking the spacing into account when computing the position of the halfway positions. Task-number: QTBUG-59852 Change-Id: I60eec0d16e91d2f22d70b97d11bcde5d88ac2997 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make the shared test code independent of QtQmlUlf Hermann2018-04-2413-52/+44
| | | | | | | | | This enables us to drop the QML dependency from a number of tests. This is desirable because we want to test that we didn't do any incompatible changes to the debug framework. Change-Id: I937dd45d3079eac15c200c9d68bb4c911f61afc0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>