Commit Graph

20062 Commits

Author SHA1 Message Date
Ulf Hermann f263e6ac93 Fix logic to select AOT compiled function
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>
2020-10-23 13:31:03 +02:00
Volker Hilsheimer d79e660bd2 Fix documentation links to removed functions
Change-Id: I01fe454c521d4d85118e5ebfdfe4e343978fe874
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-23 13:27:34 +02:00
Volker Hilsheimer 076b65fa3d Initialize members to shut up gcc
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>
2020-10-23 13:27:34 +02:00
Laszlo Agocs fa9808bad0 Fix up shadereffect example docs
The screenshot has been out of date for years now. Update it
as well.

Change-Id: I2b9ae3b0c24b0de7f0cd8a2284d67023237f0944
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-10-23 07:51:59 +00:00
Shawn Rutledge 18ea028a81 Make tst_QQuickMultiPointTouchArea::inFlickable() more debuggable
It was all-white despite having two items that react to events, which
makes it hard to see what's failing when it fails.

Use loops rather than tedious repetitive hard-coded moves to improve
readability.

"ensure that mouse events do not fall through to the Flickable"
must include having the MPTA "eat" the mouse press.

Change-Id: Ibca14709afbd561f03a62d74d10e6cae94ab302e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-10-22 18:42:29 +02:00
Mitch Curtis 5a1ae2cf3b tst_qquickfolderlistmodel: fix error checking
QTest macros don't prevent further execution when used outside of the
test function, so the rest of these tests would still execute even if
checkNoErrors() found errors.

Change-Id: If80a5d73cbfa18d5009c84bf658f40684b99d8f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 16:36:36 +02:00
Volker Hilsheimer 08d9861b1a Fix qdoc warning: document parameters correctly
Change-Id: I04a2376908369df9cef5d1751797db39034668d3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-22 16:05:39 +02:00
Volker Hilsheimer 1270a88cb3 Fix compile warnings from tests
Use streaming operators for debug/warnings to avoid qsizehint/int
conflicts.
Don't ignore return values from [[no_discard]] functions.
Don't copy elements from containers that return references.
Remove unused variables.

Change-Id: I7a0bef94a5e828bd8facee0c625ec48c3d1f1bdb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 16:00:22 +02:00
Ulf Hermann 328759cdeb QmlCompiler: Properly discern between inherited and own names
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>
2020-10-22 13:11:49 +02:00
Ulf Hermann c0063f73e5 QmlIR: Make sure that all objects receive a location
For grouped properties, this is the location of binding now.

Change-Id: I7148ba92150e3569d47c382ef78794bfa3b75fce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 13:11:27 +02:00
Ulf Hermann ebef555f49 qmllint: fix typo
Change-Id: Ia661141095a865191945f41bad91429ef952e16c
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 13:11:18 +02:00
Ulf Hermann 1c20848692 QmlCompiler: Make sure any import depends on the builtins
Otherwise types like "int" are not resolved.

Change-Id: I35d0eb05e955822b082d2f6067d1e5b40c510cf1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 13:11:05 +02:00
Ulf Hermann 848404283e QmlCompiler: Use size_t for qHash
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>
2020-10-22 13:10:50 +02:00
Ulf Hermann 826b7c3b18 qmllint: Resolve aliases in nested objects
So far we've just ignored them.

Change-Id: I2ca522ef825a341a3f4bf1c2a42fb0376180cdda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 09:57:57 +02:00
Shawn Rutledge ec9d125f55 Update and activate tst_animators
Amends a0f8be4021caa9bb5055923f0eea3bee0e345235; it's not clear if
there's any reason we haven't been running this test all these years.
But we need to use testFileUrl() for loading QML files, and some
additional updates make it more like the other tests.
Regenerated CMakeLists.txt from the .pro files:
python3 ~/dev/qt6/qtbase/util/cmake/pro2cmake.py *.pro

Pick-to: 5.15
Change-Id: I3ddcc993c4536c2d4d751a37c0425943c7d86766
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-10-22 06:53:42 +02:00
Richard Moe Gustavsen dac2c8aec4 TableView: ensure we update content size upon model changes
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>
2020-10-21 22:47:32 +02:00
Ulf Hermann eae03ccd7f Make QV4::CompiledData::Location hashable
Change-Id: I0e1b84e3a7e656bb816dd2ff6a22b135db0de962
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-21 21:26:19 +02:00
Ulf Hermann 8a889a8e5d qmllint: Remove dead code
Change-Id: I5898402604fe29731dc518d42a441ff852706af3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-21 21:25:18 +02:00
Shawn Rutledge 9de578e989 QQuickFlickable::filterPointerEvent(): remove handling of receiver==this
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 d9d2277fb8

Change-Id: I69714804e4967cc1a373af67bf4c9a4c169f5738
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-10-21 19:55:17 +02:00
Qt Submodule Update Bot d16e62d815 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ib74863929e331c055007f3dec5e280993203579a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-21 18:59:45 +03:00
Fabian Kosmale c5085eb890 qquickloader: Free memory of loaded components after source change
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>
2020-10-21 13:33:34 +02:00
Alexandru Croitor 8ba6cf600e CMake: Fix no-widgets build
Task-number: QTBUG-86053
Change-Id: If58d5b69ed58ae1aa3d50737683e682d70c26c23
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-21 11:25:26 +02:00
Lars Knoll 06ad243417 Remove some compiler warnings
Don't cast a QKeyCombination to int.

