aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* declarative: fix resource initialization for namespaced buildsTim Blechmann2019-02-231-1/+8
| | | | | | | | | `Q_INIT_RESOURCE` cannot be used from within a Qt namespace. so we move the `Q_INIT_RESOURCE` call to static function defined on the global namespace Change-Id: I9eed7699e969369f861b95cdf3f7376ade73c1b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Software Adaptation: Invalidate on dpr changeMorten Johan Sørvig2019-06-174-6/+9
| | | | | | | | | We need to repaint everything on devicePixelRatio change, like we do on size change. Task-number: QTBUG-66810 Change-Id: I6b2c2ae92335a0aca731a4b0e7621cf7d08881e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12.4' into 5.12"Qt Forward Merge Bot2019-06-172-1/+91
|\
| * Merge remote-tracking branch 'origin/5.12.4' into 5.12Qt Forward Merge Bot2019-06-172-1/+91
|/| | | | | | | Change-Id: I98c22efa5292fa34d8055928e6b2d85fec8023b3
| * Add changes file for Qt 5.12.4v5.12.4Antti Kokko2019-05-281-0/+90
| | | | | | | | | | | | Change-Id: I6980ffaed4da941fbcd56af36bba7e5abf3dd878 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Bump versionFrederik Gladhorn2019-05-231-1/+1
| | | | | | | | Change-Id: I0810ede89313a6ee3ee31a352fda620835dfb055
* | Fix graphical artifacts after changing only textureAllan Sandfeld Jensen2019-06-132-0/+5
| | | | | | | | | | | | | | | | If the size of the texture changes, but subrect stays the same, the geometry changed and is now dirty. Change-Id: I5a4de88fd3f788a686fb2186185da2a0a3faad82 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Avoid number conversion issueLiang Qi2019-06-131-1/+2
| | | | | | | | | | Change-Id: Ia118e5885886605f7364d15d30ac67fdb01a5562 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add simple DelegateChooser example to documentationMichael Brasser2019-06-111-1/+35
| | | | | | | | | | | | Task-number: QTBUG-73964 Change-Id: Ic789839de12e046cc1d8fced75ffa0c93960c165 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | JIT: Don't store accumulator on getTemplateLiteralUlf Hermann2019-06-122-1/+18
| | | | | | | | | | | | | | | | | | We don't use the accumulator in that method. It could contain any random value. Fixes: QTBUG-75642 Change-Id: I41f958c1174cce76d0d77e14d5617d441aaf1e11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Allow destroying QJSValues from other threadsUlf Hermann2019-06-114-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariants are commonly passed around between threads and QVariants can wrap QJSValues. Therefore we need to allow this. The persistent value is freed immediately if we're still in the same thread. Otherwise a message is passed to the QJSEngine that owns it. If there is no QJSEngine we assume that we can free the value immediately. As such a thing can only happen via private API we can make sure this assumption holds. Fixes: QTBUG-75939 Change-Id: I14c09fd5d6ef7ba689f66656f2bcbb5c88bacf89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix use after free crash in QQmlDelegateModelNils Jeisecke2019-06-061-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When iterating over the cache in QQmlDelegateModel::_q_itemsInserted(), _q_itemsRemoved, _q_itemsMoved, _q_modelReset() and _q_itemsMoved, updating some of the item's modelIndex can trigger layout change in the view, which might in turn remove a QQmlDelegateModelItem from the cache, causing us to dereference an already deleted pointer. To prevent a crash, we always check whether the item is still valid in the original cache and skip it if it has been removed in the meanwhile. This fix is similar to 5df747fc but reduces runtime impact by performing the lookup only when d->m_cache has detached from the loop's copy. Fixes: QTBUG-76254 Change-Id: I9d7e0118e64e9ec7d8efae04e6ae319804f31981 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Avoid number conversion issueUlf Hermann2019-06-111-2/+3
| | | | | | | | | | | | | | | | Change-Id: Ia3f9bde43719859104759033283e697be72f7f53 Fixes: QTBUG-76286 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Avoid assertion when having a ShaderEffect as a delegateJan Arve Sæther2019-05-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion occurred when it initially tried to create an item from the delegate because it needed to show the contents of the first item when the combobox was collapsed. So, in order to do that ComboBox would create an object from the delegate by calling delegateModel->object(). Since the ShaderEffect was not ready to be constructed yet (it didn't have a window, see QQuickOpenGLShaderEffect::maybeUpdateShaders() ) it would call polish on itself in order to try later. Shortly after, it called delegateModel->release(). This didn't delete the object immediately (it called deleteLater() on the object), but it removed the engine and context it was associated with). However, this left it in the list of QQuickWindowPrivate::itemsToPolish. Due to this, QQuickWindow would call updatePolish on it shortly after (as a response to an expose event in our case). But the ShaderEffect was still not associated with an engine, so it would ultimately assert with no engine. The fix is to simply check if the ShaderEffect has an engine, and return early if that happens. Then when the dropdown opens, the ShaderEffect will get a polish() because of QQuickItemPrivate::recursiveRefFromEffectItem(), and it will have both an engine and a window and will properly initialize its shaders. Fixes: QTBUG-67343 Change-Id: Ib8ceb92d0fafb9b958407a50db5daa7b45e1d82a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: Remove superfluous double quotes in code snippetsPaul Wicking2019-06-042-3/+3
| | | | | | | | | | | | Fixes: QTBUG-75957 Change-Id: I2c9c70461a828978d1413b8cbdb407663b4b7493 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QML Preview: Fix test to check absolute zoom factorsUlf Hermann2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | The zoom factors passed to the preview service are interpreted as absolute values, not as relative to the base zoom factor. The test would fail if the base zoom factor was != 1. Change-Id: If66d8c79dea91e4013e1ab7f790fa308ac87c934 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix QQuickPathView autotest: update expected warning messagesEirik Aavitsland2019-06-031-4/+4
| | | | | | | | | | | | | | | | The wording of the warnings were changed in qtbase. Fixes: QTBUG-76152 Change-Id: Iae0dfbcbb699b8abff92b5923b0a5627591043c8 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Fix for loading translations automatically from resourcesTasuku Suzuki2019-06-017-3/+58
| | | | | | | | | | | | | | | | When qml file is in resources, translations under i18n was not loaded Task-number: QTBUG-76085 Change-Id: I75315ceb6a1e6ab10309634a3c445a82476d525c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Parser: Accept templated readonly propertiesUlf Hermann2019-05-312-0/+55
| | | | | | | | | | | | Change-Id: I37d313e3156a44eb4487b1be007aa93ace18d882 Fixes: QTBUG-76018 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQuickTextControl: Fix Qt::ImAbsolutePosition queryVova Mshanetskiy2019-05-241-1/+1
| | | | | | | | | | | | | | | | | | Qt::ImAbsolutePosition is documented to return cursor position, not anchor position. That's also what QQuickTextInput and QWidgetTextControl return. Change-Id: I91f9343f5f33c9d43875dbad515bfda77c13058d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Doc: Fix incorrect snippet in Repeater QML type documentationTopi Reinio2019-01-231-4/+5
| | | | | | | | | | | | Task-number: QTBUG-73199 Change-Id: I83f0754577b382b26f484bfdc4f6b3a2a921b5f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | In qmlUnregisterType() also remove the type from undeletableTypesUlf Hermann2019-05-291-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-76074 Change-Id: I7f5ca6af0955524f9a417811c2e9f960c2b3efb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add a workaround for ia64 to move Value bits 63-61 to 49-47 for pointersJason Duerstock2019-05-301-0/+17
| | | | | | | | | | | | Task-number: QTBUG-56264 Change-Id: Ifdede70d95f5846e160772c43d22bc2a4123959b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QQuickWidget: fix missing update on show event for software rendererKirill Burtsev2019-05-282-5/+7
|/ | | | | | | | | | The triggerUpdate call was incorrectly removed by merge 42f485231c Fixes: QTBUG-68566 Change-Id: Ibf37d88315d3ef9879e6cb9728a1c4ef4655c72b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Don't add local for anonymous function's "name"Ulf Hermann2019-05-214-12/+18
| | | | | | | | | | | | Instead, populate their "name" property directly from the surrounding object pattern if applicable, without adding locals. This fixes some ecmascript tests where functions were assigned to the key "eval" in an object. The JS engine then rejected that because you shouldn't use eval in strict mode. That should be close enough to test for regressions. Fixes: QTBUG-75880 Change-Id: Iacc45a3f7b0eb90cddc6ecf6d2bada616d2cf355 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc - minor cleanupKavindra Palaraja2019-05-211-307/+281
| | | | | | | | | | | | * Small fixes to improve readability * Fixed some typos * Updated the link to an old-ish MSDN article * Used a list instead of a long paragraph in the introduction area * Swapped a long list for a table for environment variables Change-Id: Id7eeee5c5b24f96e4577212a385cfa766e809d1f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix lookups of properties in QML singletonsSimon Hausmann2019-05-218-11/+110
| | | | | | | | | | | | An unqualified name that points to a QML singleton will evaluate to a QQmlTypeWrapper JS object. A member lookup in such an object is not guaranteed to always produce the same property. The property cache check may protect us from that, but we must still retrieve the QObject singleton for every lookup. Task-number: QTBUG-75896 Change-Id: Ibd9bac6e5c2047f838758811790b299ace636446 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix leaking scene graph rendering contextsSimon Hausmann2019-03-152-2/+11
| | | | | | | | | | | | | | | | When using the threaded render loop, the rendering thread assumes ownership of the rendering context. If the rendering thread is never started, that context is leaked. This happens in tests sometimes when we create and destroy a window without waiting for exposure. So this patch maintains the ownership in the render loop for created contexts until the per-window thread is started. Task-number: QTBUG-74348 Change-Id: Ifa397fab0833c82110ac4571c1e3790351c43afd Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Print a warning when encountering a non-relative URL in a qmldir fileUlf Hermann2019-05-161-3/+21
| | | | | | | | | | | This is not supported because supporting it would encourage users to create components that won't work on other systems or that will confuse qmlplugindump. QML still parses and loads those components, but you should really use relative paths. Task-number: QTBUG-48809 Change-Id: I9c81671cb5c4ea59b8c884ff24ad02e82047e9d6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Re-add cache for looking up attached properties objectsUlf Hermann2019-05-161-3/+6
| | | | | | | | | | | | c018df5b4075ae962966d4df7653d476dab02840 removed an optimization in qmlAttachedPropertiesObject. The attached properties ID was implicitly cached as it was static in a method templated by the type the attached properties were registered for. We don't actually need the ID for this, as we can also cache the function pointer. Fixes: QTBUG-75609 Change-Id: I15e728ce4bbb89062a84ee6f113b1188faa32b92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix assert in QSGBasicInternalImageNode::updateGeometryAllan Sandfeld Jensen2019-05-161-2/+2
| | | | | | | | Handle that hCells and vCells might be 0 with non-0 innerTarget. Fixes: QTBUG-73768 Change-Id: Id9dde2368e8cdfe40e5b287b16c0473ad7c12d69 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Do not synthesize a double click event if the event point moved too farJan Arve Sæther2019-05-153-16/+85
| | | | | | | | We need to respect QPlatformTheme::TouchDoubleTapDistance Fixes: QTBUG-75770 Change-Id: I2adc7097bb29cb93beb2609a8a806a666856a0c8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* TextEdit: use I-beam cursor by default, pointing cursor for linksShawn Rutledge2019-05-155-1/+77
| | | | | | | | | | But do not interfere with any custom cursor that user code sets: remember and restore it when the mouse is no longer hovering a link. Task-number: QTBUG-14769 Fixes: QTBUG-50482 Change-Id: Ia4633c22d0ad42d07203d4dc3e330b90a5f94a7c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Elaborate on the meaning of values held by basic typesSimon Hausmann2019-05-131-0/+4
| | | | | | | | | | Explicitly mention the copying semantics as well as how they are called in the JavaScript language. Task-number: QTBUG-75308 Change-Id: I82b8c6324133d3265b66325c6f67b19b344e0470 Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add test for cached getter lookupMichal Klocek2019-05-092-0/+31
| | | | | | Task-number: QTBUG-75335 Change-Id: I14480018f2429eb5ec744a50640642eee09ce3f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Document TapHandler.tapped and [single|double]Tapped eventPoint argumentShawn Rutledge2019-05-092-6/+85
| | | | | | | | | | | | | | | | | | Amends b8fd580cb3453b3850c36765c4b2537538d2f4f8 to add documentation. The eventPoint is important to get ephemeral state from the pointing device: which button was released (thus triggering the tap), which device it was, and where the release occurred. Users may expect to use the point property, but QQuickHandlerPoint::reset(QQuickEventPoint *) resets every property of the point at the same time, so the architecture currently does not allow for mixed state, i.e. having correct button state but still holding leftover position information. It may be surprising for users, but the changes to the point property are an atomic transaction that occurs before the signal. Task-number: QTBUG-61749 Task-number: QTBUG-64847 Change-Id: I33e0e232084beba8e10d8b02fa3bf85f36293358 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Don't overwrite states if role is assigned after a stateJan Arve Sæther2019-05-094-36/+82
| | | | | | | | | We therefore need to keep track of which states have been explicitly set or not in order to know which ones should get initialized with their defaults. Change-Id: I49fdae82288f04ea4f50d45735a93434ac02abec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Accessibility: Make sure StaticText is marked read-onlyFrederik Gladhorn2019-05-075-4/+85
| | | | | | | | | | Test more of the text properties. This is still very incomplete, but a small step forward. Also make sure that editable text reports the editable state. Fixes: QTBUG-75002 Change-Id: I9e43c980d8fa91671acb4e40e5d9162854884ee7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Avoid std::function in qqmlirbuilder.cppUlf Hermann2019-05-072-22/+18
| | | | | | | | | | | Some compilers seem to miscompile this construction. Furthermore, it doesn't really add to the readability of the code. Inline the code in question at the only place it's used and avoid most of the const_cast by adding a non-const accessor to CompiledData::Unit. Fixes: QTBUG-75392 Change-Id: I015317f28a92817d08d616cc35956745758d7847 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Q_TRACE calls to QtQml for QML profiler trace pointsMilian Wolff2019-05-054-7/+36
| | | | | | | | | | | | | | | | | | This adds tracepoints for LTTng/ETW at the positions that are also used by the QML profiler within QtQml. I.e. with the tracepoints here, you'll see which QML function is being executed which is already quite helpful. This will allow us to bridge the gap between C++ and QML when tracing with LTTng/ETW. Additionally, you'll also be able to see kernel tracepoints which bridges another gap. Combined, this approach can give much deeper insights into what the (embedded) system is doing compared to just looking at the QML profiler alone. Change-Id: Ia8f71bf6d44b7f51c3c5aaa38f032675604aeca6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* Add .qmake.stash to .gitignoreMitch Curtis2019-05-031-0/+1
| | | | | Change-Id: I9465c71e870332c275ac7d2476096b348af33b99 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Improve Context2D's line dash-related documentationMitch Curtis2019-05-031-5/+7
| | | | | | | Fix spelling errors, punctuation, and links. Change-Id: I79154d0da6acf403903f102655d5dcb64240b137 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickTextControl: Emit cursorPositionChanged() when handling IM eventVova Mshanetskiy2019-05-021-0/+3
| | | | | | | | | | | | | | | | QQuickTextControl and consequently QQuickTextEdit did not emit cursorPositionChanged() signal when cursor position was changed by a QInputMethodEvent with a QInputMethodEvent::Selection attribute. This is especially important on Android because QAndroidInputContext uses such events extensively to move the cursor and also relies on cursorPositionChanged() signal being emitted by the focus object. If the signal is not emitted, QAndroidInputContext does not notify the virtual keyboard about cursor position change which results in various glitches. Change-Id: I46bef6185463d11507b1b96435fdc056bbe951f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't wrap the attachedProperties function into a templateUlf Hermann2019-05-021-4/+1
| | | | | | | | | | | Otherwise it gets a separate address for each CU in which the template is instantiated. We want to use the address as key to the attached properties, though. Fixes: QTBUG-75385 Change-Id: Iaec82db116a032f7cb1d40670bb47fdf610664a2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Yarr: Reject quantifiers larger than 16MUlf Hermann2019-04-302-1/+13
| | | | | | | | | Nobody needs those and we run into integer overflows later on if we accept them. Fixes: QTBUG-74048 Change-Id: Ib8ccd05e4bd6f662c38fbe95bf1350f81982e1b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Skip QtQuickCompiler resource extraction when using lupdateSimon Hausmann2019-04-291-1/+1
| | | | | | | | | Otherwise lupdate won't see a .qrc file that contains the .qml/.js files. Change-Id: I8b5fd79299adcde338d68fb6ca39ab03c9300286 Fixes: QTBUG-75501 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Skip block context within call contexts when searching for parametersUlf Hermann2019-04-292-5/+38
| | | | | | | | | | | Only the call context contains the signal parameters. However, there can be any number of nested block contexts in a function. This manifests itself when the function needs an execution context. The simplest way to trigger this is attaching a debugger. Fixes: QTBUG-75393 Change-Id: Iabdc06a9fe7bf88204525d6940b626575fee1579 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix coverity warningSimon Hausmann2019-04-291-2/+3
| | | | | | | | | | Commit bc00353cffbfe0f74b602a16452f2e7bcd588152 accidentally removed the assert that expressed how objectForId will always succeed with the alias target. That caused coverity to complain that objectAt() may be called with a negative (then array) index. Change-Id: I8651e0826c92e41ab00bf8a44f1abfd1cbfb0e06 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix maximum call stack depth for clang ASAN buildsSimon Hausmann2019-04-291-1/+1
| | | | | | | | | For clang we need to use has_feature to detect the presence of an ASAN build. Amends commit eb363c3a0b7f96015d7b8f2551dbeaa86f5acf16 Task-number: QTBUG-75410 Change-Id: I2adb69deb07f8c6b77be8c2f23751fd0a2bbdb95 Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* PinchHandler: change qCInfo to qCDebugShawn Rutledge2019-04-291-2/+2
| | | | | | | | qCInfo is enabled by default, so this turns into noise for users. Task-number: QTBUG-70083 Change-Id: Ie7f50d393055846bd2f9935c2bbe72830b1b24a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>