aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Remove shadereffect dependency from shapesKarim Pinter2020-01-223-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses wavefrontmesh only if the shadereffect feature is there. Path doesn't need to depend on shadereffect feature only on gui module. The shape also missed a sgtexture header. Fixes: QTBUG-81296 Change-Id: I78425ef8a09226b99e9b9f6010dda9dac9009fe5 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Initialize boolean m_hasItemChangeListenersDavid Edmundson2020-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Found by a valgrind warning of an unintialized jump. Change-Id: I24279c97042e1971eaff35c3363fc1250e5c6c6e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix printing of garbled UTF-8 characters from QML verify() statementsDimitrios Apostolou2020-01-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Messages that contain QtPositioning.coordinate are including the degree unicode symbol U+00B0. These were printed as garbage from QML tests that use the verify() function. This was caused by the message argument being encoded using toLatin1() on its conversion to const char *. This caused both garbled text and invalid XML output in the test runs, which in turn was causing coin's agent to fail while deserialising the test XML log. This was fixed by changing from toLatin1() to toUtf8(). Since testlib is receiving plain const char * arguments for the "description" argument, it was deemed correct to standardize on UTF-8 as the proper encoding for it, to avoid losing any information (QTBUG-81474). When it's output to the console it can be re-encoded depending on the system's locale, of course. Task-number: QTBUG-81474 Fixes: QTBUG-80527 Change-Id: I0f1fdb7d414d9dfd30d4638b00088c9502c339bd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Text and TextEdit: document MarkdownText formatShawn Rutledge2020-01-175-62/+209
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81306 Change-Id: I8ee50727f4e75eee8c0997f17193d8c99e855551 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Fix documented types for DelegateChoice propertiesMichael Brasser2020-01-151-4/+4
| | | | | | | | | | | | | | | Change-Id: I0a5907354e7a983e7c7ad36aa9d86c3bf87d264e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | qml: Fix options that need to be set before QApplication instantiationFriedemann Kleint2020-01-151-25/+26
| |/ |/| | | | | | | | | | | | | | | | | | | Move the Open GL and scaling options setting QCoreApplication attributes into the helper getAppFlags() which already handles the application type. Change getAppFlags() to not modify argv which is not necessary since the parser will accept the options. Change-Id: Ib2f94f832e6551a938ff0e9bfe27649850d38d1e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Blacklist tst_TouchMouse::touchButtonOnFlickable() on mingwUlf Hermann2020-01-151-0/+4
| | | | | | | | | | | | | | Task-number: QTBUG-74517 Change-Id: I9733fe53f65d107c830b2fe47a475b2159a70540 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QQuickItemView: fix crash when changing modelWang Chuan2020-01-154-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When visible items become invisible, ListView will try to cache them and redisplay these items if necessary. However, we can't cache items when changing to a new model, since the old one will be deleted later Fix by adding a flag to let ListView know we are clearing items and prevent cache unnecessary items Fixes: QTBUG-80203 Change-Id: I50dcd3f0586c93496b143bdad0e59751360501a8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | fix for out-of-screen preview windowsUlf Hermann2020-01-142-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | The problem was that the screen position was changed by the user and it did not check this before it set it to that saved position. Also added a warning if it is still happening - which is not expected anymore. Fixes: QTBUG-79323 Change-Id: Id3d945626461016d51fcad9f8882c3d39544a985 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Register PointerScrollEvent and document the WheelHandler.wheel signalShawn Rutledge2020-01-133-4/+142
| | | | | | | | | | | | | | | | | | | | | | Writing an onWheel() handler script was working and mentioned briefly in docs; but PointerScrollEvent and the signal were not documented. Also fixed the type of QtQuick::WheelEvent::inverted: bool not int. Fixes: QTBUG-81302 Change-Id: I31342955c42e20ff52460a1b7ee95da325e38af6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Remove unneeded/unused signalAlbert Astals Cid2020-01-132-2/+0
| | | | | | | | | | | | | | | | | | | | QQuickMultiPointHandler inherits from QQuickPointerDeviceHandler, which inherits from QQuickPointerHandler that already has a marginChanged signal. It's the only place that signal gets actually emitted from. Amends da722fb448f06cf43780e6f857a1ccd9f07176d6 Change-Id: I8ba3129ed69903d6f3cff56401c8a18580af0375 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Blacklist touchAndDragHandlerOnFlickable() on OpenSuse 15.0Ulf Hermann2020-01-101-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-81290 Change-Id: I58f64f5eabdb72f2f01bf72e988941521a89d331 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QQuickItemView: Fix iteration/deletion logicUlf Hermann2020-01-101-12/+16
| | | | | | | | | | | | | | | | If a QVector has been modified from the outside, all its iterators are invalid. Therefore, we need to do index-based iteration here. Change-Id: I02b850daf6aadd8f8a81cc93b0d295e1170d7dd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | On QQmlEngine destruction drop singletons before type loaderUlf Hermann2020-01-103-2/+39
| | | | | | | | | | | | | | | | The singleton destruction can trigger additional types to be loaded. Fixes: QTBUG-80840 Change-Id: Ifa406b2a1cfd3b9e9b36e8005dfc0808eebf15cf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | SequenceObject: Better message when trying to write readonly containerUlf Hermann2020-01-091-1/+3
| | | | | | | | | | | | | | Before it would only output "Type Error". Change-Id: Ibd3a85f327c3ce8c58295c7e900c516b77c85a2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Fix unused variable warning on big-endianShawn Rutledge2020-01-081-0/+2
|/ | | | | | | Fatal because of -Werror. Change-Id: I535848be1c733c0718779c8a4c8c93ed3873cc88 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* V4: Avoid integer overflow on typed array length checkUlf Hermann2020-01-082-2/+41
| | | | | Change-Id: I370b4c4bd0d7962878849ca7c5edef6cb36eca25 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Check stack limit in FunctionPrototype::method_apply()Ulf Hermann2020-01-082-1/+20
| | | | | | | | | We could just crash there, assuming unlimited memory, but as this particular place seems to be a very attractive target for various mischief, let's just plug it. Change-Id: I3b0369ceb34dafd12ce8dc1f189fc5f9ee82c169 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Don't crash when iterating invalid Proxy objectsUlf Hermann2020-01-083-2/+17
| | | | | | Fixes: QTBUG-81109 Change-Id: I97f37c68d33f414d7bffa9b66e0aaed93370dc68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Don't crash when sorting arrays with non-stringifyable entriesUlf Hermann2020-01-082-0/+18
| | | | | | Fixes: QTBUG-81108 Change-Id: I7e121776a2416b5338c4c1309ec7cc31c703ad28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix unused variable warningShawn Rutledge2020-01-071-2/+1
| | | | | | | This was fatal because of -Werror. Change-Id: Ibe06f77d4728268af3f099554f7151bdaf9ac26b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Stabilize QQuickItemParticleLouis du Verdier2020-01-074-46/+134
| | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two crashes and a memory leak in QQuickItemParticle. The first crash was caused by the list m_loadables that kept pointers on QQuickParticleData, that could in the meantime become dangling pointers if the associated particle expired or got deleted by a call to the reset() method of the particle system. Its role was to keep a list of particles that did not have a delegate instantiated yet, in order to create them in the tick() method. This list is removed and the list of particles to handle is directly deduced in the tick() method. The second crash was caused by the list m_deletables that could in some situations (generally due to a reset()) contain multiple times the same delegate, and therefore cause a double delete in processDeletables(). This list is changed to a set to avoid this situation with a minimum impact on the rest of the code. The memory leak was caused by the m_managed list of delegates that was not freed when QQuickItemParticle gets deleted. Task-number: QTBUG-71193 Change-Id: I6fe30ee59a9a0bb90c14c62c7a48a50f465a9e0c Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
* QV4: Support printing arrays with circular referencesFabian Kosmale2020-01-072-4/+22
| | | | | | Fixes: QTBUG-81105 Change-Id: Iaf0597cea3a5572f020c5f87a843774f33cc01fd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4: Array.includes: Support large arraysFabian Kosmale2020-01-072-1/+14
| | | | | | | | | Creating new ScopedValues in the loop was quite wasteful, and would trigger a crash. We now simply reuse the ScopedValue. Fixes: QTBUG-81104 Change-Id: Ie1efd144886861a21c8f6827d7fd23699a1e0dcc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4: Check recursion limit in toStringFabian Kosmale2020-01-072-0/+23
| | | | | Change-Id: I18b7a4e00150f6c47c991a5164901159b7f946b9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4MM: Fix crash caused by MarkStack overflowFabian Kosmale2020-01-074-1/+57
| | | | | | | | | | | | | | MemoryManager::collectFromJSStack did push to the mark stack without checking if there is actually still space available. To fix this, we now drain the stack once we hit the limit. The test case is a slightly modified version compared to the reported one, removing one loop. This was required as our regular expression does not throw an exception when there are too many capture groups. However, to trigger the bug, looping was not actually necessary. Change-Id: I4d00865f25a989c380f4f5b221f4068c80b71d2b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: Catch error when compiling broken RegExpsUlf Hermann2020-01-072-2/+19
| | | | | | | Otherwise we try to assign an invalid RegExp object, which crashes. Change-Id: I85478406524a2a9d7542758caaa1b42b4090bb93 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Fix sorting of sparse arraysUlf Hermann2020-01-062-1/+22
| | | | | | | setArrayData() needs to handle a nullptr argument. Change-Id: I1ea05d9db9beb1fede6d3c068cfcf700702e8aa6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid oob access on Array.concatUlf Hermann2020-01-062-1/+22
| | | | | | | | | | As we have already determined that we're past the end of the allocated space on the source object by checking os->values.alloc, we should conclude that all the remaining values are undefined. Fixes: QTBUG-81037 Change-Id: I664f22b7eb37c26061e8a9e2f88bcf2a7b6e09f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Emit QQmlEngine::warnings when load failsFabian Kosmale2020-01-063-1/+22
| | | | | | | | | This uses the existing infrastructure for reporting QML errors, instead of simply using qWarning. Fixes: QTBUG-81093 Change-Id: Ie18656a57f28fa9dfe922936fd05b44ebe1281e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4::Engine: replace std::function with a function pointerFabian Kosmale2020-01-062-5/+5
| | | | | | | Turns out, we actually do not need to capture anything Change-Id: I6194b45a1e8053be079d25a6d81212fa226fd3ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QV4::ExecutionEngine: provide QNAM accessorFabian Kosmale2020-01-037-2/+57
| | | | | | | | | | | In XMLHttpRequest, we need to get the QNetworkAccessManager from the engine. However, if the request originates from a WorkerScript, there exists no qmlEngine. We therefore add a new indirection to access the QNAM, and set it up accordinly in registerWorkerScript. Fixes: QTBUG-81055 Change-Id: I8915202b6d6b7139c8386304b3d1d7a22a82045e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickWindow: make subFocusItem a QPointerFabian Kosmale2020-01-031-1/+1
| | | | | | | | | While running the fuzz tester, a crash was found related to the fact that the subFocusItem was already partially deleted. Task-number: QTBUG-34779 Change-Id: I62c48cf40baabc9f0a81074cc6408e9073459165 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix the build with -no-guiLiang Qi2020-01-021-0/+2
| | | | | | Task-number: QTBUG-74602 Change-Id: I08e8df96b10fbc0b58fbdae296c9d54de977e3f9 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QQmlAdaptorModel: Guard access to wrapped AIMUlf Hermann2020-01-021-32/+44
| | | | | | | | | | | | | | | | | | The QAbstractItemModel may be nullptr, in particular when it gets deleted from the outside. In some places we did check for that, via operator T* from QQmlGuard, in others we didn't. The checks were quite hard to read as "if (model)" first invokes a conversion operator on a base class and then implicitly converts the result to bool. Similarly adventurous, "if (*model)" invokes operator* on a base class and then converts the result to bool. Make all the checks explicit, and add new ones where they were missing. Also, as we already retrieve the AIM in order to check it for nullptr, re-use it for the actual operation. Task-number: QTBUG-80963 Change-Id: I3548e22e9d2bef485a1cd4acf70839eb8e599e62 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use the correct icon filename for QML Runtime on WindowsShawn Rutledge2020-01-011-1/+1
| | | | | | | | Amends d7b7fed0cddf6236db3cf1bfdf9cc1380929cf5c. Task-number: QTBUG-70826 Change-Id: If9b74d19c4fc2bbe3ae882b4767919c74f3a38af Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QV4Engine: support conversion of QJSValue to SequenceTypeFabian Kosmale2019-12-203-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | 8704c640946ac852668638e2980d3e2b78aa27ae introduced new conversions via sequentialIterableToJS. Due to that, QVariant properties which formerly stored e.g. std::vector<QObject*> now would store a QJSValue. Those would still claim to support a conversion to QVariantList, but -contrary to what our documentation says-, we were not able to do a conversion to QSequentialIterable. The default constructed QSequentialIterable would then crash when calling begin(), as that function pointer was null. This patch fixes this by adding the necessary support to convert a QJSValue containing an array. Non-array QJSValues will still return an "empty" QSequentialIterable. Note that this changes what happens when a QJSValue is converted to a QVariantList, as QVariantValueHelperInterface<QVariantList> will check first if there is a converter to QSequentialIterableImpl before attempting to call any directly installed converter to QVariantList. In order to not change the existing behavior, the QSequentialIterable returns the QVariant corresponding to the QJSValue at a given array position, intead of a QVariant containing the QJSValue. Fixes: QTBUG-80609 Change-Id: I8101229c0d2043b3f2d618ed035b279844802dd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix usage of qtquickcompiler.prf after lrelease.prfJoerg Bornemann2019-12-171-1/+2
| | | | | | | | | | | | | | | | | Consider a project that sets CONFIG += lrelease embed_translations qtquickcompiler qtquickcompiler.prf is loaded first and loads resources.prf. Then lrelease.prf is loaded and extends RESOURCES. The latter changes are never picked up, because resources.prf was already loaded which is recorded in QMAKE_INTERNAL_INCLUDED_FEATURES. Use the newly introduced qtFlattenResources function instead of fully loading resources.prf. Task-number: QTBUG-79672 Change-Id: I1894ede97b4d5de567971a1a8cef407460bba97d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Bump versionDaniel Smith2019-12-161-1/+1
| | | | Change-Id: I1cedc3f492e3f0b5852aa6091c73a30bdee73978
* Remove use of wrapper macros for feature detectionTor Arne Vestbø2019-12-162-2/+2
| | | | | Change-Id: Ic9cd7e4ff2c5d253879b0aeaa15dbc25cad82891 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-138-7/+411
|\ | | | | | | Change-Id: Ibd935bf31aa2bcb2e4051c865ab946daeeeecddb
| * QQuickPixmapCache: Don't dereference nullptrv5.14.0-rc2v5.14.0Fabian Kosmale2019-12-053-3/+31
| | | | | | | | | | | | | | | | | | | | Consistently check that job->data is not null before derefencing it. Fixes: QTBUG-80510 Fixes: QTBUG-79937 Change-Id: I894503ddd2254814463073cc12f8365641efc689 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QML: Resolve conflict in ImportSpecifier rulev5.14.0-rc1Ulf Hermann2019-11-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IdentifierReference could resolve to both ImpordBinding and IdentifierName, causing ambiguity in the grammar, and ultimately caused parse failues when parsing an import statement. This is now resolved by explicitly telling the parser to prefer shifting. This is a partial cherry-pick. Apparently the effect observed in the original change and fixed inline can also be triggered in different ways. (cherry-picked from commit 41bbf7e376d0e374dc7c4e2a5ed4157a1b880b4a) Fixes: QTBUG-80423 Change-Id: Iaec29c452b577312248a17cb48f005f4fc0bd8c4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Add changes file for Qt 5.14.0Antti Kokko2019-11-281-0/+372
| | | | | | | | | | | | Change-Id: I10bcc4794f8f09ae8c0042737b6da2e5b810d7af Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * mouseDrag(): ensure that intermediate moves are done for all dragsMitch Curtis2019-11-262-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code checking if the intermediate move distance was less than the drag threshold, but without accounting for negative distances. Since the negative distances were naturally less than the drag threshold, the intermediate distances were set to zero and the intermediate moves were never done. In practice, this means that mouseDrag() never did intermediate moves (i.e. what happens during a drag in real life) for drags that go from right to left or upwards. Task-number: QTBUG-80152 Change-Id: Ic27021f5ce5ba2937e95fb2dfb532bd2136f4205 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit fad8ef3e4133538e3785d7067c35c652bc894711) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Fix NativeRendering text on core profileEirik Aavitsland2019-11-263-3/+3
| | | | | | | | | | | | | | | | This is a continuation of af090d8, making sure the same dpr snapping is done in the core profile shaders. Change-Id: Iccd19a377968fb7bfbd49c3ef13b72284a48bab1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add binary compatibility files for qtdeclarative 5.14 branchMilla Pohjanheimo2019-12-134-0/+60209
| | | | | | | | | | | | | | BC files built against 5.14.0 added. Change-Id: I4904ad2bbe57ca5e0bef40b349dcceaee1803f74 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | rhi: Mark window as unused when neededLaszlo Agocs2019-12-111-0/+4
| | | | | | | | | | | | | | | | This is a bit more convoluted, but boils down to no-opengl + no-vulkan. Task-number: QTBUG-80692 Change-Id: I508116721ae8ea5013546f20ac89b67929305b52 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | qv4sequenceobject.cpp: Add "here be dragons" commentUlf Hermann2019-12-111-0/+16
| | | | | | | | | | | | | | | | No one should remove this at() before Qt6. Task-number: QTBUG-80535 Change-Id: I464c6f675dc68ad9762fcb594bb4d6ba6bdaf316 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Fix unused var in no-opengl buildsLaszlo Agocs2019-12-111-0/+2
| | | | | | | | | | | | Change-Id: I9c436f408562faaf74e2301ae93e25a0c4e9b22e Fixes: QTBUG-80692 Reviewed-by: Johan Helsing <johan.helsing@qt.io>