Change-Id: If84e2fde9ea83bedd1eb8a8dbbcb050276a333cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-21 11:25:23 +02:00
Lars Knoll 0ecc1e928c Compile with Clang11
Change-Id: I9f3a4a6b6c7a2fbfca0a572209f398a23c26b37b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-21 11:25:19 +02:00
Fabian Kosmale d22ea28589 QQuickWindow: Change 0 to nullptr for removeAll
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>
2020-10-21 09:01:04 +02:00
Fabian Kosmale e62f97f5f8 Adjust to QMetaObjectBuilder::MetaObjectFlags change
Change-Id: I2f9b39fda6c25e57985a32864c85a50b7d6d0231
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-21 09:01:00 +02:00
Qt Submodule Update Bot 98502b7150 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ie4d225e2e174240b807f68c441a4084df22c55b3
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-21 10:01:00 +03:00
Ulf Hermann 51f6d418fa qmlcachegen: Move resourcefilter.cpp into QmlCompiler
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>
2020-10-20 17:19:26 +02:00
Ulf Hermann 14cd261513 QQmlJSImporter: Expose the imported objects
Change-Id: I1257d4efe1813d2b95a37d95a82c21c30fc15591
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-20 13:53:47 +02:00
Ulf Hermann bf3e56d823 QQmlJSImporter: Pass the source location to the result
Change-Id: I8c52efc752fbeae4485d7cc2112d615707e2afd1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-20 13:53:42 +02:00
Ulf Hermann a45e31a42d QmlCompiler: Cache builtin types
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>
2020-10-20 13:53:38 +02:00
Qt Submodule Update Bot f9590f2cb6 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Id9137c58dd8986b4ce0816f9e1a7fbdaef7f3238
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-20 12:47:35 +03:00
Alexandru Croitor 903252b240 CMake: Regenerate examples to use qt_add_executable
Task-number: QTBUG-87661
Change-Id: Ie5bba408000211b24694aa0143bdf79c4a298f42
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2020-10-20 09:32:34 +02:00
Qt Submodule Update Bot b4a0e5ac8d Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I2c6c34fab6b2ffdbc3709588803fd17fd903f9dc
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-20 04:26:02 +03:00
Joerg Bornemann 0d31cb11ee CMake: Fix singleton declaration in qt6_target_qml_target
The declaration is to be written without the square brackets.

Fixes: QTBUG-87684
Change-Id: I8fb7fb1f9204cb56d2fa1e2c10ec585ff0e2b512
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-20 00:03:17 +02:00
Ulf Hermann c010364342 QmlCompiler: Drop the metaobject revision from exports
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>
2020-10-19 15:59:58 +02:00
Ulf Hermann cc57bac899 QmlCompiler: Add hasMethod() and hasProperty() to QQmlJSScope
Change-Id: I29e38054a5adcf398f63df7f367ed4bc24c09c75
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-19 15:59:29 +02:00
Mitch Curtis c1c01e21d1 Doc: mention that clipping can affect performance and link to page
Pick-to: 5.15 5.12
Change-Id: I85e60dd5c8643a8e443a14250987b2b38c78dc08
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-10-19 15:13:56 +02:00
Laszlo Agocs 7658785395 doc: Update sg rhi backend section
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>
2020-10-19 12:31:27 +02:00
Laszlo Agocs c5ac1b8a06 Do grabs out of order
...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>
2020-10-19 09:20:38 +02:00
Alexandru Croitor 8103b8ce12 CMake: Adjust to public API renaming in qtbase
Task-number: QTBUG-86827
Change-Id: Ibeae878cbd7cc43031aeb13b2c480215c849f8bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-18 08:28:28 +02:00
Qt Submodule Update Bot 89e01c0b9a Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I6758d7b8d9aa7879287c6dccc3dc8507d494c1df
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-18 09:28:24 +03:00
Fabian Kosmale 7832a96b7a Adapt QMutexLocker to qtbase change
Change-Id: Ica9561a42217f5a509a6e84e9e48036ec6348e48
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-18 08:28:18 +02:00
Qt Submodule Update Bot 41469fd2e0 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ic64580b7792bf216092ed9d9677ebb44c2ab7e38
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2020-10-18 01:33:28 +03:00
Ulf Hermann 7feab1fb95 QmlCompiler: Read the "bindable" attribute from plugins.qmltypes
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>
2020-10-16 21:56:12 +02:00
Ulf Hermann 813796b303 QmlCompiler: Retrieve warnings from qmltypes parser
Change-Id: I83292c9db42e39e52fbf20e92c036d789bbdb2d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-16 21:55:23 +02:00
Ulf Hermann 44cfbd9e44 Add undefined to builtins.qmltypes
Change-Id: Ie7c8a28fdc417c43a9f24061171b342447b15272
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-16 21:55:00 +02:00
Ulf Hermann 7c27da55f5 Fix typoes in builtins.qmltypes
It's isReadonly, not isReadOnly.

Change-Id: Ia4c372468447bd4f6c0ad21ba36a228052912220
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-16 21:54:51 +02:00
Alexandru Croitor 0d36866f87 CMake: Mark some of the public APIs as TP
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>
2020-10-16 16:35:24 +02:00
Laszlo Agocs 23dbe3d6e0 Promote suffixless names in GraphicsApi
From API review.

Change-Id: I3cda6f4b4e5a2e33356e7af4f7720e0b019b546d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-16 16:32:54 +02:00