aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QQuickWindowPrivate::deliverWheelEvent: fix global position of the eventOleg Yadrov2017-02-171-5/+21
| | | | | | | | | | [ChangeLog][QtQuick] QWheelEvent in QQuickItem::wheelEvent now keeps correct global position. Task-number: QTBUG-58845 Change-Id: I7f88d5152927a157e2bd07ee4d5f2208be884eec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add missing qmlRegisterExtendedUncreatableType variantKevin Ottens2017-02-173-0/+117
| | | | | | | | | | | | | We need another qmlRegisterExtendedUncreatableType allowing to pass the metaObjectRevision as third parameter. Otherwise extended uncreatable types can't use for instance REVISION in their properties. This is missing for some of the Qt 3D types for which we are cleaning up the versioning for 5.9.0 and which fall in this category. Change-Id: I20ebec339814d7f43cc4b2b58090406b0d5fb97e Task-Id: QTBUG-58895 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Directly load already known metaproperties in QV4QObjectWrapperUlf Hermann2017-02-153-0/+54
| | | | | | | | | | | | | A method and a property can have the same name in a QObject. This is not directly expressible in a JS object, but when iterating the properties of a wrapped QObject we should not look them up by name as we might find the wrong one this way. However, as we already know what we are looking for, there is no need for any further searching anyway. Task-number: QTBUG-58887 Change-Id: I68574008c7a078baab9b343d550cc27956b0d5a9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename Window.targetScreen to screen, and pick up changes to the screenTor Arne Vestbø2017-02-111-1/+1
| | | | | | | | | | | The screen property can be used for both setting the initital screen, and for reading out the current screen, so 'targetScreen' was not an ideal name for this property. Change-Id: I1b617085b1e8e0e437355740be5d3cee9379c47f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix a crash in setInternalClassRobin Burchell2017-02-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | Revealed by the ES6 testsuite, ./test/built-ins/Object/freeze/15.2.3.9-2-1.js and probably others. We cannot unconditionally dereference memberData, it may not always exist. ES6 tests test/built-ins/Object/freeze before: === Summary === - Ran 92 tests - Passed 66 tests (71.7%) - Failed 26 tests (28.3%) after: === Summary === - Ran 92 tests - Passed 90 tests (97.8%) - Failed 2 tests (2.2%) Change-Id: I22a6c9ca081394ba15edfde09f73769eb3ce47b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* add QQmlEngine::offlineStorageDatabaseFilePath(db), use in LocalStorageShawn Rutledge2017-02-021-0/+29
| | | | | | | | | | | This is C++ API to get the actual storage path for a particular database. [ChangeLog][QtQml] Added QQmlEngine::offlineStorageDatabaseFilePath(dbName) to allow getting the actual storage path for a particular database. Task-number: QTBUG-52013 Change-Id: I1cbd9454c537f08c97f4dafc06fd6b14e81c51af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge dev into 5.9Oswald Buddenhagen2017-02-0118-13/+275
|\ | | | | | | Change-Id: I8436b1be632b80aae340cc692795ba86b4e3e79b
| * Add fontInfo property to TextEskil Abrahamsen Blomfeldt2017-01-312-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a way to determine which font will actually be used to presenting the text, which can be especially useful when not using a fixed size font (the font info will then expose the actual font size used by the Text element.) [ChangeLog][QtQuick][Text] Added fontInfo property to Text type, providing a way to query properties of the actual font used for presenting the text. Task-number: QTBUG-51133 Change-Id: I5860fb1bd25ac5734713f49c8482428f2d531d22 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| * Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-302-3/+1
| |\ | | | | | | | | | Change-Id: I312dcd7f8bbe6e15b157406e174c160e0eb7e225
| | * Use qtConfig where appropriateJake Petroules2017-01-261-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibe2a256ce5f208b3431c32a124aacf616641c965 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * remove obsolete host build declarations from subdirs projectsOswald Buddenhagen2017-01-261-2/+0
| | | | | | | | | | | | | | | | | | | | | follows up qtbase/4eb2feb2. Change-Id: I13ba74fb25dfd059782b369350fa14e44b70bf79 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | Make Item::grabToImage work in more cases, and improve test coverageAlbert Astals Cid2017-01-271-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression caused by 9c50216c7bbbdb2bb51d4485286bf09e12fb5b62 when the Image specified fillMode: aspectRatioCrop/Fit. [ChangeLog][QtQuick][Image] Item::grabToImage on an Image element will now work regardless of the Image's sourceSize or cache properties. Change-Id: I225854c48f0c35a3cb2ef0dd56bf51bd88c31779 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| * | Enable resolution of composite types in QQmlTypeNameCacheRobin Burchell2017-01-277-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We didn't have resolution of composite types previously, which is a prerequisite to do more exciting things with QML types in JavaScript (such as instanceof). By deferring the resolution to QQmlImports, we can avoid the need to fill the cache with types that may not be needed, while still finding types which are requested. In the future, we could consider removing the "special" handling for composite singletons as they should be found through QQmlImports now. If we do that, we may still want to cache the QUrl for the types, to avoid using QQmlImports too often directly, as it is a little slow itself. This change doesn't regress tst_compilation. Task-number: QTBUG-24799 Change-Id: I9ba2e4829ca49008fd180fb488c586475cf90674 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-266-6/+126
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickutilmodule.cpp tools/qmllint/main.cpp Change-Id: Ic2283f88c293ca7fc776de3e83eb4c7812309d8a
| | * Stabilize testJan Arve Saether2017-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obviously, if the animation still hasn't stopped, we cannot expect it to fail on the next QTRY_COMPARE, since that might wait until it then passes, thus CI will log that as an XPASS. This failed during CI run for MSVC 2015: XPASS : tst_QPauseAnimationJob::multipleSequentialGroups() QCOMPARE(((group.state())), QAbstractAnimationJob::Stopped) returned TRUE unexpectedly. tst_qpauseanimationjob.cpp(396) : failure location Change-Id: I25151123b8fc2617f2a4d3690215e6a1ed2856ff Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Do not leak the item, and use a QScopedPointer to guarantee cleanupJan Arve Saether2017-01-231-2/+1
| | | | | | | | | | | | | | | Change-Id: Ib4160f418686cef6d85dfd64657d25836f66778e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * StackLayout: propagate rearrange() call to child layoutsOleg Yadrov2017-01-192-1/+109
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-57867 Change-Id: I0190b892e2bc2966b82a0dbd99e53fd9d6848957 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Fix support for QJSValue as C++ signal parameter type, part 2Simon Hausmann2017-01-182-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>
* | | fix test_mouseDrag on RHEL 7.2Shawn Rutledge2017-02-012-5/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mouseDrag(item, x, y, dx, dy, button, modifiers, delay) in TestCase.qml adds intermediate mouseMove events if dx or dy is too large (specifically if Math.round(dx/3) > dragThreshold) and that is affecting the outcome of this test. So we need to stay under that threshold. The original point of this test is from f52227f66a7af5692140ad036c06857cd2e7abcf / QTBUG-30188 : when you drag past the dragThreshold, and the dragged Item "breaks loose" and starts dragging, the initial distance that it jumps should be equal to the dragThreshold, not greater. To test it, we need to move a distance which is greater than the dragThreshold in one move event, not break it up into smaller movements. This reverts commit 432eb3344b0581ea1915840365b71376388a75b2. Task-number: QTBUG-58025 Change-Id: Ib6da69fb465b58fde1bf8ba56c4c3a1cb584f698 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | tst_compilation: Add a test for compilation of a large number of typesRobin Burchell2017-01-241-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I'll be touching QQmlImport, it would be good to ensure it doesn't regress. This may also be useful for future such changes (e.g. I want to try play around with how the implicit import is handled). Results for me on a recent dev snapshot, 2013 rmbp: ********* Start testing of tst_compilation ********* Config: Using QtTest library 5.9.0, Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.0.0 (clang-800.0.42.1) (Apple)) PASS : tst_compilation::initTestCase() PASS : tst_compilation::bigimport(10, qmldir) RESULT : tst_compilation::bigimport():"10, qmldir": 3.6 msecs per iteration (total: 59, iterations: 16) PASS : tst_compilation::bigimport(100, qmldir) RESULT : tst_compilation::bigimport():"100, qmldir": 54 msecs per iteration (total: 54, iterations: 1) PASS : tst_compilation::bigimport(1000, qmldir) RESULT : tst_compilation::bigimport():"1000, qmldir": 558 msecs per iteration (total: 558, iterations: 1) PASS : tst_compilation::bigimport(10, noqmldir) RESULT : tst_compilation::bigimport():"10, noqmldir": 5.0 msecs per iteration (total: 80, iterations: 16) PASS : tst_compilation::bigimport(100, noqmldir) RESULT : tst_compilation::bigimport():"100, noqmldir": 58 msecs per iteration (total: 58, iterations: 1) PASS : tst_compilation::bigimport(1000, noqmldir) RESULT : tst_compilation::bigimport():"1000, noqmldir": 558 msecs per iteration (total: 558, iterations: 1) PASS : tst_compilation::cleanupTestCase() Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 22400ms ********* Finished testing of tst_compilation ********* Change-Id: I7159e561fb13a3c48e966d5b963dc0ef1ca783e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Teach QQmlDirParser to ignore the classname keywordRobin Burchell2017-01-242-0/+14
| | | | | | | | | | | | | | | | | | This saves QQmlImport from some unnecessary bad lookups when finding types (due to classname being misinterpreted as belonging as a component). Change-Id: I36e622e357e55e98a5af46911709640c5d8fa291 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist qmltest::mouserelease::test_mouseDrag() on RHEL 7.2Liang Qi2017-01-241-0/+2
| | | | | | | | | | | | Task-number: QTBUG-58025 Change-Id: I0768ea834d5666f2831f24c3b2c71b7a4260d5d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qqmlecmascript: Add some simple coverage for instanceofRobin Burchell2017-01-201-0/+64
| | | | | | | | | | | | | | | | | | | | Since I'm working on this, it is nice to have some simple verification that things are working. I don't expect this to provide full coverage, but it should at least make sure that the basics are ok, and nicely provides a place to put further tests if it ever somehow breaks. Change-Id: If91154dee836cc514515bde122e48b271de22676 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | qmltest: added layout/tst_layout.qml and related filesLiang Qi2017-01-203-0/+186
| | | | | | | | | | | | | | | | They are moved from qtquickcontrols:tests/auto/controls in 3437fd56. Task-number: QTBUG-58294 Change-Id: I281d4e505b2f699154dd4efb7a4601bdf3856295 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | PathAnimation: fix bug when PathSvg or PathLine is the last item in PathOleg Yadrov2017-01-203-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both QQuickPathLine and QQuickPathSvg inherit QQuickCurve class which has “x” and “y” properties that return qreal type, but internally they are stored as QQmlNullableValue<qreal>. At the same time, if any of them is not specified explicitly, its getter returns 0. QQuickPath processes QQuickPath%Type% objects and produces a QPainterPath which later used by QQuickPathAnimation. QQuickPathAnimation only created a QAbstractAnimationJob if QQuickPath::hasEnd returned true, and hasEnd returned true only if both “x” and “y” were specified explicitly. All that in conjunction led to the situation when if you had either - a PathLine with unspecified “x” or “y”; or - a PathSvg which was the last (or the only) path element in your Path, PathAnimation would not start. This patch removes hasEnd check, it should be safe to do because QPainterPath is always valid anyway due to the fact QQuickCurve::x() and QQuickCurve::y() return 0 if they have not been not explicitly set. Task-number: QTBUG-57666 Change-Id: Id320aaeb5aff0964d6493b7b80d5d9a7d36acce8 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | test262: Allow specifying a custom V4CMDRobin Burchell2017-01-191-1/+1
| | | | | | | | | | | | | | | | Useful for running a test tree against different qmljs or if qmljs is outside PATH. Change-Id: Ibaa24a15d32b21f9293db2c042fe3f1de3bb75eb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAGAlbert Astals Cid2017-01-191-1/+3
| | | | | | | | | | Change-Id: Ibedd0d0c23cf194ea02a229ab643450dbefd40aa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Make inspector animation speed test more robustUlf Hermann2017-01-182-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | We don't exactly know when the animation speed is actually set and the system clock may play tricks on us. Consider the test failed when the wrong animation speed is witnessed 3 times in a row and successful if the correct one is witnessed 3 times in a row. Also, make sure we don't confuse lines from different hits of the timer. Task-number: QTBUG-58186 Change-Id: Iaa2c35f723a92f32131e36084399b3d32accb7d0 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | qmlInfo: Switch message level to QtInfoMsg, matching the function nameRobin Burchell2017-01-171-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmlInfo predated info-level messages in QtCore, and as such previously sent warning-level messages despite the unfortunate naming. Now that we have an actual qmlWarning function, and we have switched our code to use it, we can change qmlInfo's behavior to better match the function naming. This does have the impact that existing qmlInfo callers will basically need a s/qmlInfo/qmlWarning/g to retain the same QDebug level in user code, but I feel that this behavior change makes sense given the better consistency with C++-side QDebug we attain. [ChangeLog][QtQml][Important Behavior Changes] qmlInfo now reports messages with a QtMsgType of QtInfoMsg instead of QtWarningMsg. To continue to send warnings, callers should migrate to the newly-introduced qmlWarning function. Change-Id: I16c88d94377b5956eb6921b64af7c84d1ca024f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove remnants of blackberry platform supportRobin Burchell2017-01-163-13/+0
| | | | | | | | | | | | | | | | The last remnants were removed from qtbase in 5.7 making this all dead code, so match here too. Change-Id: I10f3f1c614562f2a97ade7cdf5002065d6f79e07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | ListView: allow flicking to both directionsJ-P Nurmi2017-01-162-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously flicking was restricted to the orientation of the ListView. [ChangeLog][QtQuick][ListView] Made it possible to enable horizontal flicking in a vertical ListView, and vice versa. The only thing apps must do is to specify the desired flick direction and the content width (vertical ListView) or content height (horizontal ListView), which is not calculated by ListView. Change-Id: Ic370e57f5d18679940d48e7a2c20c200b2ef36d1 Task-number: QTBUG-52553 Task-number: QTBUG-56501 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | tests: Remove some vestigial referencesRobin Burchell2017-01-162-48/+0
| | | | | | | | | | | | | | | | | | qtdeclarative hasn't relied on qtwebkit for a long time (since fbfb27a44a824fe479b526cbc6ccd4696d674c83 & 56d34a653a7ec4265835a7cb9b6352696f802e31 as early as 2011!). Change-Id: If02572617034bf2c3eecbf081b96b1ed0ad65b45 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlApplicationEngine: Yet another fix after QUrl behavior changes in QtBaseRobin Burchell2017-01-163-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Picture the following application: QQmlApplication qAppEngine("main.qml"); With main.qml: ... AComponentInTheSameDirectory { } ... This was failing, with the error: file:main.qml:13 AComponentInTheSameDirectory is not a type Which is wrong, but also reveals the root cause in that the original filename was not a fully resolved path. Change-Id: Ifc5557cc43f4bb92fd121ea9f7a37f09b3b38a9b Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix imageSource and svg tests after change to how QtSvg interprets image sizeRobin Burchell2017-01-152-12/+6
| | | | | | | | | | | | | | | | | | | | | | These tests were blacklisted after QtSvg/4bd5d6ced07d2d0e643a13e7cebb228c521d2046. in order to integrate qt5.git. Now, fix the tests to match the new behavior, and remove the blacklisting. Task-number: QTBUG-58082 Change-Id: I77abe995095ee52978c5957e49e1547b3af7708b Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-148-7/+110
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9d87ed86e95b5901a86cc3aa65d7ac39b0b708c2
| * Fix crash when C++ QJSValue parameterized signal interacts with JSSimon Hausmann2017-01-133-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>
| * Avoid needless notifications when destroying layoutsJan Arve Saether2017-01-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting a layout with children, it ends up in ~QQuickItem(), which in turn will call setParentItem(0). setParentItem(0) will in turn call setEffectiveVisibleRecur(), which will recurse down all its descendants. Therefore, deleting a top level layout might trigger item change listeners for *all* its descendants, not only its direct children. This behavior might even cause crashes: The visibility changes will then trigger an invalidation of the layout, which will propagate up the parent hierarchy, and potentially call invalidate() on a partially-destroyed layout, which then might crash. Change-Id: I48e11d57f69e9011ced6c3a0b51e3d89b24ad5c1 Task-number: QTBUG-55103 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QML tooling: Make sure we signal object creation also from QQmlIncubatorUlf Hermann2017-01-113-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | We have to call the QQmlEngineDebugService back from QQmlObjectCreator rather than QQmlComponent, as there are more ways to create an object. We also add the new instance to the global instance list if only the V4 debug service is active, as both QQmlEngineDebugService and QV4DebugService use it. Change-Id: I5dcc71b2e91049bc19ec70d7b87959a61c9b6b75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix QML cache not being invalidated when source path changesSimon Hausmann2017-01-021-5/+53
| | | | | | | | | | | | | | | | | | | | | | | | When somebody renames the directory name underneath a QML file and its cache file, then we need to re-generate the cache as it contains the fully path of the source path. That is sometimes used to resolve relative URLs (such as images) and therefore needs updating (by re-creating the cache). Task-number: QTBUG-57644 Change-Id: I9766668859aad8e9d71f278c3f26c0585258c14e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Deprecate Text::doLayout() in favor of forceLayout()J-P Nurmi2017-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Item views and positioners all have now forceLayout(), so make the Text element API consistent with them. The old doLayout(), which sounds more like an internal helper method, is deprecated and marked for removal in Qt 6. [ChangeLog][QtQuick][Text] Deprecated doLayout() in favor of forceLayout(). Change-Id: I051988fca13c4cd84904f7b268d51f6a96f28af3 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Blacklist imageSource and svg testsRobin Burchell2017-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QtSvg changed how the dimensions of an SVG are determined in 4bd5d6ced07d2d0e643a13e7cebb228c521d2046. These tests assume the old behavior at present, so blacklist the tests so qt5 integration can proceed. Task-number: QTBUG-58082 Change-Id: Ia579fbe6736932c081f9873d84bea4c01a975bad Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Improve visibility into Positioner positioning from QMLMichael Brasser2017-01-131-0/+75
| | | | | | | | | | | | | | | | | | | | Add a forceLayout function, similar to the views, as well as a signal that indicates when positioning has completed. Change-Id: Ice01ea0840c707e403fdd4ea59d92a89e2ed8e4b Task-number: QTBUG-44762 Task-number: QTBUG-32114 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | test: fix tst_QQuickGraphicsInfo::testProperties()Liang Qi2017-01-122-4/+1
| | | | | | | | | | | | | | | | This also reverts commit 26051fd5724e56e0715bc56fde8e8464ff386bbc. Task-number: QTBUG-58039 Change-Id: I0b9146a64f1a112f5c059b2e29e874631c81d12c Reviewed-by: David Faure <david.faure@kdab.com>
* | tst_touchmouse: Have a go at some stabilisation & improvementsRobin Burchell2017-01-111-315/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use QScopedPointer to own views, preventing leakage (was a problem in a few of these tests, e.g. pinchOnFlickable/flickableOnPinch/mouseOnFlickableOnPinch) * Only qWaitForWindowActive, as the tests aren't doing anything graphical, they don't need an expose event, which means less waiting * Use the test utilities to center the windows on screen to make sure they are not under desktop chrome & have a non-null position. If position is 0,0 that means window->position().isNull() is true, so qWaitForWindowActive will wait for its entire timeout: 5 seconds. This means no "manual" tweaking of geometry anymore: the position is now taken care of by the test utilities, and we let the root QML item size determine the window size. * Move the mouse away from the window using the test utilities. Done-with: Shawn Rutledge Change-Id: I4ac6a0d56067c57ef51f186fe3cd118cab056ff2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | PathView: fix crash on path removeOleg Yadrov2017-01-112-0/+40
| | | | | | | | | | | | | | | | | | | | There was no check if new path is a valid object Task-number: QTBUG-53917 Change-Id: I2fd9534c1d34633243d16eda56a2b07e18dabe16 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | QQmlInfo: Add qmlDebug & qmlWarning functions alongside qmlInfoRobin Burchell2017-01-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This way, we can correctly write to multiple levels of QDebug with QML context information. A followup change will port all existing callers, and subsequently change qmlInfo's message level to QtInfoMsg. [ChangeLog][QtQml] Introduced qmlDebug & qmlWarning functions to qqmlinfo.h, in addition to the pre-existing qmlInfo function. As a side effect, QQmlError has also gained messageType() and setMessageType(). Change-Id: I04ced5952c5c3c58293a89a6767c7b545c03cc0a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qqmllocale: avoid duplicating a QLocale::toString() callEdward Welbourne2017-01-101-6/+9
| | | | | | | | | | | | | | | | Reuse the same const QString in both places, in each of the functions that repeated this pattern. Change-Id: Ic20281692d84b3ad5257af9837957e0893452b1a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qqmllocale: simplify creation of a QDateTimeEdward Welbourne2017-01-101-27/+9
| | | | | | | | | | | | | | | | | | Nine tests all used setDate and setTime on a default QDateTime, where just initializing it right, in one line, is simple, terse and easy to understand. This also allows it to be const. Change-Id: I77fd8b36b705cafc49f9020ae9280dfdcfece0d8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qqmllocale: shuffle commentary on JS Date's month numberingEdward Welbourne2017-01-102-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | While it departs from common date numbering, as used by QDateTime, the 0=Jan numbering used by JS's Date was copied from Java's Date, which (probably) copied it from ANSI C's struct tm; and C likes to count from zero. So don't call it weird; and let's comment on it where it's actually relevant (in JS code with the offset, rather than against uses of QDate, which uses 1=Jan numbering) and only once. Change-Id: I926138e88583339bec8641e3b28a642794dc217d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qqmllocale: use unsetenv to clear environment variableEdward Welbourne2017-01-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_qqmllocale::timeZoneUpdated() was recording the prior time zone, frobbing it for the duration of its test, then restoring it. However, if TZ was previously unset, it got set to empty instead of being unset. This did not quite have the same effect; UTC ends up being used instead of the system default, with potential for conflict between system functions (that have attended to tzset) and third-party libraries (e.g. ICU) with internal state saved from before the change. Change-Id: I9f2147cd8858316e9ba5fd84d95dfc2c4538b0ab Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>