Commit Graph

19018 Commits

Author SHA1 Message Date
Richard Moe Gustavsen be12b71fae QQuickTableView: add positionViewAtRow()/Column()
Add functions to let the application scroll the table to a
specific row or column using a specific mode. This API
partially mirrors the API found in ListView.

[ChangeLog][QtQuick][TableView] positionViewAtCell(), positionViewAtRow(), and
positionViewAtColumn() have been added to enable the application to position
the contents to show a specific cell.

Fixes: QTBUG-83215
Change-Id: I321588041977f9ded40f84fc0499ea1c5f6ac801
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-08 15:57:11 +02:00
Maximilian Goldstein faa3e0b41e Implement URL object
Implements the JavaScript URL object (https://url.spec.whatwg.org/#api).
Except that it does not currently implement the searchParams field.

Task-number: QTBUG-54988
Change-Id: I19abc69e075cbf84bd15e6791be195ce16f3fe73
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-08 14:53:30 +02:00
Qt Submodule Update Bot 399ebb5635 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I99d13f2468bb51f6769f65f74ba1b2e3276c7b18
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-08 14:26:43 +02:00
Ulf Hermann 8c9fb76fe6 Tools: Add forgotten access method
Change-Id: I9307a6243fdc5bc4f4d43321b41c172082298839
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-07 21:37:42 +02:00
Laszlo Agocs e2ac02e942 twotextureproviders example: rip out legacy OpenGL material impl
Leave only the RHI version in. Also add a temporary forcing of the RHI
rendering path for now. This will go away when purging the direct OpenGL
path in Qt Quick because RHI will be the default anyhow.

Now both graph and twotextureproviders follow the same structure and
approach, and together serve as a fairly good examples of creating custom
materials in the RHI world.

Change-Id: I4aafd440f70d13b8033fd4fdf0ecce71798c68d2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-07 17:09:12 +02:00
Laszlo Agocs d7a42f580c Update graph example CMake
Also update OTHER_FILES in the .pro although that's not strictly
required for building.

Change-Id: Ib48e64b298c1a7b1600ecd1f13580398679b72a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-04-07 17:08:52 +02:00
Laszlo Agocs fd4f121fca Remove QSGSimpleMaterial
And port the graph example to QSGMaterial and the RHI. We will not anymore add a
direct OpenGL path (that would mean using QSGMaterialShader) for the example because
the upcoming purge renders that useless anyway.

Task-number: QTBUG-82988
Change-Id: I137575ed5df45b6bfc34a11d73dc5100945081c5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-07 17:08:39 +02:00
Ulf Hermann aafd78d034 Drop some dead code
Change-Id: Ibc8f0faea1926432dfe7866204d43ffdda7edcbb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-07 16:21:23 +02:00
Laszlo Agocs 02d35ec094 Remove sgengine from scenegraph examples CMake project file
Change-Id: Ifb2f986ec9d4fd0bfdd35f2e59d7d1d916ac2098
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-04-07 11:52:29 +02:00
Laszlo Agocs 0d76da7d85 Regenerate CMake project file after QSGEngine removal
Change-Id: Id7a29a989757e211b3d4ba3779a3e52510fba1ff
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-04-07 11:37:48 +02:00
Laszlo Agocs 07d1dbcf7f Remove QSGEngine and move QSGAbstractRenderer back to private
QSGEngine goes away. Same for the associated example, which is the only
place this is used anywhere in Qt.

As a consequence, the renderer base class can be moved back to private:
there is no use for it to be public anymore, since that made sense only
in combination with QSGEngine. With the RHI-based rendering path driving
a renderer directly is more complicated than before so it is not
reasonable to allow the QSGEngine-style access anymore.

Instead, one has QQuickRenderControl, which allows redirecting and
manually driving the rendering of a QQuickWindow, thus providing an
alternative to the legacy QSGEngine approach.

Task-number: QTBUG-78596
Change-Id: If57c6b657b2053da1c4e545e517026382a71d998
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-07 11:37:32 +02:00
Qt Submodule Update Bot 494063ccc8 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ic09d3ce5f08a3c85d2fa4f0718c34023a7848fd9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-07 11:01:34 +02:00
Alexandru Croitor 230644faec Revert "CMake: Exclude building apps when cross-compiling"
A slightly modified commit will-be relanded once a dependent
change in qtbase is merged and propagated to qtdeclarative.

This reverts commit e4f1c1068b.

Change-Id: Ia7ca2f5f3b7d2ad2d07e380b3853aca87d779d18
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-06 23:56:06 +02:00
Alexandru Croitor e1118b757c CMake: Regenerate projects
Change-Id: I7f1716d8524e1e6a1491a01ba71dbd7f078ade14
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-06 15:39:46 +02:00
Alexandru Croitor e4f1c1068b CMake: Exclude building apps when cross-compiling
It would fail the iOS multi-arch build otherwise, at link time
with

Undefined symbols for architecture x86_64:
  "_adler32", referenced from:
      _png_icc_set_sRGB in libQt6BundledLibpng.a(png.c.o)<Paste>
....

This is due to us using system zlib instead of bundled zlib. Because
system zlib only has one slice of architectures (either device or
simulator), we get the above linker error.

Solution is not to link (build) the apps at all).

