aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.14' into 5.15.0Qt Forward Merge Bot2020-04-271-2/+1
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqml.h Change-Id: I34295e4ea3fc9ec2a42cb93df498d54a5583ddf1
| * Generate the docs for qmlRegisterSingletonInstance5.14Giuseppe D'Angelo2020-04-241-0/+4
| | | | | | | | | | | | | | | | I think qdoc is once more confused by the mismatch between the actual declaration and the signature in the \fn macro. Change-Id: I25d1be71ffdfc20961e23e06e9132ed09d1e29d0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge 5.15 into 5.15.0Alexandru Croitor2020-04-231-2/+2
|\ \ | | | | | | | | | Change-Id: I07b002df6a05efd577d4ff24e12ef932a4fe7836
| * | WASM: Fix broken WebAssembly platform detectionFredrik Orderud2020-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing check did unfortunately not work, since Q_OS_UNIX is also defined in addition to Q_OS_WASM when building for WASM. The Q_OS_WASM check must therefore be done _before_ the Q_OS_UNIX check. Sorry for not testing this properly before submitting my previous patch. Change-Id: Ic0b75be626fa6c826dd2d4672a915c282ee03807 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into 5.15.0Qt Forward Merge Bot2020-04-214-1/+9
|\| | | | | | | | | | | Change-Id: Iba61fff386b0d76e8d3dbb63e5b86ed8ee79d151
| * | WASM: Enable WebAssembly platform detection from QMLFredrik Orderud2020-04-212-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebAssembly seem to be missing from the list of reported platform in QML. Adding it to the list enables writing of work-arounds for wasm-specific bugs like e.g. QTBUG-83380 also in QML code. Change-Id: Ifc5966ee0da0e62bfd8d4a029e1a42962686e43c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-202-1/+6
| |\| | | | | | | | | | Change-Id: I5d7acb2a3883104d6002f147b58977ff58aa3383
| | * Make qdoc generate the documentation for qmlRegisterSingletonTypeGiuseppe D'Angelo2020-04-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | I *guess* it wasn't find the "dummy" signature spelled in the docs, but only the actual one (with SFINAE), so the overload ended up being undocumented. Change-Id: I3c48057860c83dc78107e87b93616415976e802f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Fix enum setup optimizationMichael Brasser2020-04-021-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibba11705ff26176fe72b14f3bf462b7a12207295 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QV4Engine: Avoid memory leak in toVariant conversionFabian Kosmale2020-03-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | We should really backport this to 5.14. Someone will hit it. (cherry-picked from commit 78fd438f158839ffebcd52cc7974eac28489dbdd) Change-Id: I2c713fd759ac40aaaac0c0943edb993d3e27686b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | V4: Avoid integer overflow in DataViewCtorFabian Kosmale2020-04-211-1/+1
|/ / | | | | | | | | | | Fixes: QTBUG-83667 Change-Id: Ia54510bd7c20fb232b117c1ea0fa5facfcd1a9a5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Fix double inclusion of CMake plugin targetsAlexandru Croitor2020-04-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 99ace38d22c640e37bb1a41095ee3b126169816a, all plugin files are included automatically, not only the ones ending in Plugin.cmake. Thus the extra inclusion done by the QmlConfigExtras file should only be done if strict mode is set. This fixes errors of the following type when doing find_package(Qt5Qml) add_library cannot create imported target "Qt5::QTcpServerConnectionFactory" because another target with the same name already exists. Amends 99ace38d22c640e37bb1a41095ee3b126169816a Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4 Task-number: QTBUG-83282 Change-Id: I205036092bff9925aa95472f0aa6a212f0372227 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | fix -no-feature-translation buildTim Jenssen2020-04-022-2/+2
| | | | | | | | | | Change-Id: I817564e979d4c69f4d7ebd2c9e1d8cddf0727c13 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add doumentation for nullish coalescingMaximilian Goldstein2020-04-022-0/+6
| | | | | | | | | | | | | | Fixes: QTBUG-83145 Task-number: QTBUG-81615 Change-Id: I87a2053aa560b434b6282f5dad852537ac0342cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Doc: Fix typo in linkPaul Wicking2020-03-261-1/+1
| | | | | | | | | | | | Fixes: QTBUG-83099 Change-Id: I8cbf2680021836a9e43c225211cf9b479445452e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QML: Avoid cyclic references between ResolvedTypeRefence and CUUlf Hermann2020-03-256-46/+100
| | | | | | | | | | | | | | | | | | | | | | | | The compilation unit keeps a list of references to used types. Usually those are references to types in other compilation units. However, in the case of inline components they can be references to the same compilation unit. In that case we should not addref() the compilation unit, as that forms a cyclic reference. Fixes: QTBUG-82768 Change-Id: I29d28f3a4780aad4fabd4aa2ed02ca0d0108987e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Check that QJSValue to set conversion worksFabian Kosmale2020-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | Also, fix the check to actually test the correct capabilities by using the containerCapabilities function; testing _iteratorCapabilities only worked by chance so far. Task-number: QTBUG-82743 Change-Id: I64f20c6bf1e47737c7b927f79e1e78c1a1603741 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QNetworkReply: fix use of deprecated error signalMårten Nordheim2020-03-231-1/+1
| | | | | | | | | | | | Task-number: QTBUG-82605 Change-Id: I015547da20dd38c4de75f21c1896d53e1ca355c2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QQmlValueTypeWrapper: Avoid compile warningsUlf Hermann2020-03-231-4/+4
| | | | | | | | | | | | | | | | The type names are expected to be UTF-8 and we don't need to keep temporary meta types. Change-Id: I676d04d8733ef0ea3e159038d4973753350572bf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmlRegisterSingletonInstance: show user-friendly signature in documentationFabian Kosmale2020-03-182-1/+6
| | | | | | | | | | Change-Id: I50ee4c014acf3f95d00a38c6d115776143688c8e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Inline components: Abort if two IC's with same name existFabian Kosmale2020-03-162-0/+7
| | | | | | | | | | Change-Id: Ic52fa388711a76d729ae28678932f4a150da9583 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Prefer Inline Components over any other imported nameFabian Kosmale2020-03-162-0/+23
| | | | | | | | | | | | | | | | | | | | | | After processing all other imports, there might be other imports both in front and behind of the inline component imports in the import list. To avoid having to search for them, we sort the list so that they are in front. Fixes: QTBUG-82302 Change-Id: I9f6deb03608b1ebd0cbe0eddd1a1e5d39837a783 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Check that value type exists before creating wrapperFabian Kosmale2020-03-121-2/+12
| | | | | | | | | | | | Fixes: QTBUG-82843 Change-Id: I1ea4a52b33e7d318525e63346eab46ecf7a8fec0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Remove unused defineNorihito Tohge2020-03-121-2/+0
| | | | | | | | | | | | | | It looks like this has never been used since 5.0. Change-Id: I1038a9f15f05b5476515cf2d35931f992e77fbbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-102-8/+4
| | | | | | | | | | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Remove duplicate add of qqmljsengine_p.h to HEADERS in parser.priFawzi Mohamed2020-03-031-2/+1
| | | | | | | | | | Change-Id: I6848575df79be5f84e55e1e9ae9282216424afeb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Get rid of extra spaceFawzi Mohamed2020-03-031-1/+1
| | | | | | | | | | | | Change-Id: I11e5c9e95974e89f2fd1571ca4b97a0f2ac3309a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-033-0/+27
|\| | | | | | | | | | | | | | | Conflicts: src/qmlmodels/qqmltableinstancemodel.cpp src/qmlmodels/qqmltableinstancemodel_p.h Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
| * Doc: Add section about QVariantList and QVariantMap as C++ propertiesUlf Hermann2020-02-241-0/+19
| | | | | | | | | | | | | | Change-Id: Ie18661274880f45d911baf05797a8b384d72f9f7 Fixes: QTBUG-82249 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Fix build with -no-feature-networkUlf Hermann2020-02-242-0/+8
| | | | | | | | | | | | Fixes: QTBUG-82418 Change-Id: Ibceeefed75941d963e6b79b44e9231d0d8053221 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-3/+3
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step cloaser to that goal. Change-Id: I3214ad6ccaca9dfd4a026589cabeb40cbf4a6298 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-0246-252/+266
| | | | | | | | | | | | | | | | | | | | | | | | This is needed in a few places outside of declarative, so this change restores the loc member in DiagnosticMessage and moves QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory. QQmlError is unaffected and retains only line/column. Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Revert "error -> networkError to fix deprecation warning"Timur Pocheptsov2020-02-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 391bd68b4045268b389780f4b08d2f07951b45bf. Reason for revert: this warning is only temporary, the patch fixing it - is coming. But the original change of error->networkError was reverted in 5.15 to make the new patch, changing signal name instead, work. Now qtdeclarative does not compile - it calls non-existing function. Change-Id: I276562564c8954f67dcdf4fd5d08afd5f3f9dc8b Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | error -> networkError to fix deprecation warningFawzi Mohamed2020-02-272-3/+3
| | | | | | | | | | Change-Id: I80d518a1b21185baba0d4934ebf486809e086f9f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: Fix mark stack overrunsUlf Hermann2020-02-277-62/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of applying a heuristic on when to call drain() in unrelated code, we check the stack limit on each push(). If the soft limit is reached we try to drain. As drain() itself can push again, we try to limit the stack size by allowing at most 65 recursions of drain(). If none of that helps, we crash with a meaningful error message. This allows us to remove all the hacky drain() calls in other parts of the code. Change-Id: Ib979339470da0e85981de8131e7997755b757c71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add revision to QQmlTypeNotAvailableUlf Hermann2020-02-261-0/+1
| | | | | | | | | | Change-Id: Ic5ce3c50a4a7e43c7d3ba6b105de3ed08021227b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Provide a way to statically register namespacesUlf Hermann2020-02-251-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, qmltyperegistrar would stumble over any QML_* macros in namespaces, as the namespaces could not be used as template arguments. However, namespaces are intended to be usable by QML as uncreatable "types". Now, qmltyperegistrar checks the namespace flag that moc records in the JSON output, and if that is given, registers an uncreatable metaobject instead of a type. Therefore you can use QML_ELEMENT and friends to register namespaces, just like you would register classes (except that they're implicitly uncreatable, of course). Task-number: QTBUG-68796 Change-Id: I186d7e9425471c32fb1a1f29c0c0b946afb2a9d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Revert "Replace call to deprecated QNetworkReply::error method"Timur Pocheptsov2020-02-244-5/+5
| | | | | | | | | | | | | | | | | | This reverts commit e5a4ba4a5573ace08def218b985dde83de0805fb. Reason for revert: it was decided to re-name a signal instead, like it's done in QProcess. Change-Id: I0f393c482d8be506430258d7afd4a0056611831f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Doc: Fix documentation from QQmlEngine::singletonInstance()Ulf Hermann2020-02-241-6/+9
| | | | | | | | | | | | | | | | Don't suggest procedural registration of C++ types. Change-Id: Ib133fa7557f7555222fc55344a29967efc5c1f6f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix QML basic type documentationEdward Welbourne2020-02-201-26/+7
| | | | | | | | | | | | | | | | | | Removed the documentation of some limitations that no longer apply. Fixed up grammar in the process. Fixes: QTBUG-82249 Change-Id: I807cbef10393f11bf864cf44ddd7556aa0eabb92 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Avoid cast from ASCII to QStringUlf Hermann2020-02-201-2/+2
| | | | | | | | | | | | | | The previous attempt to fix this was lost in a merge resolution. Change-Id: I0638c434543d231352c44687b06bf429b7be7a04 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QV4Engine: Avoid memory leak in toVariant conversionFabian Kosmale2020-02-201-1/+5
| | | | | | | | | | Change-Id: I2c713fd759ac40aaaac0c0943edb993d3e27686b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Inline component: Avoid even more leaksFabian Kosmale2020-02-201-0/+2
| | | | | | | | | | | | | | Amends d4f3445bb050bbc34f0e86832fca9b7047041c1e Change-Id: I1071577529c2db6937affb3fd3087fec75917e8a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Inline components: do not leak contextFabian Kosmale2020-02-201-1/+4
| | | | | | | | | | Change-Id: Ic738f3ea8f91cf2ffc7fb86ad9f72c0d630b6de8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Doc: Fix documentation warnings for Qt QMLTopi Reinio2020-02-208-25/+27
| | | | | | | | | | | | Fixes: QTBUG-82313 Change-Id: I7c2f30411ab8011254d7c232c87cb12a39761bda Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: Fix the qmltypes format documentationUlf Hermann2020-02-201-17/+26
| | | | | | | | | | | | | | | | | | | | | | The case of plain element name without URI is highly atypical and should not be advertised to end users. Also, stress that minor versions and revisions should match and that you should use the QML_* macros to register types. Task-number: QTBUG-81615 Change-Id: I1fd89c708ef8c33cbe44bacb3b37f25661eb3d1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Doc: Fix imports documentationUlf Hermann2020-02-201-6/+6
| | | | | | | | | | | | | | | | We promote QML_ELEMENT and QML_NAMED_ELEMENT() ways to declare types, rather than qmlRegisterType(). Change-Id: I78d64a0ab4412499815da8c0f71bea6dc5dd0b93 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-201-1/+4
|\| | | | | | | Change-Id: I024445b3401a57040d7d67780ea32d2f8b02f41a
| * Windows: Do look for <plugin>d.dll as a fallbackKai Koehne2020-02-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Do look for d.dll as name of the library, even if Qt was built in release mode. This mitigates the change we did in Qt 5.14.0, where we switched the way our MinGW builds are configured from -debug-and-release to -debug -force-debug-info. But it is also more consisten in how we handle the release build, and macOS dylib loading. Fixes: QTBUG-81021 Change-Id: I73cd11941d86a732b92a3479d47b6e83a839994f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | ResolvedList: attempt read from correct meta objectFabian Kosmale2020-02-191-5/+42
| | | | | | | | | | | | | | Fixes: QTBUG-82171 Change-Id: If14b10d703aa1b69cd697024ada2fae0453103d7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>