aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove qtquick-guidelines, move contents into qtquick-bestpracticesMitch Curtis2018-03-202-50/+15
| | | | | | | | | | | | This page doesn't offer much on its own, and qtquick-bestpractices.qdoc is already starting to gather useful guidelines, so move its contents there. Having everything related to best practices/guidelines on one page means less clicking between these "overview" pages, which I think is a bit of a problem currently. Change-Id: I18316dc177a6a7eb5a031e178cd0aed31dfa63ae Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tighten QML cache version checkingSimon Hausmann2018-03-205-39/+21
| | | | | | | | | | | | | Don't just include the "compile hash" of QtQml in the dependencies hash of QML files but use a dedicated field in the data structure, that we will also fill in when generating cache files ahead of time. This ensures that AOT generated cache files are considered invalid even when switching between different sha1s of declarative. Task-number: QTBUG-66986 Change-Id: I3d8ee103fd1a33a5b4c4576b3a2703fcd09712dd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix QML data structure version checking for ahead-of-time generated filesSimon Hausmann2018-03-2020-59/+204
| | | | | | | | | | | | | | | | | | We must also do version checking for QML and JS files that were compiled ahead of time and are embedded in resources. If the lookup for the original source code fails, then we must generate an appropriate error message. As an upside we get better error reporting when trying to load an empty file and Qt.include() now reports the error message in the statusText field. The error reporting for imported scripts was not changed as importing an empty script is (oddly) allowed. Task-number: QTBUG-66986 Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Handle function expressions as signal handlersErik Verbruggen2018-03-208-5/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways to use function expressions on the right-hand side of bindings: property var somethingPressed somethingPressed: function() { /* ..press something else.. */ } signal buttonPressed onButtonPressed: function() { /* ..handle buttonPress.. */ } In the former case, it declares a property that holds a function. So on initialization, the right-hand side of the binding returns a closure that gets assigned to the property 'somethingPressed'. In the latter case, the signal handler is explicitly marked as a function for clarity. So, the handler should not be returning the closure, but the handler should *be* the closure. In general, it is not possible to detect if the left-hand side is a property or a signal handler when generating QML cache files ahead of time. So for this case, we mark the function as only returning a closure. Then when instantiating the object, we check if it is a signal handler, and if the handler is marked as only returning a closure. If so, we set that closure to be the signal handler. Task-number: QTBUG-57043 Task-number: QTBUG-50328 Change-Id: I3008ddd847e30b7d0adef07344a326f84d85f1ba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: improve "Separate UI from Logic" sectionMitch Curtis2018-03-201-17/+31
| | | | | Change-Id: I0d36e009b4551e45e5e7fda6c95fc3fbfabfe1a5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: simplify "Qt Quick Best Practices" introduction paragraphMitch Curtis2018-03-201-4/+4
| | | | | | | | We don't need to mention specific challenges in the introduction. Change-Id: I03eec5fe543fbf0b1859850424eba8cfa9f134a5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: reorganize "Bundle Application Resources" sectionMitch Curtis2018-03-201-18/+30
| | | | | | | | | | Start off with the "direct" syntax, as that's the most straight-forward. Then, explain why it can be inefficient and introduce the concept of separate .qrc files. Change-Id: I63c2c3e188db04ed58e816f7e69ab98a42196ff1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix assigning objects to QJSValue propertiesSimon Hausmann2018-03-204-1/+19
| | | | | | | | | | | | | | We support simple object bindings such as someProperty: Rectangle { ... } when the type of "someProperty" is QVariant, but we produce an error when it's QJSValue. There is no good reason for that, and the fix for QTBUG-67118 requires this. Change-Id: Ia5dc88749bcba0b5c781a6ab2b4a9fb92299e0ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests: un-blacklist tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons()Gatis Paeglis2018-03-201-2/+0
| | | | | | | | | | This change reverts 8740f35e69 and 8ef46910fc. The qtestlib limitation was fixed by b3e91b66b9175c1c3ff5f73f3ac231f74f9bf932 Task-number: QTBUG-63957 Change-Id: I2e12b1eff25c5ea8005db0893477a9732f24d211 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix grammar in "Qt Quick Best Practices"Mitch Curtis2018-03-201-2/+2
| | | | | Change-Id: I3ba63110a3674675f44feca51ba98128844e1904 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix out of bounds reads in Array.concatLars Knoll2018-03-202-1/+15
| | | | | | | | | | In some cases, when our simple array data had an offset and data would wrap around, ArrayData::append would write out of bounds data into the new array, leading to crashes. Task-number: QTBUG-51581 Change-Id: I55172542ef0b94d263cfc9a17d7ca49ec6c3a565 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix CONFIG+=qtquickcompiler with Q_CLEANUP_RESOURCESimon Hausmann2018-03-191-3/+11
| | | | | | | | | As we provide the init resources wrapper, we must also provide the cleanup wrapper. Change-Id: I7e45ae48ba955e70ffd8e253d4d2c15d0a50dabe Task-number: QTBUG-67087 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML debugger: Don't crash when creating objects on engine destructionUlf Hermann2018-03-192-1/+26
| | | | | | | | | | You can create further objects while the QML engine is being destroyed. The debug service is not interested in those because they will be rather short lived anyway. Task-number: QTBUG-62458 Change-Id: If5395ef058268e0e956d159bc636495da1c0c98f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash when calling QQmlEngine::clearComponentCache()Simon Hausmann2018-03-196-61/+71
| | | | | | | | | | | | | | | | We must protect various resources in the type loader with our existing lock. The QQmlTypeLoaderQmldirContent is now value based, so that we can release the lock on the shared cache early. Copying it involves adjusting the refcount of the QHash and QString instances in the QQmlDirParser. The safety of this was verified with a TSAN build and the example supplied in the task. It crashed reliably with TASN errors first and with this patch it runs without errors. Task-number: QTBUG-41465 Change-Id: I616843c4b8bdfd65d1277d4faa8cb884d8e77df8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Restore the QV4_WRITE_PERF_MAP featureUlf Hermann2018-03-192-6/+109
| | | | | | | | We want to be able to generate perf map files for JITed code. Task-number: QTBUG-67056 Change-Id: I56899e1dbf184083d94efe926d21fca4f9ea1e18 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Pass "this" object when evaluating debug jobsUlf Hermann2018-03-175-8/+53
| | | | | | | | | We have to explicitly specify the "this" object on QV4::Function::call, otherwise it will assume undefined or the QML global object. Task-number: QTBUG-66942 Change-Id: I1af7742b4fee1b49e9760a413834daf3edb15d74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a test that verifies the this object in signal handlersSimon Hausmann2018-03-172-13/+25
| | | | | | | | | | Ask expected, this passes currently. The this object is set to the scope object in QQmlJavaScriptExpression::evaluate, which QQmlBoundSignalExpression::evaluate calls. Task-number: QTBUG-66942 Change-Id: I16a709768f9c798910377a52b5e882bb6d554a5f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix lookup of enums declared in QML singletonsSimon Hausmann2018-03-1614-61/+12
| | | | | | | | | | | | | | | | | | | | | Given the following expression var x = MySingleton.MyEnumValue where MySingleton is a QML (composite) singleton and MyEnumValue comes from a QML declared enum, we had code in place up to (and including) 5.10 to attempt to optimize that expression to a enum constant at compile time. In 5.10 that optimization does not exist anymore. In <= 5.10 we would also skip the optimization under certain circumstances (too many statementes, etc.). The fallback that is in place for handling this at run-time tried to be smart by avoiding the QQmlContextWrapper::get lookup and return straight a reference to the singleton as QObject. That works for regular property lookups, but it fails when trying to look up something like an enum, that isn't a meta-object property. Change-Id: I1819b9d8ae06a3f595e067bf5b018c4065be76bb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Reduce the overhead of type loader lockingSimon Hausmann2018-03-164-14/+15
| | | | | | | | | | Allow pulling the shared mutex out of the QQmlThread for the type loader so that the lock and unlock calls can be inlined. We do a lot more of those now. Task-number: QTBUG-41465 Change-Id: I42f3d17feb08863f51b003b061d89f49c5a6d574 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* When deactivating a loader, do not immediately clear its contextErik Verbruggen2018-03-165-2/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2eb2d6386da304cd1164264ae0bff685c796d89c, deactivating/clearing the loader would now prevent any subsequent bindings from being evaluated. The problem there was that the item created by the loader wouldn't have a parent item (among things) anymore, so references to it in the bindings would result in errors. The way to prevent it was done by invalidating the context of the item, which in turn would detach it from the root context. This is a problem if objects in the root context are referenced after deactivating/clearing the loader: onSomethingChanged: { loader.source = "" objectInRootContext.doIt() } This would result in a ReferenceError when resolving objectInRootContext and break the behavior present before the fix mentioned above. The correct way is to recursively clear the context set on all bindings, but leave everything in place. This way, no subsequent bindings will be evaluated, but the currently "running" scripts will still be able to reach the root context. Task-number: QTBUG-66822 Change-Id: Ic9c2ab0a752093a26967da4783cb4c29cf83d2ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Improve AnimatedSprite's documentationMitch Curtis2018-03-161-16/+16
| | | | | | Change-Id: Icc86afe67fd5a432798ce3173da51275bed1bf64 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Improve SpriteSequence's documentationMitch Curtis2018-03-161-12/+12
| | | | | Change-Id: I7e9e09ba3b6c0ec3c0b4bed75b24ed87fbe9660f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QQuickWindow: skip mouse synthesis for touch events from trackpadsShawn Rutledge2018-03-162-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A trackpad is primarily a mouse-emulating device, which can also recognize gestures, and furthermore can send raw touches iff it is asked to. So, every touch event from a trackpad is likely to be followed by a mouse or gesture event (especially when the MouseEmulation capability confirms that it is able to do that). Therefore mouse event synthesis is redundant. In this bug scenario, MultiPointTouchArea enables touch events within its rectangular bounds. A Flickable is on top. As you flick with two fingers on the trackpad, macOS sends touch events with two touch points (because MPTA enabled touch events) and also a series of QWheelEvents as it recognizes the flick gesture. The Flickable receives mouse events sythesized from one touch point, and reacts as if you were dragging with one finger on a touchscreen, while it simultaneously also reacts to the QWheelEvents. Meanwhile the remaining touchpoint falls through to the MPTA underneath; so the user ends up interacting with both at the same time and making the Flickable jump around besides. This patch just fixes the jumpiness in Flickable: it will no longer receive the synth-mouse events, so it will not be dragged, and will react only to the wheel events. But MPTA still gets the touches. Task-number: QTBUG-66329 Change-Id: I6f535a2c9e47bcb284eaf9ae1fdaa39f8b510af9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add Q_UNUSED(engine) to fix build on iOSShawn Rutledge2018-03-161-0/+2
| | | | | Change-Id: I47e84ee2c3f36dae9354e54b68ac60001703bf3d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Scale up SVG images if source size is larger than original sizeAndy Shaw2018-03-155-4/+27
| | | | | | | | | | | | | | Since SVG images can be scaled up without any loss of quality then we should allow this to happen even though it is not done for other image formats. This restores the 5.9.x behavior for SVG images. Additionally the manual test is updated to showcase an embedded image inside a SVG one to indicate this is continuing to work as before too. Task-number: QTBUG-67019 Change-Id: Ia719899937f8146e8fab50aa85adf18e2f79aa98 Reviewed-by: Evangelos Foutras <evangelos@foutrelis.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix use of CONFIG+=qtquickcompiler with spaces in pathsSimon Hausmann2018-03-141-6/+6
| | | | | | | | | | | Add strategic calls to system_quote and shell_quote and correct the output list iteration to not use $$list, as that will end up splitting on spaces in the path. Task-number: QTBUG-67011 Change-Id: I31dbee537e2052ac7b802ee3509a74c9db3b8beb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix a crash in Object.proto.propertyIsEnumerableLars Knoll2018-03-141-3/+5
| | | | | | | | | If the property being queried is an array index, we would call ArrayData::getProperty with a the Property pointer being null. We correctly handle this for named properties, but didn't here. Change-Id: Iba98a13f276432f273545c87cfc998fe64f45c51 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tests: add autotest for Q_GADGET derived template classNils Jeisecke2018-03-141-0/+29
| | | | | | | | This tests the effectivity of the qtbase fixes for QTBUG-66744. Task-number: QTBUG-66744 Change-Id: I5bb041082ae4ce6cb91076c3f1279ac7bdcae4f0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Add Qt Quick usage guidelinesVenugopal Shivashankar2018-03-135-0/+397
| | | | | | Task-number: QTBUG-15757 Change-Id: I9193ed459ced63cceb819a66f5a8c76042f455b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix typos, punctuation, and grammar in sprites.qdocMitch Curtis2018-03-131-30/+30
| | | | | Change-Id: Ie3c24958e96c54cd91cd4a752638c11764338028 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix non-integer scale factors with Text native renderingDavid Edmundson2018-03-131-2/+2
| | | | | | Task-number: QTBUG-67007 Change-Id: Id32cc14ea1bc258cfc139a859ccae014f5893563 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix ABI/API symbol taggingSimon Hausmann2018-03-121-14/+14
| | | | | | | | | | | | | | | The findclasslist.pl perl script that produces the linker version script got confused by the "struct name" that was part of a macro and thought that the class "name" in the *_p.h was supposed to be annotated with the private API tag, resulting in a "*4name*" mask in the linker script, which in turn made lots of public symbols "private" that had name in it, such as QQmlProperty::name(). Fixing the indentation works around it and conforms to coding style. Change-Id: I0c66a6bb1d49941d6ec6dd89d9433d9b6ae0c639 Done-with: Thiago Macieira <thiago.macieira@intel.com> Task-number: QTBUG-67004 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix failing ch15.9.5.43-0-8 after US summer time changeSimon Hausmann2018-03-122-0/+1
| | | | | | | | | | Eddy fixed the issue in the testsuite itself and this change bumps the submodule to include the fix. (It also brings in the .gitignore fix, which was omitted from an earlier merge by accident). Task-number: QTBUG-67010 Change-Id: I006a2c8babb135187eeb5c296b616e7c1208cd4c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix failing assertion when loading QML/JS on IntegrityErik Verbruggen2018-03-091-4/+15
| | | | | | | | | | | | | | | | | | | | | | With the QV4::Moth::BytecodeGenerator::Jump type we are relying on the compiler doing a return value optimization. That however is not required by the C++11 standard and the GHS compiler does indeed not do that here, resulting in a ~Jump destructor call in the following sequence _before_ link() is called: Jump generateJump() { ...; return Jump(...); } ... generateJump().link(); The destructor however verifies that link() was called, which fails. Fix this by making Jump a move-only type, which the compiler will issue if it doesn't perform a return value optimization. Task-number: QTBUG-66917 Change-Id: I97cc9a5d7f97d61e573ad8bc309cf48ab18eb25d Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix issue with bindings to aliases that cannot yet be resolvedErik Verbruggen2018-03-097-57/+122
| | | | | | | | | | | | | | When an alias points to a child object which has not yet been initialized, it's id won't have been registered yet, so setting up a binding to it will result in a crash. The fix is: when setting a binding target fails, and its target property is an alias, queue them until all bindings have been set up, and try again. Task-number: QTBUG-57041 Change-Id: I4dc5a6d25c0a32fed9fd952c955e2006c76be45a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up memory leaks in testsSimon Hausmann2018-03-081-272/+196
| | | | | | | | | | A call to QQmlComponent::create() transfer ownership of the created object to the caller. Many tests forgot to delete the object or only deleted it manually if all tests passed. The simplest way to avoid leaks this way is to store the returned value in a QScopedPointer. Change-Id: I6173f440eddedd4f3eab5026f710602a263246c9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix unnecessary evaluation of dependent bindingsSimon Hausmann2018-03-084-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Given two simple bindings in this order property int firstVar: secondVar property int secondVar: ... then the binding expression for "secondVar" ends up being evaluated twice at run-time. The first time happens when enabling the binding expression for "firstVar", which results in the engine detecting that there is a dependency onto another binding that has not been enabled yet. This is when QQmlData::flushPendingBinding(Impl) enables the expression for secondVar and does an initial evaluation. Afterwards the QQmlObjectCreator continues enabling the next binding in ::finalize(), which will end up evaluating secondVar a second time, unnecessarily. We can detect this case inside setEnabled and only call update() if we transition from disabled to enabled state. This should also cover the case of bindings created and assigned dynamically through QtQuick PropertyChanges / States, as those call setEnabled(false) before removing the binding (to replace it with something else) and setEnabled(true) when reverting the state (in QQmlPropertyPrivate::setBinding). Change-Id: I447432891eabff2c4393f5abfee1092992746fa0 Task-number: QTBUG-66945 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Initialize all members of QQmlPropertyDatav5.11.0-beta2Lars Knoll2018-03-081-9/+10
| | | | | | | This lead to quite a few valgrind warnings in test cases. Change-Id: Icef0fc5f93a68e4fe67e1ecd4755b456ad4778a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix compiler warnings on gcc 7.2Lars Knoll2018-03-082-9/+9
| | | | | | | | | | | | | gcc 7.2 gives tons of warnings of the form: ./3rdparty/masm/wtf/Assertions.h:186:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] In practice the marco expansion to (defined FOO && FOO) can safely be reduced to simply FOO, as #if FOO will expand to #if 0 if FOO is not defined. Change-Id: Idc1b09990725b99bbfa2c3bc949565254ea4174f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix issue with allocating huge objects in the memory managerLars Knoll2018-03-082-3/+24
| | | | | | | | | | | | | | We shouldn't allocate objects that are larger than the size of a standard memory segment through the chunk allocator, as this can lead to problems when freeing the segment and then re-using it again. Instead allocate a private MemorySegment for these objects, and free it when the object gets garbage collected. Task-number: QTBUG-66732 Change-Id: Ic24ff65d204977f313ab0adaf7a8132883e525f0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rebuild property cache in QObjectWrapper::getProperty if deletedDavid Edmundson2018-03-081-0/+5
| | | | | | | | | | | | | | | QQmlData is shared between engines, but the relevant QObjectWrapper is not. Since 749a7212e903d8e8c6f256edb1836b9449cc7fe1 when a QObjectWrapper is deleted it resets the shared QQmlData propertyCache. ab5d4c78224c9ec79165e8890e5f8b8e838e0709 fixed this situation for bindings, however we would still hit effectively the same crash in the same situation if a function is evaluated before a binding. Change-Id: I20cd91cd8e31fd0176d542822c67e81a790599ba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix group property bindings for aliases that point to id objectsSimon Hausmann2018-03-088-41/+132
| | | | | | | | | | | | | | | | | | When declaring bindings within a group property and that group property itself is a locally declared alias, then by the time we try to determine property caches for the group property we will fail as the aliases haven't been resolved yet. To fix this we can keep track of such group property declarations (encapsulated in the QQmlInstantiatingBindingContext that has all we need) and after we've resolved the aliases (added them to the property caches), we can go back and fill in the entries in the propertyCaches array for the group properties. Task-number: QTBUG-51043 Change-Id: I5613513db3977934bcc51a3df530de47d57326f9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix calling Qt.createComponent() from QQmlEngine::evaluate()Simon Hausmann2018-03-082-0/+22
| | | | | | | | | | | | | If we're run from a top-level evaluate() call from the JS engine, then let's assume that any created components are top-level components that belong to the root QML engine context. This is not quite a typical use-case, but our API allows for this and this seems like an easy and sensible solution. Task-number: QTBUG-66792 Change-Id: Ic1c9171c257e8e60c0b2c43f9194bd038744ed2d Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add an example of binding LayoutMirroring to the app's layoutDirectionMitch Curtis2018-03-081-0/+7
| | | | | Change-Id: I81aa96641d9bef35e003b67e691607a926c087d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix regression involving aliases on case-insensitive file systemsMitch Curtis2018-03-083-1/+24
| | | | | | | | | | | | | | When initializing a QQmlProperty with the following syntax: QQmlProperty property(root, "testType.objectName", QQmlEngine::contextForObject(root)); only try to look up types (for each token after splitting on the '.') if the token starts with an uppercase letter, as 1e350a8c now enforces that type names begin with an uppercase letter. Task-number: QTBUG-66715 Change-Id: Iab64be1deb971dca256fc65d358c773837222a57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve documentation on component creation contextMichael Brasser2018-03-082-1/+4
| | | | | Change-Id: I55adc9c261529ee4b88fbb5591b3955e396437a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tests: refactor and un-blacklist tst_QQuickMouseArea::pressedMultipleButtonsGatis Paeglis2018-03-082-85/+72
| | | | | | | | | | | | | | | | | It seems that qtestlib has never really supported mouse state handling for multiple buttons (see QTBUG-64030). And the current implementation of this test relied on QGuiApplication to generate mouse releases when necessary. Since a37785ec7638e7485112b87dd7e767881fecc114, qtestlib does not rely on QGuiApplication to deduce mouse button state, but requires explicit mouse press/release events via QTest::mouse* APIs, thus causing this auto test to fail. Refactor the auto test to use QTest::mouse* APIs. This change depends on a fix for QTBUG-64030. Task-number: QTBUG-63786 Change-Id: Id24526714ec9716a0126e8288e5e8974074ebc9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* touchDevice: don't lose bits from QTouchDevice::capabilitiesShawn Rutledge2018-03-081-2/+1
| | | | | | | | | | | | It was a bug that we made a local QQuickPointerDevice::Capabilities instance and didn't pass it to the QQuickPointerDevice constructor. Further, we've now reserved the entire lower byte for storing QTouchDevice::capabilities, and the upper byte for storing QtQuick- specific capabilities, so we can copy the whole lower byte instead of just the lower nybble. Change-Id: Ia21b6a1503ea870a1e16cebe70a20f4e21903054 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* TapHandler: add singleTapped and doubleTapped signalsShawn Rutledge2018-03-022-3/+29
| | | | | | | | | | | | | This is for convenience. It's nicer not to need to test tapCount in JavaScript if you know you want to react on double-click: onTapped: if (tapCount === 2) doSomething() becomes onDoubleTapped: doSomething() Neither of these are guaranteed to be exclusive though: singleTapped occurs first, then doubleTapped if you tap again quickly, then tapCount keeps increasing as long as you keep tapping. Change-Id: I6fff10880831d5be0848b9957141311db8c2c0f0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: Add special module header to qtqmltest.qdocconfMartin Smith2018-03-021-1/+1
| | | | | | | | | | Added this variable to qtqmltest.qdocconf because the module and the module header have different names: moduleheader = QtQuickTest Change-Id: Ie9bd61598c063b3f16ef889e5e7bd2f1b33d1fc5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>