This is consistent with what qmake does.

Change-Id: Ief2e63a8da49f9daac4f5542e78b0f0b3d37ed93
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-06 15:39:43 +02:00
Fawzi Mohamed 666bd50d59 Remove convert from ASCII warning
Change-Id: Ife8c3cc6f6cafc1048492ff1f503264528a4128c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-06 14:15:58 +02:00
Qt Submodule Update Bot 67cb589018 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I32761ef835d2c54dbb8420b89c68bb4ea822d89b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-06 14:12:31 +02:00
Ulf Hermann f5f66493c7 Blacklist tst_qquickbehaviors::currentValue
Task-number: QTBUG-82404
Change-Id: I76ac903e1cfae4aa1d5e833f5549c3d6406e2624
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-06 09:25:47 +00:00
Mårten Nordheim 680d56c1c0 Remove use of bearer management
It's now been deleted in QtBase. No extensive usage here.

Task-number: QTBUG-76502
Change-Id: Ib79a972fc2a66122eaeb75d0d5e00a687ea9a9d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-06 11:24:02 +02:00
Alexandru Croitor a793e88d3b Fix compile error with latest qtbase due to removed bearer management
d8b49e6b51007d6f0a9faec82a66b95dc7ccf541 in qtbase removed bearer
management in QtNetwork.

Looks like it's an unused include in qqmlengine.cpp.

Change-Id: I9e2c7cf164eb843ab10bb941bd42c2704ec78906
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-06 11:10:01 +02:00
Lars Knoll fb3552e0d1 Remove QRegExp support from QtQml
Remove all code that supported converting between JS RegExp's and
QRegExp, as QRegExp is going away in Qt6.

Change-Id: I4863e68dd87a337d7e836d1b26c28ee3bb914e9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-03 21:02:23 +02:00
Lars Knoll cc6c5ae70b Port the remaining tests from QRegExp to QRegularExpression
Change-Id: If258701759c5da206948407feccd94e323af6b36
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-03 21:01:53 +02:00
Lars Knoll 55be24d6b6 Remove QRegExp from qml autotests
QRegExp will get removed in Qt6. Clean up by removing dependencies
on QRegExp in the autotests.

Change-Id: I8ef8561ba30b98b61cd9ed52907b48c5969f2c49
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-03 21:01:49 +02:00
Lars Knoll e1bc9db851 Improve conversion between JS RegExp and QRegularExpression
Add support for InvertedGreedinessOption and MultilineOption.

Change-Id: I19dce6e356a7ec406640bb8858885cd576b4aa2f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-03 21:01:45 +02:00
Qt Submodule Update Bot 3156fd64cc Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I25870fa568b00f26b3edf37c0d6805491416ef1d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-03 14:13:16 +02:00
Simon Hausmann 448b2a5d83 Replace QFlagPointer with QTaggedPointer
The latter has the advantage of allowing the use of a real type for the
tag, instead of the generic flag/flag2 boolean accessors.

Change-Id: Icc9e854ce4af3eb5808a4bed45aa22f377e223da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-03 12:35:23 +02:00
Ulf Hermann f1fd2b982a V4: Move constant evaluation of doubles and strings into base CU
We don't need to execute anything for that. The translation evaluation
is kept in the executable CU because we might not have a
QCoreApplication.

Change-Id: I2ee39b220305e74b8c8f5540b8e59a91e2ed2b4c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-03 09:12:10 +02:00
Ulf Hermann c3b6e81388 V4: Add missing accessor function
As we can get builtin types from properties, we should also be able to
get custom types.

Change-Id: I661b5843113c1a11cef7e10e3d8432fb29d88377
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-03 09:12:03 +02:00
Simon Hausmann 36fc392147 Implement support for property observers
Syntactically we call them signal handler expressions :-), now also
working when the underlying property doesn't emit an old-style signal
but is just a QProperty.

Change-Id: I719a3e428f44af0fd48036434aefa682a02f7de1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-03 07:04:26 +02:00
Simon Hausmann e40098c530 Add support for translation bindings on QProperty based properties
Change-Id: I439653123cdc96df97a1801664655c9d28a8b9b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-02 22:23:04 +02:00
Maximilian Goldstein 63bf6ac4c4 Throw an error if an incompatible parameter is passed to a C++ function
[ChangeLog][Important Behavior Changes][QML] Throw an error if an incompatible parameter is passed to a C++ function

Change-Id: I088e362869f7dc00ca639a0fbc4ba20cb9e82f7d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-02 16:33:41 +02:00
Maximilian Goldstein 19850f1298 Implement modifying colors using methods
Instead of having to use Qt.tint, Qt.lighter or Qt.lighter you can now
directly use these on colors (e.g. color.tint("red")).

