aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add some null pointer checks to avoid some rare crashesv5.11.2Jan Arve Sæther2018-09-112-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The crashes happened because somebody was calling processEvents() from a mouse/touch event handler that was running for a long time. If we called processEvents() from the onPressed handler, and we released the mouse while still not having returned from the onPressed handler, it meant that we were actually delivering the release event before the press event was fully delivered... This should normally not be a problem, but QQuickWindow is reusing the QQuickPointerEvent object for each incoming QEvent, which meant that when we were delivering the release event, it would reuse (and overwrite) the QQuickPointerEvent that the press event handler is still using.... This then caused some assumptions that the code made to be wrong. This only avoids the crashes, and doesn't really fix the "out-of-order" delivery and the state inconsistency that this can lead to (e.g. mouse button states might be still wrong). But on the other hand, it is not the recommended way of making a long-running handler not block the application. The proper way is to create a thread that will run in the background, so that there would be no need to call processEvents() in the event handler. Change-Id: I6fa5d4f5748ef30d082a210f03ef382922bd4b29 Task-number: QTBUG-65454 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge 5.11 into 5.11.2Frederik Gladhorn2018-08-272-5/+24
|\ | | | | | | Change-Id: I886fb173e156fb719d5e1d84cb1b0f3052a606b4
| * Delete textures even if one of the windows is invisibleVaL Doroshchuk2018-08-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | If there is an invisible window that will not be rendered but is constantly requested to render, updatePending is always set. This prevented purging of already unneeded textures, and meant endSync() was never called and m_texturesToDelete was never cleared. Added a fix to clear the updatePending flag regardless of visibility. Task-number: QTBUG-66116 Change-Id: Ib8bf453a3dee18d3d43342580c619664b701acae Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix quadratic behavior when allocating very large objectsLars Knoll2018-08-211-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | MemberData would get reallocated to exactly the required new size. In case there's one large object dominating things, this would then trigger a GC run on every reallocation, causing a quadratic runtime behaviour due to marking and sweeping that memory. Task-number: QTBUG-69475 Change-Id: I1834cbe21412ce3409cfd47810af1f73c5a29b46 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Fix broken linkPaul Wicking2018-08-231-0/+4
|/ | | | | | | | | | Add missing external page reference to resolve link. Fixes: QTBUG-70130 Change-Id: I3af162c619ba88d425a7714fbf20f45f7b3213ab Task-number: QTBUG-70130 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: add list of SVG colors to color QML Basic Type pageMitch Curtis2018-08-093-2/+605
| | | | | | | | | The page that we link to used to contain a list of the colors, but it doesn't anymore, so we'll add our own. Change-Id: I1160e3de7f4ab0ead727b0261edafda30cce3270 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Rename section titles to avoid auto-linker issuesPaul Wicking2018-08-071-4/+4
| | | | | | | | | The section titles cause links that should target QML types to link to the page sections. Renaming the section titles to link correctly. Task-number: QTBUG-59445 Change-Id: Idde600c87621d270c4e25a5dac0a55fbfc7a96ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Use [] instead of new Array() in snippetPaul Wicking2018-07-311-1/+1
| | | | | | | | | | This change removes warning about using new Array() as constructor with the snippet in Qt Creator. Task-number: QTBUG-65891 Change-Id: I858601c21d703e4226db4f4c4d9ef52ec6418ed8 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build without GUI moduleSamuli Piippo2018-07-311-2/+2
| | | | | | | | | | | | | | Qt Quick has a dependency to gui, but there is no way to disable an entire configure module from the configure system. Add module checks to configure.json so that it passes even without the gui module present. Fixes "Unknown feature object movie in expression 'features.movie'." Task-number: QTBUG-56656 Change-Id: I16355b7e218c32cab33e8ef9a6012da3e55656bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Extend ItemSelectionModel QML documentationPaul Wicking2018-07-301-4/+59
| | | | | | | | | This change provides a bare minimum documentation for the ItemSelectionModel QML type. Task-number: QTBUG-58090 Change-Id: I0e232f8e05e7629d6f573f8dce21154d0ec307e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add precision to scene graph descriptionPaul Wicking2018-07-301-4/+4
| | | | | | Task-number: QTBUG-60913 Change-Id: I3a9d8925337a12a849e39a70f168dbfc7f007e5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove const from QQuickPointerEvent::device propertyShawn Rutledge2018-07-271-1/+1
| | | | | | | | | A property never has const pointer as its type. Getting this wrong also causes problems with the QML type registration not matching the actual type. Task-number: QTBUG-61749 Change-Id: Ic3c47499cc4dff6df0beecf5b1413c76509ca6f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Fix broken link targetsPaul Wicking2018-07-251-0/+1
| | | | | | | | | * Rename two section titles that caused confusion for the autolinker. * Add see also link to correct location from SpriteSequence QML type. Task-number: QTBUG-58640 Change-Id: I62b941d00198ac56d998ca14b926c7bb37f6c91e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Add homepage to masm attributionKai Koehne2018-07-241-0/+1
| | | | | Change-Id: I7ab9545d8c7fd747e3a6ddae8ecee53897d9cb66 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "[Quick] Make sure an transition instance is stopped when destroyed"Simon Hausmann2018-07-171-1/+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>
* Fix unaligned memory access on ARMSimon Hausmann2018-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | When decoding the bytecode, we must be careful to avoid that the compiler generates aligned memory access instructions, because the current byte code pointer may not be aligned at all. When decoding integer parameters, the existing code would expland to qFromLittleEndian(reinterpret_cast<const int>(code)[-nargs+offset]) which loads the integer from the array before passing it by value to qFromLittleEndian. [ChangeLog][QtQml] Fix crashes with unaligned memory access on ARM. Task-number: QTBUG-69328 Change-Id: Ib1c66113e2b8e103ad6f5de11443a561d23a4185 Reviewed-by: Bhushan Shah <bshah@kde.org> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Doc: update link to point to Controls 2 rather than Controls 1Mitch Curtis2018-07-161-1/+1
| | | | | | Change-Id: I2dd5877754b3ccbc975e5cdae5e80d1db28f8e48 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Extend documentation for ItemSelectionModelPaul Wicking2018-07-161-0/+41
| | | | | | | | | | | Add documentation for setCurrentIndex() and the select() methods. Include SelectionFlag enum values in select(index, command) description. Task-number: QTBUG-56320 Change-Id: Ia43fa2903656d89a1e80bef6097500d329df0c59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix conversion of numeric literals in the AST to stringsSimon Hausmann2018-07-132-1/+23
| | | | | | | | | | | | After commit 91f3687ee51db83d9018bd61c3fbc736c6e9912e in qtbase, QString::number includes a zero padding in the exponent that breaks compliance with the ECMAScript tests. Instead of QString::number, we have to use a QLocale instance that turns off the padding of the exponent. Change-Id: Ib8c63bc501cadca026c52359006628f6c271ba6d Task-number: QTBUG-69432 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* [Quick] Make sure an transition instance is stopped when destroyedErik Verbruggen2018-07-131-0/+1
| | | | | | | | | | | | | | | 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>
* Doc: Fix broken link to examplePaul Wicking2018-07-131-1/+1
| | | | | | Task-number: QTBUG-69438 Change-Id: I4ac191029eccc97e7b9947ec56bf008562c9f4ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickRenderControl: Grab framebuffer with alpha if the window uses itAndy Shaw2018-07-121-1/+2
| | | | | Change-Id: Ie11e86be997d749e6f82f0fb81a82bb0b50ab1f1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Update QTime to JavaScript Date conversion descriptionPaul Wicking2018-07-101-9/+9
| | | | | | | | | | | | | * Update description as the behavior changed with 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68. * Remove implementation details from description (the specific date), as it may be subject to change. * Simplify a needlessly complicated explanation. Task-number: QTBUG-68516 Change-Id: Ibc25a9923d8c996c47927964cd69b5bd7bbe0240 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Item, QQuickItem: document which properties are used in map functionsMitch Curtis2018-07-102-0/+34
| | | | | Change-Id: Idf3aecf88319a2967ca51985003be32c7e7ef42a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QML Debugger: Check in time if values can be saved to QDataStreamUlf Hermann2018-07-101-9/+34
| | | | | | | | | If you feed something non-saveable to operator<<() the application will crash. Task-number: QTBUG-69316 Change-Id: I9fe5f83a9eb49e5bde3002c0a5dda4206470c644 Reviewed-by: hjk <hjk@qt.io>
* Doc: add section about type safetyMitch Curtis2018-07-101-0/+30
| | | | | Change-Id: I6ae5be8480ff817651c66a1617dceeefb96e5712 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix items in layouts not being rendered when layers are usedMitch Curtis2018-07-091-0/+3
| | | | | | | | | | | | | | | | 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>
* Doc: clarify and trim down the list in "Using Qt Quick Layouts"Mitch Curtis2018-07-091-6/+5
| | | | | | | | | - Clarify that anchors are fine for layouts that are not children of a layout. - Remove redundant list item. Change-Id: I187875ff3970620a6089716c5d9f41cc80997b07 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: replace "KiSS" section with Coding ConventionsMitch Curtis2018-07-061-6/+5
| | | | | | | | | | The section currently doesn't have any content, and as such, it doesn't provide much value. The coding conventions link in the related information sub-section is useful information to have, however, so we should keep that. Change-Id: Idc62b41d098528898cc8d65bfaf73879caa14b86 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't leak components in QQuickLoaderColin Ogilvie2018-07-051-2/+6
| | | | | | | | | | | 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>
* Doc: add a section that demonstrates various contentX/contentY statesMitch Curtis2018-07-0411-1/+26
| | | | | | | This makes it easier to visualize how the properties work. Change-Id: I04cb1a99a1f831e5c892cb27e4a0cd127fe450e0 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Mark the \snippet statements with a .pro fileVenugopal Shivashankar2018-07-022-0/+4
| | | | | | | | | Conditionally excluding such statements is required to avoid irrelevant content in documentation in some cases. Change-Id: If6751608dc438de6f7cc0376ffc36f8d994afba6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update plugins.qmltypes for WindowMarco Benelli2018-07-021-1/+1
| | | | | | Task-number: QTCREATORBUG-20696 Change-Id: Id67a53dd7dd4ed841228cccf16876d2be446ceab Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Doc: clarify behavior of QQuickItem's constructorMitch Curtis2018-07-021-0/+3
| | | | | | | | It uses the parent argument as both a visual parent and a QObject parent. Change-Id: Ib6c645c072462501c77f27085cba7538703c5966 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Fix broken linksVenugopal Shivashankar2018-06-282-2/+2
| | | | | | Change-Id: I3c09f8172fd79f3517b338e2d097bdbd88f325d6 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Show error message when type qmlRegisterType and friends failErik Verbruggen2018-06-263-21/+48
| | | | | | | | | 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>
* Build without the draganddrop featureAndy Shaw2018-06-252-3/+2
| | | | | Change-Id: I5e3a3ebd36d49fdf649eec5a3fb0a8fdb048ce0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Improve shared javascript resources phrasingPaul Wicking2018-06-251-9/+18
| | | | | | | | | | | Make the text less ambiguous. Reformat comments in code examples, as they mess up formatting in rendered content. Task-number: QTBUG-56028 Change-Id: I296839e4e102d25d1a943a5766f37ba5521bdb81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QQuickPathViewPrivate: fix heap-use-after-freeMitch Curtis2018-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Move literal codeblocks to snippet filesVenugopal Shivashankar2018-06-226-12/+116
| | | | | Change-Id: Iff45ea6cf414717fd1cb0a194eef390a9f153838 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Move the code snippets to a separate snippet fileVenugopal Shivashankar2018-06-225-21/+220
| | | | | Change-Id: I17671563f2beebe16ae1d08552854eaf44ae43ee Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* PacketProtocol: Explicitly transmit packet sizes in little endianUlf Hermann2018-06-221-5/+15
| | | | | | | | | So far the protocol would fail if the endpoints have different endianness. Task-number: QTBUG-68721 Change-Id: Ib53894b1e2f3eecf40160bb7bb9cfaa4beb2c045 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Correct QML type for FolderListModel.folderPaul Wicking2018-06-211-4/+4
| | | | | | Task-number: QTBUG-68940 Change-Id: I439ec9b6253815f41e405a0d9f79ff69eb75c98e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix crash in binding setup during async load from a LoaderErik Verbruggen2018-06-211-1/+4
| | | | | | | | | | | | | | | Change 91ac4a8d099d10fdfd5aa631da02727b7917d85f removed the source location from QQmlBindingFunction, because it can be retrieved from the QV4::Function in the QV4::CppStackFrame. However, if a binding is initialized as part of an asynchronous load from a Loader component, there might not be a valid function pointer in that frame. In this specific case, we fall back to the source location of the binding function. Task-number: QTBUG-68738 Change-Id: I2d3f17e4cb82be1e70a54cb66f9cf9c17f541f95 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Script::parse(): improve "function expressions as statement" error msgMitch Curtis2018-06-201-3/+4
| | | | | Change-Id: I3c54c90bfa48d2f6ba78b898413133e49b66c208 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix transitive includeUlf Hermann2018-06-201-0/+2
| | | | | | | | qsgtexturefilehandler_p.h is included through other headers that depend on QT_CONFIG(opengl). Change-Id: Ic87482289332cb1a0215ca74362207f9941239d7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* revert change 353164263c55825a0ec72d30128c50560c626334Lars Knoll2018-06-194-18/+3
| | | | | | | | | | | 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>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-19112-173/+173
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Flickable: fix another possible cause for out-of-sync moving flagsNils Jeisecke2018-06-191-4/+2
| | | | | | | | | | | | | | | | | | In addition to d868bb4f3e4b0424fd4a2989ff1c82692b0f014c this removes the check for scrollingPhase in movementEnding. If movementEnding is invoked by some codepath other than timerEvent (e.g. setContentY) and scrollingPhase is true this will again prevent any further invocation of movementStarting from within the drag method (see d868bb4). As this check was introduced together with the movementEnding timer (QTBUG-63026) and scrollingPhase is now checked inside the timerEvent there should be no need for the check in movementEnding. Task-number: QTBUG-67460 Change-Id: I88ad6e3ee56b88a66bb61798b8876324f4842f1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Tooling: Fix integer range checksUlf Hermann2018-06-062-10/+5
| | | | | | | | | | | | | | | | | The packet protocol should check if the number of bytes to be read is positive. Also, a Q_ASSERT on the return value of read() is too brutal. The device can have failed for any number of reasons and we don't want to crash the application because of that. Finally, the number of bytes to be read includes the bytes read to determine the number. Make that clearer by subtracting the actual count, not sizeof(qint32). The check in QQmlProfilerTypedEvent is supposed to happen before we cast the number to the more restrictive type. Furthermore, if subtype doesn't fit the range constraint, we don't have to do anything at all as the default rangeType is already set before. Change-Id: I48c8c47e4207abae6e718eea97815d43e7f9d833 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>