aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move legacy rendercontrol example into a subdirectoryLaszlo Agocs2020-03-2415-64/+71
| | | | | | | | | | | | | | ...called rendercontrol_opengl under examples/quick/rendercontrol. This example is going to be migrated to support operating with RHI-on-OpenGL later on. Additionally, we can this way introduce more rendercontrol examples in the future, for example to show how to do things with Vulkan, Metal, D3D. Task-number: QTBUG-78595 Change-Id: I7f5243b1f86e62949400107bf12bfa07b17b1031 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-03-241-2/+2
| | | | | Change-Id: I492272278c93488ec4ab921c3394929e684c183c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-2412-176/+438
|\ | | | | | | Change-Id: I9f0d5adf1ba7d3246b1107a20d145e7aac2c7a77
| * PropertyUpdater: Do not crash on invalid contextFabian Kosmale2020-03-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | If the context is gone, we assume that the object is currently torn down. Therefore we do not print an error message in that case. Fixes: QTBUG-82809 Change-Id: I74e5a4f41490ea9c13639c158a4d5fc0a52a38a4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> 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>
| * QQuickTableView: add private support for transposing the viewRichard Moe Gustavsen2020-03-232-13/+32
| | | | | | | | | | | | | | | | This is needed by HorizontalHeaderView when assigning it one dimensional models. Change-Id: I183f0d35b8f3a97853fc7496dc68b0e13e9be990 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Add autotest for QQuickRenderControlLaszlo Agocs2020-03-234-1/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's celebrate the feature's 6 year anniversary with introducing an autotest for it. Also happens to be good sample code for generating image sequences from animated Quick scenes driven by a custom animation driver. Tied to (direct) OpenGL at the moment. The RHIified version will appear eventually as the work for introducing RHI support in QQuickRenderControl progresses. Task-number: QTBUG-78595 Change-Id: I7294ce986dca9968407ae738afe7ed2640ecd103 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@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>
| * QQuickViewTestUtil: Don't leak on matchAgainst()Ulf Hermann2020-03-231-2/+16
| | | | | | | | | | | | | | | | QTest::toString() returns a bare pointer to a heap-allocated character array. We need to delete it. Change-Id: I5a5cf1054e582af21e784595c00646d5b4fc0b7f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * tst_qquicklistview: Fix a few memory leaksUlf Hermann2020-03-231-123/+75
| | | | | | | | | | Change-Id: I8bcd06ce79e1d6795a8249df6f72d4b583dbfa28 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQmlDelegateModel: Don't require a delegate to cancel an incubationUlf Hermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | | | It is actually not needed, and declining to cancel the incubation leaks memory. Change-Id: I478ed2a4eef34bd27c716762a2fced1e9091607c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlDelegateModel: On deletion, cancel any remaining incubationsUlf Hermann2020-03-231-2/+12
| | | | | | | | | | | | | | | | This fixes the memory leaks from the "x items in the process of being created at engine destruction" situation. Change-Id: I65fe278ead3d4de0cbddc075972a6774b231814f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_qquicklistview: Don't use QTest::toString()Ulf Hermann2020-03-201-25/+25
| | | | | | | | | | | | | | | | | | | | | | This construction leaks the resulting character array. You need to actually delete[] it. However, we can be pretty sure that there are no questionable characters in those strings. Therefore we can just use qPrintable instead. Change-Id: Ib863f0ed7db800680a44df534e3b46a4ba807798 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQuickView: Don't leak root object in error caseUlf Hermann2020-03-201-2/+4
| | | | | | | | | | | | Change-Id: I506c944fe3a472b3950d66167089054e91dd942c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQuickEvents: Delete pointer devices on shutdownUlf Hermann2020-03-231-10/+25
| | | | | | | | | | | | | | | | Letting them leak makes ASAN report false positives. Change-Id: I59dfcdffa380294cada9b79c11af0faaab38e3a0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Minor cleanup in QQmlJavaScriptExpressionSimon Hausmann2020-03-234-14/+13
| | | | | | | | | | | | | | | | | | | | We _can_ provide a default implementation for expressionIdentifier() - it doesn't have to be located in QQmlBinding as it only uses fields from QQmlJavaScriptExpression. Change-Id: Ifcead72c4f3ed4597cde732afca466eba83f5e0d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | StackLayout: add attached index, isCurrentItem, and layout propertiesMitch Curtis2020-03-233-18/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These properties are useful for items within StackLayout to get access to their index within it, especially when those items are declared in their own QML files. Similar API already exists for e.g. ListView and SwipeView. [ChangeLog][StackLayout] Added attached index, isCurrentItem, and layout properties. Change-Id: I648d4434ab21573b56edd9a0f8399463946fd571 Fixes: QTBUG-76999 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-03-231-2/+2
| | | | | | | | | | Change-Id: I2b900c0caad33b0f54c5ebf918ad5ea12f023ee5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Encapsulate QQmlContextDataUlf Hermann2020-03-2375-1432/+1812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | tst_qqmlpreview: Increase timeoutUlf Hermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | macOS does some interesting scheduling and takes up to 20s to generate those 10 frames. We're generous and allow for 30s. Change-Id: I1e2e8b5282f8e46cdf01e3501c83924d853c67a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add MatchRegularExpression flagLars Knoll2020-03-201-0/+1
| | | | | | | | | | | | | | | | This is there to stay consistent with C++, where MatchRegExp is deprecated and will in Qt6 be an alias to MatchRegularExpression. Change-Id: Ibbb0885dddebaba3464e93cc6a0d05e94c01f4e1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-2026-49/+174
|\| | | | | | | Change-Id: I6f320ea43b5837444226228c118e57c4bda8702a
| * qmllint: Break inheritance cyclesUlf Hermann2020-03-195-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Previously we would run into infinite loops on those. Mind that qmllint will reject a file called Window.qml that imports QtQuick.Window and then instantiates a Window {}. Such a thing is bad style. Task-number: QTBUG-82817 Change-Id: I6db82ca1794c3020dcb7d7e837fe44f72bca5029 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Doc: Add missing documentations of Window Type signalsNorihito Tohge2020-03-191-1/+84
| | | | | | | | | | | | | | | | Task-number: QTBUG-82705 Change-Id: I78a614c47a0f7d95b2a215d94e964c1202d89bcf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix copy-pasted typo minimimal -> minimalAllan Sandfeld Jensen2020-03-1813-39/+39
| | | | | | | | | | Change-Id: I4afef3fdbb9e3c3ec20ba5d00307992131b9ba3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
| * rhi: Enable layer updateTexture(), and so grabs, in the sync phaseLaszlo Agocs2020-03-186-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling updateTexture() from an updatePaintNode() implementation means we are still in the synchronization phase, with the render step (as in QQuickWindow::renderSceneGraph()) not started yet. Make sure the QRhiCommandBuffer is sent around early enough, so it is usable by QSGRhiLayer already during sync. There is no use case for this in Qt Quick itself since all standard items invoke updateTexture() from QSGNode::preprocess() (which is part of the render, not the sync, step), but Qt Quick 3D relies on this in Texture.sourceItem. This should fix the sourceitem manual test in Qt Quick 3D, so that it will not crash anymore when running with RHI enabled. Task-number: QTBUG-82927 Change-Id: I38adf512e49b1c6eef4730cd23663d351725d6cd Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-03-191-2/+2
| | | | | | | | | | Change-Id: Ibf330266f2aef4d68857caea5039f9e14d4aa986 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clean up QQmlFileSelectorUlf Hermann2020-03-196-21/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global static map of file selectors is not thread safe. If you add a file selector to engine A running in thread 1, you cannot at the same time retrieve the file selector of engine B running in thread 2. Alas, we only need the static map to discern file selectors from other URL interceptors, and we only need to do this on QQmlFileSelector::get(), which we don't use. Unfortunately it is public API, though. Deprecate QQmlFileSelector::get() and add a different hack to discern the interceptors for the case that it's still called. Also remove the duplicate setExtraSelectors() method. For this to work, we also add a method to QQmlApplicationEngine that allows us to pass extra file selectors and delay the initialization of QQmlApplicationEngine's QQmlFileSelector until the first file is loaded. [ChangeLog][QML] QQmlFileSelector::get() is deprecated. You can use the new method QQmlAplicationEngine::setExtraFileSelectors() to pass extra selectors to QQmlApplicationEngine's internal QQmlFileSelector. Manually created QQmlFileSelectors should be configured immediately after creation, before they are used by the QQmlEngine. Change-Id: Ia61a93777dc910b441a03ffb42d35a2a224c0e26 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-03-191-2/+2
| | | | | | | | | | Change-Id: I241886ecb71c0e28b6eee324df83578b68249eb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | fix developer build on clangFabian Kosmale2020-03-181-0/+1
| | | | | | | | | | Change-Id: I413cbce42d7405b17eff18293a68c2a26f30fd08 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlPropertyCache: Avoid costly string comparisonFabian Kosmale2020-03-182-14/+6
| | | | | | | | | | | | | | | | The qqmlecmacsript required changes, because the call to id makes the type now known to the QML engine. Change-Id: I73aed804ae8769c71676b44d8450e1dabf5baa6d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-03-1827-82/+249
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-1827-82/+249
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tools/qmllint/findunqualified.cpp Change-Id: I2593b5cc0db1d14e0c944aec4b88a80f46f5b0c1
| | * qmllint: Check for unknown types in JavaScript accessUlf Hermann2020-03-174-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are many incomplete qmltypes files around. We should not just crash on those. Task-number: QTBUG-82817 Change-Id: Ie072b80473927570c80fb2f9ae329de711c35904 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * qmllint: Don't crash on IDs that aren't scopesUlf Hermann2020-03-173-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, those can be qualifiers for imports, in which case we have to combine them with the next segment in order to find the type. Task-number: QTBUG-82817 Change-Id: I217a79572cd1e160dcbbcb9541c53941c81ab76c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Fix some network related deprecation warningsFabian Kosmale2020-03-163-4/+4
| | | | | | | | | | | | | | | Change-Id: I0e5e9e42b7c81e1fa5d6abde6bd6346dbc2f14ff Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * qmllint: Use fully qualified QML type names as superClassUlf Hermann2020-03-165-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise we miss subtleties such as Label vs. T.Label. Task-number: QTBUG-82817 Change-Id: Idc2131426b2fd96f279dab83292a348b9295d5c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * qmllint: Add QFont to the list of unknown builtinsUlf Hermann2020-03-163-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | And also check them when analyzing JavaScript access. Task-number: QTBUG-82817 Change-Id: I677e7883fb24ab80ff20d1998e2d7df440ef4112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Inline components: Abort if two IC's with same name existFabian Kosmale2020-03-164-0/+27
| | | | | | | | | | | | | | | Change-Id: Ic52fa388711a76d729ae28678932f4a150da9583 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Prefer Inline Components over any other imported nameFabian Kosmale2020-03-164-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Doc: Remove \contentspage commandsTopi Reinio2020-03-153-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Change-Id: I4a873359a8e795b8807371470b2da148a4077cbe Reviewed-by: Paul Wicking <paul.wicking@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>
| | * rhi: Make QSGRenderNode usable in Quick3Dv5.15.0-beta2Laszlo Agocs2020-03-113-41/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot just rely on a render() function, need a point where the "prepare" step can be performed, outside the main renderpass. Also enables proper m_useDepthBuffer handling for the RHI code path. Task-number: QTBUG-82797 Task-number: QTBUG-82793 Change-Id: I525228e53acefad9f2e6a33d446260a1521d8ae1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Store a QV4::ReturnedValue in QJSValueUlf Hermann2020-03-1831-642/+552
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being careful, we can now save primitive values inline. We use the heap pointer of QV4::Value as either QString* or QV4::Value* for complex types. We cannot store persistent managed QV4::Value without the double indirection as those need to be allocated in a special place. The generic QVariant case is not supported anymore. The only place where it was actually needed were the stream operators for QJSValue. Those were fundamentally broken: * A managed QJSValue saved and loaded from a stream was converted to a QVariant-type QJSValue * QVariant-type QJSValues were not callable, could not be objects or arrays, or any of the special types. * Cyclic references were forcibly broken when saving to a data stream. In general the support for saving and loading of managed types to/from a data stream was so abysmally bad that we don't lose much by dropping it. [ChangeLog][QML][Important Behavior Changes] When saving a QJSValue to a QDataStream only primitive values or strings will be retained. Support for objects and arrays was incomplete and unreliable already before. It cannot work correctly as we don't necessarily have a JavaScript heap when loading a QJSValue from a stream. Therefore, we don't have a proper place to keep any managed values. Using QVariant to keep them instead is a bad idea because QVariant cannot represent everything a QJSValue can contain. Fixes: QTBUG-75174 Change-Id: I75697670639bca8d4b1668763d7020c4cf871bda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Remove QRegExpValidator usagesLars Knoll2020-03-1814-136/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also means the RegExpValidator QML type will be gone. Use QRegularExpressionValidator instead. [ChangeLog][QtQuick][RegExpValidator] The RegExpValidator QML type has been removed. Use RegularExpressionValidator instead. Change-Id: If25fc5a258a669dfd28e705271757caa252ce05c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Also support partly specified versions in JS .importsUlf Hermann2020-03-184-38/+26
|/ / | | | | | | | | | | Task-number: QTBUG-71278 Change-Id: Ie3167d44780a192b5010052eea5192eee8c21c32 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | CMake: Remove testlogger.js from qmldirAlexandru Croitor2020-03-172-2/+1
| | | | | | | | | | | | | | | | Install it, without adding it as entry to the generated qmldir file. Change-Id: I0b63d4069767e2ad21afcf94741212d14ceb2745 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Handle QT_QML_SKIP_QMLDIR_ENTRY propertyAlexandru Croitor2020-03-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a new source file property QT_QML_SKIP_QMLDIR_ENTRY which tells the build system not to add the source file as an entry in the generated qmldir file. This is useful to mark a file for installation via qt6_target_qml_files without exposing it as a QML type (like a helper javascript file). Change-Id: I2aa595692bcbb65925635abc1b12519d1a45fe53 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>