Also adds Qt.color to explicitly convert color strings into actual color
objects.

[ChangeLog][QML][General] Added Qt.color to turn color strings
into color objects
[ChangeLog][Quick][General] Make Qt.tint, Qt.lighter and
Qt.darker methods that can directly operate on color objects

Task-number: QTBUG-77635
Change-Id: Ie10ced7ba7f1dc10afdebbcbc8664d74cd6efccf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-02 09:26:40 +01:00
Qt Submodule Update Bot b3d28f7286 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I20b865ec933c216beb5abc2ff7ca32c298e81bfb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-02 08:56:01 +02:00
Lars Knoll 31d4534180 Include qjsengine and qjsvalue autotests in the cmake build
This looks like a bug in the pro2cmake tool. It somehow didn't
include those two test cases in the build. Modifying the pro
file slightly makes pro2cmake add them.

Change-Id: If6215f111494d0912e590428a0f4ca2c3b653856
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-02 08:41:15 +02:00
Lars Knoll 96b546c46b Change documentation to mention QRegularExpression
As QRegExp is going away in Qt 6.

Change-Id: Ifb98da762b3d6cb593ec53cc23f7525cb2e9f595
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-04-02 08:41:12 +02:00
Lars Knoll 30559095ed Ignore some cmake generated files
Change-Id: Ieefe8bd422e22ccc848529bdeaa32fec535d4fc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-02 08:41:08 +02:00
Lars Knoll c273c79b6b Remove old BIC data
Change-Id: I7c902a8179505652ff97e443ef7ba48405a0d107
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-02 08:41:04 +02:00
Ulf Hermann 95288a6a7b Remove QT_CREATOR special cases
Always parse typeinfo entries from qmldir files, and export QQmlJS the
Qt way.

Change-Id: I3a87a8d0a9ed1014628df6eb906bde5ea23e5d9f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-01 21:46:08 +02:00
Ulf Hermann eb5aa8d9c1 qmllint: Consistently use shared pointers for ScopeTree
ScopeTree keeps a weak pointer to its parent scope and strong shared
pointers to its children. Avoid passing bare pointers around, so that we
cannot create multiple shared pointers independently from the same bare
pointer.

Change-Id: Id0faece550b1878363004d843a8fa5c1164794ae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-01 10:29:29 +02:00
Ulf Hermann a88e5c1711 TypeDescriptionReader: Read file name from qmltypes
Change-Id: Iec295b87da413a2b6c741f3d3313c54caf055fd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-01 10:29:29 +02:00
Ulf Hermann c38ea80c5d Move qmllint's metatype support to tools/shared
We want to read qmltypes files and analyze scopes also from other tools.
Furthermore, restructure the shared directory, so that each tool only
includes what it needs.

Change-Id: I96a2dcc8b1c5fac613592fb1867bf51fa5ef3a6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-01 10:29:29 +02:00
Maximilian Goldstein 4cf0962dc4 Warn if too many parameters are passed to a C++ function
Change-Id: I8ddf55d48d9276be5880e89e7b854f3355891f8e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-01 10:29:28 +02:00
Qt Submodule Update Bot dbc6b9bfc7 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ic6879e632d8457434f18349eb73236cd6d83498f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-30 22:39:16 +02:00
Ulf Hermann 72bbed4544 qmllint: Drop support for "ModuleApi"
This is some ancient, pre-Qt5 way of describing singletons. We don't
need it anymore.

Change-Id: I6355acf187b8ede4298a7026229a587cd1a12f1b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-30 15:06:55 +02:00
Simon Hausmann dff7689a01 Add support for binding directly to QProperty instances
Avoid going through externally managed bindings and instead allocate a
more lightweight property binding. It's basically a
QQmlJavaScriptExpression and one pointer plus the overhead of
QPropertyBindingPrivate.

Change-Id: I1530330926d351b61f2b3bbad39301c628a8bef1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-30 14:18:18 +02:00
Simon Hausmann 9f2c5aa2ef Minor cleanup
Remove unnecessary shadowing of function from base class.

Change-Id: I46539be359ae794e357930ac6f2287f5d14331d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-30 14:18:11 +02:00
Qt Submodule Update Bot 22c99095bc Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I3c6cb08aeec7596c96ed8101afeabffd9406f495
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-30 10:00:58 +02:00
Qt Submodule Update Bot 0e35809563 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I314dda56a041d1ff630a529ad1cade83fe0f0a26
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-27 17:02:36 +01:00
Lars Knoll 620d5d2772 Remove usage of filterRegExp
It's going away together with other QRegExp based apis.

Change-Id: I7363f5c3c944d5a56fefbfda628e9178847ae2da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-03-26 14:48:51 +01:00
Qt Submodule Update Bot e4c978d586 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ic4ac5b24184c6269007828c7b4531b4fa18e692a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-26 09:16:11 +01:00