| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Also don't mention qmlExecuteDeferred: That one is internal anyway
(albeit not explicitly marked as such yet).
Change-Id: Icef5fb4092b6a109613ae1f2e90fcff93d7c0b4b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If3640ef5cbb6df4b199b481410e79e94ea763645
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to handle symbol clashes with QtQuick1 anymore.
[ChangeLog][QtQml] The functions qmlDebug, qmlInfo, and qmlWarning are
no longer available in the QtQml namespace. Use their counterparts in
the global namespace.
Fixes: QTBUG-88637
Change-Id: Ia74510bd711790cebf55de4cd668891712f6835e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing static builds, mkspecs/qml_module.prf embeds the qmldir
file and any additional foo.qml files into a generated Qt resource
file.
The resource name is called qmake_<qml_plugin_uri>.qrc.
In turn, certain Qt modules and plugins code call
Q_INIT_RESOURCE(<qml_plugin_uri>) to initialize the resources.
When Qt is built with CMake there were 2 differences.
Because the resource files are not compiled into the static libraries
but rather passed around as object files, there is no need to
call Q_INIT_RESOURCE() anymore.
The second difference was that the generated resource name for
resources containing the qmldir file was '<qml_plugin_uri>_qmldir'.
The differences in the CMake build caused issues when linking a
QtQuick3D example project with a static Qt.
That happened due to the mismatch of the generated resource name in
the Q_INIT_RESOURCE() call.
Unfortunately these calls can't be removed during the build system
transition phase because that would break qmake Qt builds.
To fix this, change the name of the CMake generated resource to match
the qmake name. This avoids the undefined symbol errors during
linking, but is actually a no-op! That's because the global
initializer in the linked resource object file will be called before
the manual Q_INIT_RESOURCE() call, effectively making the latter a
no-op.
Note there is one more difference regarding the CMake build. The Qt
CMake builds creates 2 different resource files, one for the qmldir
file (inside qt6_add_qml_module) and another separate resource for qml
files (inside qt6_target_qml_files).
qmake in comparison creates only one resource file for both.
In practice this shouldn't affect or break anything, because even if
there is no explicit Q_INIT_RESOURCE() call for the qml files
resource, the global initializer will still be called from the linked
in object file.
An issue might happen if there are qml files, but no qmldir file,
because then the qmake-required Q_INIT_RESOURCE() would not be called
due to the missing qmldir resource (as generated by CMake).
I think such a scenario is very unlikely if not impossible.
Task-number: QTBUG-88425
Change-Id: Ib12d93d0dae52785ba8182db6829f03524723ca7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After any call to qt6_add_resources we need to record info about the
resource object files. These will be embedded into the appropriate prl
files to ensure that any application built with qmake links in the
resources (only relevant for static Qt builds).
The implementation is a bit ugly, but it gets the job done for now.
It checks for the existence of an internal Qt function in the public
macros and calls it if it's available. That will only happen when
doing Qt builds. For regular app projects the functions will not be
called, but we don't generate .prl files for such projects either way.
Note that this comes with the same limitation as described in the
changes for fixing QTBUG-88425. Specifically, the functions will only
record resource object files for targets built as part of the current
CMake invocation (aka just one repo for non-top-level builds).
This handles the most common issues, but is not a complete fix.
Task-number: QTBUG-87702
Change-Id: If632fdf9867cec4b24b1c6136d23ee9d8b56e650
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I4bb4a66b7ccca838e058962bbc297659b273c78e
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Fixes: QTBUG-84416
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect content of 'qmldir' file that is generated by
'qt6_add_qml_module' and 'qt6_target_qml_files' functions, instead
of write content to file immediately.
Use 'cmake_language(DEFER CALL)' to call 'configure_file' write
whole 'qmldir', when finalizing CMAKE_CURRENT_SOURCE_DIR scope.
This way a reconfiguration will not rewrite the files,
touch the timestamps, and thus needlessly rebuild.
Task-number: QTBUG-88172
Change-Id: Idca68e4ceed13d0aa7eac443e769d5677557b880
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
| |
Change-Id: Iba9f99f0fcdb7692ceadaec223d82e425f1e424b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I173e2ff05b3fc3bbe56df423abcbfc84bdc2a17a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
In this case we need to pass a pointer to the return variant itself, not
to its data.
Change-Id: I86e468f106f29e1f1be8adee9882d465fd6da533
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This is a single char16_t, not an array of them.
Pick-to: 5.15
Change-Id: I55d23ebb5f2abebd43cd4160a75d373706392ddf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
As we generated qmltypes files (albeit empty), we also have to advertise
them in the qmldir files. Otherwise qmllint will complain, as that is a
common mistake in old modules where qmldir files were written manually.
Change-Id: I4c96610930d89558cd363b7f9db28ec6e21ed4d5
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no C++ sources are passed to qt_internal_add_qml_plugin (a pure
QML module), create a C++ backed Qt plugin anyway.
In such a case, generate a dummy plugin.cpp containing a
QQmlEngineExtensionPlugin subclass.
The class name is autogenerated from the QML import URI.
The class constructor will call the qmltyperegistrar generated
void qml_register_types_foo() function, to ensure the needed module
versions are registered for the QML module.
Change-Id: I19959dafdf0dc837c6037e7dc1d549b7420110a7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
That is a noop and produces a warning.
Change-Id: I75787aee66b55522005247524140e3f3a7dd56ba
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Makes no difference in this case, as it's UTC, but is terser and
perhaps slightly clearer.
Change-Id: I7de315def2f45ec4a12d2a682e5d1d7a4d0a3e6d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You get to write QML_SEQUENTIAL_CONTAINER(value_type) now, and
qmltyperegistrar will generate a sensible registration call from that.
A registration might look like this:
struct MyStringListForeign
{
Q_GADGET
QML_ANONYMOUS
QML_SEQUENTIAL_CONTAINER(QString)
QML_FOREIGN(MyStringList)
QML_ADDED_IN_VERSION(3, 1)
};
It's unfortunate that we need to use a metaobject to transfer all of
this information, but there is no other sensible way.
Transform the containers defined in qv4sequenceobject.cpp to use the new
style, and move them out of the builtins, into QtQml. Recognize that
only one of them was ever tested, and add tests for the rest.
Task-number: QTBUG-82443
Change-Id: I3a30f9e27266bb575eea26c5daf5dad1ec461cc5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
As a driveby, enhance the hash function's properties by using
qHashMulti.
Change-Id: Id8add6047530f07ed44f50f46ffe68bb563fdd6b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Icc4ff1f78bca75c59af1c2550fae15a2489a8bf1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Adds the option to specify past major versions of modules to be registered.
This is necessary for modules that don't export any types themselves to work when built statically.
Change-Id: I4b4a379f92707ec64cbb32f91db9d010440b95a2
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The constructor for "font.capitalization" asserts Q_ASSERT(vtProp.userType() <= 0x0000FFFF).
This was enough to trigger the assert:
QQmlProperty property(text, "font.capitalization")
Users are allowed to register value types.
Change-Id: Ie10f22b7c9d70bd194cf72f287ec6d8d1ff8b028
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Assigning a plain char to QChar is deprecated. What we want here is the
special Null character, though.
Change-Id: I0f3cd56c8820fdf5afa40cf608e738e04163680a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quite obviously, the Qt object is a singleton, extended with a
namespace, backed by a member of the JavaScript global object.
Defining all the methods as JavaScript functions is unnecessary and
duplicates the general type transformation code. Also, it makes it
hard to use those same methods from a C++ context as we cannot
properly set up the arguments outside the JS engine.
Rewriting the Qt object reveals some deficiencies in the old
implementation that we need to fix now:
1. The enums of the Qt type were listed as properties of the Qt object,
which means you could iterate them with a for..in loop in in JavaScript.
This is just wrong. Enums are not properties. This functionality
is deleted and the test adapted to check for each enum value separately.
The commit message for the change that introduced the iterability
already mentioned that the author had failed to find any occurrence of
this in the real world.
2. Parsing time objects from strings was done by parsing the string as a
date/time and then picking the time from that. We still support that for
now, but output a (categorized) warning. Parsing the time directly is
preferred where possible.
3. Previously you could create (invalid) dates and times from various
kinds of QML types, like int and color. This does not work anymore as we
now validate the types before calling the functions.
4. Passing more arguments to a function than the function accepted was
unconditionally ignored before. Now, a Q_CLASSINFO on the surrounding
class can specify that the arguments should be checked, in which case a
JavaScript error is thrown if too many arguments are passed. In order
for this to work correctly we also have to ignore JS undefined values as
trailing arguments for overload resolution. This way, if a method
matching the defined arguments exists, it will be preferred over a
method that matches the full argument count, but possibly cannot accept
undefined as parameter.
Consequently a number of error messages change, which is reflected in
the qqmlqt test.
[ChangeLog][QtQMl][Important Behavior Changes] You can not iterate the
enumerations of the Qt object in JavaScript anymore. This does not work
with any other enumeration type either. You can of course still access
them by name, for example as Qt.LeftButton or similar.
[ChangeLog][QtQMl][Important Behavior Changes] The time formatting
functions of the Qt object in QML now allow you to pass an actual time
string, rather than a date/time string as argument. Passing a date/time
string results in a warning now.
[ChangeLog][QtQml][Important Behavior Changes] Functions in the Qt
object for formatting date and time will now throw a JavaScript error
when presented with a value of an incompatible type, such as int or
color.
[ChangeLog][QtQml][Important Behavior Changes] The Qt.resolvedUrl()
function now returns a URL rather than a string. This follows the
documentation.
[ChangeLog][QtQml][Important Behavior Changes] The GlobalColor enum of
the Qt namespace is not exposed to QML anymore. It did not make any
sense before as the enum values could not be used as colors.
Change-Id: I7fc2f24377eb2fde8f63a1ffac5548d652de7b12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype
now as type for the size of a list. This is in line with the containers
that you might use to back the list.
Fixes: QTBUG-88269
Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The content in the porting guides are closer to a changelog than
a porting guide. At this point, it is easier for maintainers and
contributors to write in a changelog than a guide. This change
should help with readability and is closer to the usage of
"Changes" in documentation.
Part of a rename in other submodules.
Task-number: QTBUG-87156
Change-Id: Ibb58a3cba5394962a5709aeb08e3701e16c7775d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
| |
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
A destruction handler can cause a new object to be allocated during
garbage collection. Depending on where in the heap the object ends up,
it may be found during the sweep pass. As the mark pass had no chance to
mark the object, we need to set the mark bit right at allocation time in
this case.
Change-Id: Ie43eeb548e78bd375b001b3a6bb4ef6596f91980
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure we don't create bogus typeinfo entries, do create a target if
there are no C++ files, and do install created targets.
This way we do build the qmlcachegen-created files and link them into a
library which is subsequently deployed. It's not a real plugin, though,
and we need to specially handle this in QML. That's material for a
separate change.
Change-Id: I516d4611b6041a23489ce57df38dd83114dcc5de
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-88209
Change-Id: Iae298355ce0b85945ea6c5c39805794f5f997845
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
gcc warns (and subsequently errors out) that startTime and function
might be used uninitialized. Use member initialization for all members.
Change-Id: I382c0f78c67fa76f9fc955691f4391a3885da455
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-88156
Change-Id: Ic6127c6128b4c7736cb4b5ab8ce51629388b59ca
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
A QV4Sequence can be converted back to its underlying container; we
therefore should give the conversion of QV4Sequence to container a high
score if metaTypeForSequence and the target metatype agree.
This has a larger effect in Qt 6 than in Qt 5, as we now can have new
sequence types for any (QMeta)Container.
Fixes: QTBUG-87616
Change-Id: I2bf02ebadbf9b707719d09edaf14b112eb2caf4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Id197f3d4bf8ab60256040e0a177d5596ce78a0a8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
As properties of the Qt object they need to be visible.
Change-Id: Ic6357b92f4fae36240e8dbce8976eeb6f9f41bf0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
|
|
|
|
|
| |
Change-Id: I6018e1585c6f9b778d8f8559b3f1fb9486411bff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
It seems we never stated that singletons can not be extended in our
documentation. Therefore this is technically a bug fix and doesn't need
separate documentation.
Change-Id: I7877289bd5a52ecf709f80ba1975137981ec65f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is in line with what we do on qmlRegisterSingletonType(), and it
allows us to return singleton objects created independently of the
instantiation mechanism.
Change-Id: Ia6a077f5d22241593acd8cc87b3f65ae20f95667
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we can access the enums of namespaces as properties of the
primary type. This is achieved by:
1. Making enums of extended types available in the base type
2. Allowing the extension to be specified as plain metaObject rather
than as type name.
3. Refraining from creating the extension if the create function does
not exist.
The goal of this is to declare the Qt namespace in a civilized way, but
will also help with cleaning up the QtQuick value types and their enums.
Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Change-Id: I9e35d84940652d6de02cb7bd18bbb25f3e111184
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Since we depend on C++17 now, all of these can go.
Change-Id: I0484fd4bb99e4367ec211c29146c316453729959
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
Add information about the variant/var unification.
Remove place-holder sentence.
Change-Id: I79bb230820eab71fea72929a24fb8c1b0479b256
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression from Qt 5 to Qt 6, because QDateTime is now
apparently more strict in its parsing of RFC2822Date. The string in the
test-case is not valid according to that spec, but JS engines like V8
still accept it, and so did we in Qt 5.
Fixes: QTBUG-87610
Change-Id: I2c6eb2087e4845b04fa0dc4f7aa9a229b3428a43
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
When using refs as loop variables, the clang compiler complains (with
default settings). This prevents that. Note that QJsonValueRef is used
"behind the scenes", which makes this iteration method correct.
Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
It's unused.
Change-Id: I629bfb4ae9775f3f7c97be7789c84a15205cc29e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-85713
Fixes: QTBUG-87464
Pick-to: 5.15 5.15.2
Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
maximumMinorVersion() needs to ignore unspecified values as they are not
versions in themselves.
Change-Id: I7c91cf4b8320fd6636eb1be10b069cf885797ee1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Id2795f16af99870f32266f81228890a9d12c86a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-87037
Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Implements toString for QQmlPointValueType, QQmlRectValueType and
QQmlSizeValueType.
Change-Id: Ia8dad072453caea24f6f351cf3da9d0ed085b2a1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|