aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QmlCompiler: Make sure that properties are writable by defaultUlf Hermann2020-10-261-0/+1
| | | | | | | Amends commit 7feab1fb95317b924fe39c49dd9907ca3df61a40. Change-Id: I32e22b51501d9c98af74ac00506619cfe33f6b7c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Allow AOT compiled function to specify includesUlf Hermann2020-10-262-2/+15
| | | | | | | | This is necessary for include directives specific to the types being used. Change-Id: I34e0e5907d795714797fbb99a75b863cc41e9ad3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Add method to retrieve addressable scope from visitorUlf Hermann2020-10-261-0/+1
| | | | | | | Adressable scopes are the ones with an id. Change-Id: I4975248aa920f0d567b5b5ccc8ba18a2fdd91e13 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qml: Move more types into builtins.qmltypesMaximilian Goldstein2020-10-265-10/+39
| | | | | Change-Id: Id2795f16af99870f32266f81228890a9d12c86a7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-232-2/+1
| | | | | | Task-number: QTBUG-87037 Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQmlEngine: Add method to explicitly capture a propertyUlf Hermann2020-10-233-9/+22
| | | | | | | | | | Also, use that method to capture the uiLanguage notify signal. Previously the wrong signal was captured. The test still happened to pass because we manually re-evaluated all bindings when the uiLanguage property changed. Add a test which avoid that. Change-Id: I3961b60b365a8705930936f20881421bd4ceffe5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmlvaluetypes: Add a few missing toString methodsMaximilian Goldstein2020-10-232-0/+19
| | | | | | | | Implements toString for QQmlPointValueType, QQmlRectValueType and QQmlSizeValueType. Change-Id: Ia8dad072453caea24f6f351cf3da9d0ed085b2a1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* TableView: ensure we rebuild the sync view, even when flicking on a sync ↵Richard Moe Gustavsen2020-10-232-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | view child When two table views are connect through the syncView property, both views will flick when you flick on either of them. This also means that if you fast-flick more than a page on the sync view child, the sync view needs to rebuild, like if you did the fast-flick directly on the sync view. Because we updated the sync view's viewportRect too soon while fast-flicking on the the sync child, we didn't detect that it was a fast-flick, and that a rebuild was needed. The result is that you could sometimes end up with the views getting out-of-sync. This patch will allow TableView to only move the viewport without updating the internal viewportRect while flicking. The viewportRect will instead be sync-ed at a later point, like we do when you flick on the sync view directly. This will ensure that we rebuild if needed, also while fast-flicking on the child view. Task-number: QTBUG-87821 Pick-to: 5.15 Change-Id: Ifc74473eb43406acaa8e24880066fb4ca89d3a4e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qmlcachegen: Move functions to compile QML/JS files to QmlCompilerUlf Hermann2020-10-234-0/+562
| | | | | | | | We need to re-use them. Also, provide a way to insert AOT compiled functions into the C++ code. Change-Id: I7b0d13cb307e8f979745f096a9614f087d135f68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlcachegen: Add empty AOT built functions to the loaderUlf Hermann2020-10-231-1/+2
| | | | | | | | This enables us to use the same generateloader.cpp for qmlcachegen and any replacement that actually produces AOT compiled functions. Change-Id: I12fe81236e4ef16a627729c644d54b6c171b3860 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move generateloader.cpp to QmlCompilerUlf Hermann2020-10-234-0/+294
| | | | | | | We need to be able to generate the loader code from multiple places. Change-Id: I9e04fd3583b535bc5f7d5fb293cb61309c1e199a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix logic to select AOT compiled functionUlf Hermann2020-10-231-4/+10
| | | | | | | | | We only want the function if it's not a nullptr and if it matches the required index. Change-Id: I5695bfb950f66e5a7589b042c3313297c51533d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Fix documentation links to removed functionsVolker Hilsheimer2020-10-232-2/+2
| | | | | Change-Id: I01fe454c521d4d85118e5ebfdfe4e343978fe874 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Initialize members to shut up gccVolker Hilsheimer2020-10-231-0/+1
| | | | | | | | | | | | | | | | Possibly a compiler bug: In member function ‘virtual bool QmlIR::IRBuilder::visit(QQmlJS::AST::UiObjectBinding*)’: error: ‘<anonymous>.QSpecialIntegerBitfield<QLittleEndianStorageType<unsigned int>, 0, 20>::val’ is used uninitialized in this function [-Werror=uninitialized] UT i = S::fromSpecial(val); ~~~~~~~~~~~~~~^~~~~ This seems to be the only effective way of shutting up gcc. Change-Id: Ib72bdcafb7336e67cf22ef67c56c7c74421eb12d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix qdoc warning: document parameters correctlyVolker Hilsheimer2020-10-221-3/+3
| | | | | Change-Id: I04a2376908369df9cef5d1751797db39034668d3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QmlCompiler: Properly discern between inherited and own namesUlf Hermann2020-10-226-50/+64
| | | | | | | | | | | Previously, we would mix them up on importExportedNames(), which was also misnamed. Now we keep them in their proper place in the scope hierarchy, so that we can identify which scope a property came from. Exceptions are the qmllint-specific treatment of parent properties and Connections elements. Change-Id: I7c012388b16c83439d6f2de2e83fac0da4940d30 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlIR: Make sure that all objects receive a locationUlf Hermann2020-10-224-17/+41
| | | | | | | For grouped properties, this is the location of binding now. Change-Id: I7148ba92150e3569d47c382ef78794bfa3b75fce Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Make sure any import depends on the builtinsUlf Hermann2020-10-222-10/+18
| | | | | | | Otherwise types like "int" are not resolved. Change-Id: I35d0eb05e955822b082d2f6067d1e5b40c510cf1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Use size_t for qHashUlf Hermann2020-10-221-2/+2
| | | | | | | | It is expected to return an unsigned value. Change-Id: Id75c0887de7e9b0eeab378041598621c89507501 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* qmllint: Resolve aliases in nested objectsUlf Hermann2020-10-222-21/+30
| | | | | | | So far we've just ignored them. Change-Id: I2ca522ef825a341a3f4bf1c2a42fb0376180cdda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* TableView: ensure we update content size upon model changesRichard Moe Gustavsen2020-10-212-31/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tables of non-trivial sizes, we usually don't know what the content size will be unless we load all rows and columns, which we simply cannot do. Because of this, we have up till now chosen a strategy where we normally just calculate a predicted content size up-front, when we table is built, and afterwards just stick to that prediction. This strategy works for big tables that fills more than one size of the viewport, and if the number of rows and column in the model stays around the same. But for tables that start off smaller than the viewport, and later expands to grow out of it, it simply fails. And the failure is such that the tableview can get stuck, with no way way for the user to flick around to see the rest of the contents. An example is TreeView that might only show the root node at start-up, but as you start to expand the tree, it will quickly add more rows than what fits inside the viewport. And in that case, the contentHeight will be totally off, and in turn, make the scrollbar be based on wrong values, and sometimes not work at all (e.g if it has the flag Flickable::StopAtBounds). This patch will change the implementation so that we recalculate the content size whenever it should logially change. That is, if e.g the model add or remove rows and columns, or if you change spacing. This still doesn't mean that contentWidth/Height reports the correct size of the table, but at least it will be a better guestimate for smaller tables, and at the same time, work together with Flickable and ScrollBars. Pick-to: 5.15 Fixes: QTBUG-87680 Change-Id: Ie2d2e7c1f1519dc7a5d5269a6d25e34cf441b3fe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make QV4::CompiledData::Location hashableUlf Hermann2020-10-211-0/+8
| | | | | Change-Id: I0e1b84e3a7e656bb816dd2ff6a22b135db0de962 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickFlickable::filterPointerEvent(): remove handling of receiver==thisShawn Rutledge2020-10-211-7/+1
| | | | | | | | | | | Since the Q_ASSERT_X(receiver != this, ...) has been there for a long time, clearly it never happens in real life. It doesn't happen in any of our autotests either. So having dead code to handle it is just confusing. Amends d9d2277fb8e823af8977d6f3aa5cc7ee8213c26a Change-Id: I69714804e4967cc1a373af67bf4c9a4c169f5738 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qquickloader: Free memory of loaded components after source changeFabian Kosmale2020-10-211-0/+13
| | | | | | | | | | | | | Since we cannot be sure when the event loop that would usually handle deferred deletions will run the next time we have to delete these components immediately otherwise we might run out of memory. Fixes: QTBUG-86676 Pick-to: 5.15 5.12 Done-with: Maximilian Goldstein <max.goldstein@qt.io> Change-Id: I01d74f7eea442f8ba240dd66a4cedd6316fbeec2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Compile with Clang11Lars Knoll2020-10-211-2/+2
| | | | | Change-Id: I9f3a4a6b6c7a2fbfca0a572209f398a23c26b37b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickWindow: Change 0 to nullptr for removeAllv6.0.0-beta2Fabian Kosmale2020-10-211-1/+1
| | | | | | | | | | | | | | The change in qtbase which made removeAll had the unfortunate side effect that were deducing type int now (instead of converting 0 to the null pointer constant), which -after a few indirections- leads to 3365: src/quick/items/qquickwindow.cpp:3785:22: required from here /usr/include/c++/10/bits/predefined_ops.h:268:17: error: ↩ ISO C++ forbids comparison between pointer and integer [-fpermissive] 268 | { return *__it == _M_value; } | ~~~~~~^~~~~~~~~~~ Change-Id: I2ba7c561a2431a8a71f77068daef60d5ae62f17c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Adjust to QMetaObjectBuilder::MetaObjectFlags changeFabian Kosmale2020-10-215-6/+6
| | | | | Change-Id: I2f9b39fda6c25e57985a32864c85a50b7d6d0231 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmlcachegen: Move resourcefilter.cpp into QmlCompilerUlf Hermann2020-10-204-2/+237
| | | | | | | | For backwards compatibility, a replacement for qmlcachegen will need to provide the same functionality. Change-Id: I22664230ea636d384190122223d15819ebee930c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlJSImporter: Expose the imported objectsUlf Hermann2020-10-201-0/+1
| | | | | Change-Id: I1257d4efe1813d2b95a37d95a82c21c30fc15591 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlJSImporter: Pass the source location to the resultUlf Hermann2020-10-201-0/+1
| | | | | Change-Id: I8c52efc752fbeae4485d7cc2112d615707e2afd1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Cache builtin typesUlf Hermann2020-10-202-1/+6
| | | | | | | | If we import the builtin types multiple times from different places, we want them to match. Change-Id: I3f2f0ec0d72fb4e178ee69517ecafa8260ebc35e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Fix singleton declaration in qt6_target_qml_targetJoerg Bornemann2020-10-201-1/+1
| | | | | | | | The declaration is to be written without the square brackets. Fixes: QTBUG-87684 Change-Id: I8fb7fb1f9204cb56d2fa1e2c10ec585ff0e2b512 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Drop the metaobject revision from exportsUlf Hermann2020-10-193-22/+18
| | | | | | | | | Instead, output a warning if the revision doesn't match the version. We want to get rid of generic version/revision matching. To this end, add a way to retrieve the version from an export. Change-Id: Ie887103eba910f14e49faa684ac559cc72cab199 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Add hasMethod() and hasProperty() to QQmlJSScopeUlf Hermann2020-10-191-0/+2
| | | | | | Change-Id: I29e38054a5adcf398f63df7f367ed4bc24c09c75 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: mention that clipping can affect performance and link to pageMitch Curtis2020-10-191-0/+3
| | | | | | Pick-to: 5.15 5.12 Change-Id: I85e60dd5c8643a8e443a14250987b2b38c78dc08 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: Update sg rhi backend sectionLaszlo Agocs2020-10-191-5/+5
| | | | | | | | Use the now preferred GraphicsApi enum value (e.g. Vulkan instead of VulkanRhi). Drop a reference to the long gone QSG_RHI env.var. Change-Id: I233611b40186884a70e9680b3dfef7284b3e3c73 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Do grabs out of orderLaszlo Agocs2020-10-192-77/+79
| | | | | | | | | | | | | ...while extending the autotest to cover more complicated cases, such as grabbing again after show-hide and doing show-grab-hide-grab-show-grab. In fact some of these cases have not been working in Qt 5. Now the basic render loop is fixed up to support the all the combinations threaded does. Task-number: QTBUG-87399 Change-Id: Id01995bc3a2660b16cfb2f8bedc84becea0be1bb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Adjust to public API renaming in qtbaseAlexandru Croitor2020-10-181-1/+1
| | | | | | Task-number: QTBUG-86827 Change-Id: Ibeae878cbd7cc43031aeb13b2c480215c849f8bc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Adapt QMutexLocker to qtbase changeFabian Kosmale2020-10-182-2/+2
| | | | | Change-Id: Ica9561a42217f5a509a6e84e9e48036ec6348e48 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QmlCompiler: Read the "bindable" attribute from plugins.qmltypesUlf Hermann2020-10-163-43/+44
| | | | | | | | | And refactor QQmlJSMetaProperty to use setters rather than a gigantic constructor. Also, notice that we don't have to construct the same property twice just to update its type. Change-Id: Ia6c195fa7088f6ecdff868daae17d4284c1edb22 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Retrieve warnings from qmltypes parserUlf Hermann2020-10-161-0/+4
| | | | | Change-Id: I83292c9db42e39e52fbf20e92c036d789bbdb2d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add undefined to builtins.qmltypesUlf Hermann2020-10-161-2/+7
| | | | | Change-Id: Ie7c8a28fdc417c43a9f24061171b342447b15272 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typoes in builtins.qmltypesUlf Hermann2020-10-161-16/+16
| | | | | | | It's isReadonly, not isReadOnly. Change-Id: Ia4c372468447bd4f6c0ad21ba36a228052912220 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Mark some of the public APIs as TPAlexandru Croitor2020-10-161-1/+6
| | | | | | | | | | We don't have tests for them yet. The API surface is quite big. Some options might not make sense anymore. Task-number: QTBUG-86827 Change-Id: I4aebdb2cdfa716433681d32967ab32f1c171925c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Promote suffixless names in GraphicsApiLaszlo Agocs2020-10-162-12/+21
| | | | | | | From API review. Change-Id: I3cda6f4b4e5a2e33356e7af4f7720e0b019b546d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Have a depth buffer when doing the heavy offscreen readbackLaszlo Agocs2020-10-161-1/+8
| | | | | | | | | | | | | | The opaque pass will rely on it (by default at least). Not having a depth buffer will almost certainly lead to rendering errors, albeit silently since technically it's not an error not to have one. Just make sure there is one. The assumption is that the Z order problem mentioned in the comments in the referenced bug is caused by this. Task-number: QTBUG-87399 Change-Id: Ifbf5564848f17e7ce3498190d663c1ec693e86c9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QQmlJSScope: Add a way to retrieve a single method or propertyUlf Hermann2020-10-162-5/+8
| | | | | Change-Id: Icf8f2aae869176ed864dcdd3b4231e71043cb0bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: add operator!= to QDeferredPointerUlf Hermann2020-10-151-0/+10
| | | | | Change-Id: I2191660b731d85495d0e90152e0fe493553b7a2f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rely on default parameter in QUnifiedTimer::updateAnimationTimerVolker Hilsheimer2020-10-151-1/+1
| | | | | | | | Allows that parameter to be removed in qtbase. Change-Id: If409d91d0e3a542106790759b8916858eca546e4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: Group QSGTexture native interfacesTor Arne Vestbø2020-10-151-2/+13
| | | | | Change-Id: I1b305bf1b74e7e7a078d7bd4b1358d773f5d2580 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>