aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript/qquickworkerscript.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-03-31 16:28:24 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2022-11-28 17:10:07 +0100
commit6656567a4085e3d6de01226fb7b1ec16ee7ba08c (patch)
tree9d021e9f3c17d468dcc6bc1be52c0e595019a662 /src/qmlworkerscript/qquickworkerscript.cpp
parent6cd8d209ec472a658a330f25b84f92cd61e0d4cf (diff)
Introduce type based overload of Qt.createComponent
Add type based createComponent overloads based on QQmlComponent::loadFromModule. They provide a way to instantiate a component by its type, specified by a URI and typename pair. This enables creating Components for inline component types and C++ only types. Support for directly passing the type is deferred to a later commit, as it needs some care to work together with the compiler. As the string based overload matches a mistaken call to the URL based createComponent with parent and mode swapped (due to anything being convertible to string), we add a check to detect this specific error case and give a helpful error message. [ChangeLog][QtQml] Qt.createComponent now supports creating a Component from its module and type name (passed as strings). Task-number: QTBUG-97156 Fixes: QTBUG-26278 Change-Id: I89e7430fe02d52f57230bfa1b0bfbcbfd0ead4b7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlworkerscript/qquickworkerscript.cpp')
0 files changed, 0 insertions, 0 deletions