-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calls order of q_invokable method #10
Open
rjcamatos
wants to merge
10,000
commits into
6.2
Choose a base branch
from
dev
base: 6.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+912,078
−249,769
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qtprojectorg
pushed a commit
that referenced
this pull request
Dec 8, 2023
Using std::binary_search has the requirement that the passed range fulfils ordering requirements, which was not the case for the cppKeywords array here. As the QString doc says [1]: > QStrings can be compared using overloaded operators such as operator<(), > operator<=(), operator==(), operator>=(), and so on. Note that > the comparison is based exclusively on the numeric Unicode > values of the characters. It is very fast, but is not what a > human would expect; (...) Therefore, sort the array accordingly and add an assert to ensure it will remain sorted. Fixes an crash/assert when building qtdeclarative with CXXFLAGS='-D_GLIBCXX_DEBUG': /usr/include/c++/13/bits/stl_algo.h:2243: In function: bool std::binary_search(_FIter, _FIter, const _Tp&) [with _FIter = const QString*; _Tp = QStringView] Error: elements in iterator range [first, last) are not partitioned by the value __val. Objects involved in the operation: iterator "first" @ 0x7ffc4a2c4f18 { type = QString const* (constant iterator); } iterator "last" @ 0x7ffc4a2c4f10 { type = QString const* (constant iterator); } Aborted (core dumped) ninja: build stopped: subcommand failed. GDB backtrace: Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: No such file or directory. (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 #1 0x00007f307e0a815f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78 #2 0x00007f307e05a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007f307e0444b2 in __GI_abort () at ./stdlib/abort.c:79 #4 0x00007f307e2a300d in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00005639ff90471d in std::binary_search<QString const*, QStringView> (__first=0x5639ffa1a9c0 <QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>, __last=0x5639ffa1b2c0 <guard variable for QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>, __val=...) at /usr/include/c++/13/bits/stl_algo.h:2243 #6 0x00005639ff8fb837 in operator() (__closure=0x7ffc4a2c52bf, word=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:764 #7 0x00005639ff8fb89e in operator() (__closure=0x7ffc4a2c52a0, name=..., errorPrefix=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:768 #8 0x00005639ff8fc99b in QmltcVisitor::checkForNamingCollisionsWithCpp (this=0x7ffc4a2c6070, type=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:787 #9 0x00005639ff8f9dea in QmltcVisitor::endVisit (this=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:341 #10 0x00007f307f6636fa in QQmlJS::AST::UiProgram::accept0 (this=0x563a002e0628, visitor=0x7ffc4a2c6070) at /home/michi/development/git/qt5/qtdeclarative/src/qml/parser/qqmljsast.cpp:1193 #11 0x00007f3080159b8f in QQmlJS::AST::Node::accept (this=0x563a002e0628, visitor=0x7ffc4a2c6070) at /home/michi/development/git/qt5/qtbase/include/QtQml/6.7.0/QtQml/private/../../../../../../qtdeclarative/src/qml/parser/qqmljsast_p.h:272 #12 0x00007f3080212f4b in QQmlJSTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:173 #13 0x00005639ff8f0bd3 in QmltcTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltctyperesolver.cpp:19 #14 0x00005639ff8c02d4 in main (argc=23, argv=0x7ffc4a2c7a68) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/main.cpp:269 [1] https://doc.qt.io/qt-6/qstring.html#comparing-strings Change-Id: I82ebbcdca4ab90155b935f9af24b3a3821134563 Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
The build for auto tests for VxWorks fails because Qt::Qml is not added before Qt::QmlPrivate resulting in many unresolved symbols from Qt::Qml library. When Qt::Qml is added before it solves this problem. Task-number: QTBUG-129113 Change-Id: I89d553ac1d6706e2e934665fed2f308e6b01ed78 Reviewed-by: Ulf Hermann <[email protected]>
- Replace mention of deprecated currentFile(s) with selectedFile(s). - Mention currentFolder. Pick-to: 6.5 6.8 Change-Id: Ib7a414cba7a6f8e479159afc9ed50b014f93442c Reviewed-by: Oliver Eftevaag <[email protected]>
It crashes on the CI. Change-Id: I6e9c14364e34d9934c0b75e6f5ddb5fd3034ec09 Reviewed-by: Fabian Kosmale <[email protected]>
Due to the changes to the meta-object data generation, we no longer can query the array size as we could before. Instead, compute the generated data again, and query the std::array's size. Change-Id: Icf8e60419ecf48146465016a578bb5be55b0ae69 Reviewed-by: Ulf Hermann <[email protected]>
Since 518fa1baf7bbc93b80567691d682ae64032fde76 in qtbase, QMetaMethod::name returns a QByteArray containing a copy of the data from the metaobject for dynamic meta-objects. This breaks append, which assumed that the pointer returned from the byte array would be fine even after the byte array is gone out of scope. Use the newly introduced nameView instead, which does return a view to the original data (which lives long enough). Task-number: QTBUG-129737 Change-Id: Icc9381a520e031f7095600ade23644efcbcee028 Reviewed-by: Ulf Hermann <[email protected]>
Change-Id: I8a96935cf6c742259c9dfffd17ea2bc4f44d80c6 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
To get the submodule update going again. There seem to be multiple issuess, and a working solution has eluded us so far. Reopens: QTBUG-129947 Task-number: QTBUG-129947 Change-Id: I882d45ff7dcc2ba31bc5b3de3794c8345de8318b Reviewed-by: Ulf Hermann <[email protected]>
Change-Id: I121fee53a0d4d7b87efcefec59ea32ce47cf6365 Reviewed-by: Qt Submodule Update Bot <[email protected]>
If we are handling an expose event the system is expecting us to produce a frame that it can present on screen to the user. Advancing animations directly in polishAndSynct might result in changing properties of the window in a way that invalidates the current frame, for example the size of the window. This might result in the discarding of the current frame before the user ever sees it, either because the frame size is different than the window, so it's determined to be no longer valid, or because the system never gets a chance to present the frame because it starts another round of expose events. To give the system a chance to present the current frame we defer the advance of the animations until the start of the next event loop pass, which should still give plenty of time to compute the new render state before the next expose event or update request. We limit this approach for Apple operating systems for now, so that we can pick it to 6.8. It will possibly be extended to other platforms later on. As the window can go away while we wait for the next event loop pass, and even as part of advancing animations, we guard the window with a QPointer. Pick-to: 6.8 Fixes: QTBUG-129839 Change-Id: I32089599a8b6ba5c7177a92ff791f80e2812ffd8 Reviewed-by: Fabian Kosmale <[email protected]>
Useful for exposing margins to QML. Pick-to: 6.8 Change-Id: Idf633d0659bb515c231e06e7a04b81508b7d7765 Reviewed-by: Ulf Hermann <[email protected]>
Works with Fusion, iOS, and FluentWin3 styles. Should also work with macOS and ideally Basic, but those styles do not respect the global palette yet. So disable the row with the color scheme selection check boxes unless we know it works. The color scheme setting is not stored across sessions, and is instead applied "live". Task-number: QTBUG-124490 Change-Id: If6bec56884e6dc9093d541fc87800596aa1b9ca3 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Mitch Curtis <[email protected]>
We're not interested in any actual signals there, we just want to keep the counts intact. Amends commit 5893b98 Change-Id: Ie1087e5a9381592d4d3a24677e88887a50e3896f Reviewed-by: Fabian Kosmale <[email protected]>
You can continue scrolling the main list with the mouse wheel even after reaching the end of the nested list. When using a trackpad, behavior is now the same. Added tst_qquickflickable::nestedSameDirectionTrackpad. nestedSameDirection.qml or the example from QTBUG-126514 is suitable for manual testing. Since we add a custom QPointingDevice to simulate a trackpad, use it in nestedTrackpad() too, for better realism. Fixes: QTBUG-124478 Pick-to: 6.5 6.7 6.8 Change-Id: I9b9c9a41afcfa5d950093a31682013ae9e917f1a Reviewed-by: Oliver Eftevaag <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
DocumentSymbols should work on the valid document. Also, we might get invalid file, so we should check the validity of qml dom file item before dereferencing it. This happens although we check the validity of a file in the language server module before processing the request. This is probably caused by a synchronization problem on editing the file and creating the dom for that file. This should be further investigated with QTBUG-121171. Change-Id: I4a2582210deb8da78ee1400a9f2f3c84b3ecbbae Reviewed-by: Sami Shalayel <[email protected]>
Add a new IdentifierType called "NotAnIdentifier" which is used by resolveExpressionType() for expressions, and use it when resolving the type of callexpressions. This fixes the recursive call of resolveExpressionType() when processing `Qt.point().x` for example, as it now returns something when resolving the left hand side `Qt.point()`. This allows completion to suggest stuff after `Qt.point().`. Pick-to: 6.8 Fixes: QTBUG-127776 Change-Id: I3cbee987c0677eb6d2b90fab44e982c49d0dd4fa Reviewed-by: Ulf Hermann <[email protected]>
Add sourcelocation to properties defined in QML, such that tools like qmllint have a valid sourcelocation they can issue warnings on. Fix the warnings: * "Cannot deduce type of alias", * "Cannot resolve alias" * "Alias is part of an alias cycle" to use the new sourcelocation. Also adapt the tests to the new sourcelocations. Fixes: QTBUG-128932 Pick-to: 6.8 Change-Id: Iec434324af1244c6952f0d5afc8a42f569a750e4 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
Make the link to "Known Limitation" point to qmlls instead of the unrelated qmltc's documentation page. Pick-to: 6.8 Change-Id: I1714fd35c11922326bf6912a82eef8a2fedf9baf Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
...in preparation of trimming down includes in QQuickItem. As a drive-by, remove the superfluous qqml.h include from quick/items/qquicktextutil_p.h. Change-Id: I7ee0f459bcbfdfe07314d1f63433aaa8639870ac Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
If we have an import namespace, QQmlTypeNameCache::isValid will always return true; what we want to check instead is whether the type is valid, or whether we need to query the namespace. Amends a363aa3. Pick-to: 6.5 6.8 Fixes: QTBUG-118879 Change-Id: Iaa9db015979c9454662c6fbcd691dbfb03a3d053 Reviewed-by: Ulf Hermann <[email protected]>
Otherwise in a shared build, a qml module marked as STATIC will produce a static backing library and a dynamic qml plugin, which is not something one usually expects, and can also lead to duplicate symbol issues. One such case was the QmlAssetDownloader qml module, which for a macOS build ended up installing a libQt6QmlAssetDownloader.a together with a libqmlassetdownloaderplugin.dylib , where the latter should have also been a static library. Pick-to: 6.8 Change-Id: If5e5c941cde49e7f2050b6a28b9db207dcddf771 Reviewed-by: Alexey Edelev <[email protected]>
While the C++ standard says that different functions need to have unique addresses, some compilers have take substantial liberties with that rule. This means we can't actually rely on the addresses of our different lookup functions to differ and therefore we cannot use them as discriminator. Introduce an enumeration for all the different lookups and use that instead. Now we can also drop all the purely redirecting methods we've introduced just to have different addresses. Change-Id: Ifa68c27c0d2fef4084893a19227dab21bd948dfd Reviewed-by: Fabian Kosmale <[email protected]>
Duplicating all the lookup enum values is quite messy. The extra flag has the added benefit that the lookup functions themselves will not touch it. Change-Id: I9c2d4202c30a996f226b5762b6a6528bf4328f52 Reviewed-by: Olivier De Cannière <[email protected]>
We never need global types for those. The size of a list is a property of that list, for list values we have a separate content variant, as well as for list iterators. In order to determine whether something is a list, we can query the type itself directly. Task-number: QTBUG-124670 Change-Id: I7a81571b42cd0ec3662a4362c6caf98b22c9ebb1 Reviewed-by: Olivier De Cannière <[email protected]>
We can use it for JavaScript local and global scopes, too. To this end, check for the actual QML scope object where we want that one. Task-number: QTBUG-124670 Change-Id: I908a4f122a83d6685129cb24959353a1169faae0 Reviewed-by: Olivier De Cannière <[email protected]>
It doesn't have to be JavaScript-specific. QML scopes also have parent scopes that, in theory, we can retrieve and use. (we don't, for a reason, but that reason doesn't have to be part of the name) A scoped value is generally regarded as a "Property" of the scope, and we can extend this meaning to JavaScript function or lexical scopes. This makes the JavaScriptObject content variant obsolete. Task-number: QTBUG-124670 Change-Id: I728f066461c000a0f2391f8604bd38853806adc0 Reviewed-by: Olivier De Cannière <[email protected]>
We don't track JavaScript scopes. Therefore we don't know what scope the local would be a property of. However, we do know that we know nothing about the type. Therefore we can say it's QJSValue. And we do know that it's supposed to be a property. Task-number: QTBUG-124670 Change-Id: Ic0656054aa9c685831eb993f990caeda90b878a7 Reviewed-by: Olivier De Cannière <[email protected]>
There is only one actual JavaScript global object. That one has properties and it does not need its own content variant. Task-number: QTBUG-124670 Change-Id: I3d49a0f9d66530b83fa7851c23019c703bf18bc2 Reviewed-by: Olivier De Cannière <[email protected]>
We don't need them anymore since we have better representations for all their uses now. Adjust two occurrences that were forgotten in earlier changes. Task-number: QTBUG-124670 Change-Id: I151486cea383f90f64cce9c3e655f3a014eccd9c Reviewed-by: Olivier De Cannière <[email protected]>
It uses QtQuick types in C++. For that to transpire to QML tooling we need to declare a dependency. Pick-to: 6.8 Change-Id: Icede50c638428062f392351ba590cf0f8f2740ee Reviewed-by: Fabian Kosmale <[email protected]>
With SetLookup there is always the possibility of causing a reset by passing undefined. That's why we need to wrap the argument into QVariant most of the time. SetValueLookup didn't take this into account, which resulted in invalid code. The test also reveals that a number of cases were generating different errors depending on whether the code was run in interpreted or compiled mode. Align those. Pick-to: 6.8 Task-number: QTBUG-127174 Change-Id: I88f45977dcd0eeba8aaf580663d4b85b8bb26f72 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
Overlays are positioned so that they are centered over the content item within the window. If the window has a null-size when this is computed, then the overlay ends up being misplaced, and overlay-provided services, such as modality or closing popups, stops working for parts of the UI. Fix this by resizing the offscreen window before resizing the content item. Add a second test case that verifies that the overlay geometry is as it should be, both after the initial show, and after resizing the widget. The existing resizeOverlay test doesn't use a proper QQuickOverlay, so it doesn't cover all the relevant code. Fixes: QTBUG-125135 Pick-to: 6.8 6.5 Change-Id: I682d87f07051d213d3bd58c1c2533c84b50a3139 Reviewed-by: Mitch Curtis <[email protected]>
QmlLive has not been ported to Qt 6 and is not expected to be available, all mentions of QmlLive have been removed from the Qt 6 documentation Fixes: QTBUG-131406 Change-Id: Ib280eebf014040ac5864087ee10252a6f0ceddbd Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
Similar to 8d454b2 and f7dffe0. Pick-to: 6.5 6.8 Change-Id: Iaf9a4edc8a3c37f232ad3b66923864f4baa02d4d Reviewed-by: Oliver Eftevaag <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
This can be useful for QQuickRhiItem subclasses with PIMPL. Change-Id: I874333adcd688d3e38eb2c1d6013a9d1d4c9cc00 Reviewed-by: Laszlo Agocs <[email protected]>
For some reason, the argument count is called argv and the argument values are stored in argc. That should probably be the other way around. Change-Id: I60361cc6d84cefb9599ea349a40e77c5eaf0c581 Reviewed-by: Fabian Kosmale <[email protected]>
The other transformations that previously used castTo() are better phrased as conversions rather than casts. Task-number: QTBUG-124670 Change-Id: I3cf885edcac6fa665a6ad12b97f6d063709a1632 Reviewed-by: Olivier De Cannière <[email protected]>
Define a pair of lookup methods for this and generate code that uses them. Write back after calling a non-const method. Task-number: QTBUG-127174 Change-Id: I6de22e76b63390fd7159d9c14ea2c908d961ec97 Reviewed-by: Olivier De Cannière <[email protected]>
We now call the toUpper/toLower function for the correct locale. It fixes the case of the Turkish uppercase i is İ not I. Fixes: QTBUG-112898 Change-Id: Ibd0174656e0aa561747490f3e6d52c639bd06b63 Reviewed-by: Ulf Hermann <[email protected]>
It returns a bool. You can tunnel a bool through ReturnedValue but that's quite wrong. Change-Id: I6cf618a71e3a0fb393c2ea3086a8a029b8178ffe Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
Change-Id: I7c1db388f4906cd98c7c883ae204d55e3b702142 Reviewed-by: Fabian Kosmale <[email protected]>
Once we have handled them, we need to remove them from the list of reader locations. Task-number: QTBUG-124670 Change-Id: Ibe08a86a497c42fcca1d246d38e68e73e9a98fe5 Reviewed-by: Olivier De Cannière <[email protected]>
QQuickLayoutItemProxyAttachedData that is associated with the target item will be destroyed when there are no proxies controlling it any more. We therefore need to reset the "QQuickLayoutItemProxyAttachedData" property that keeps a reference to the QQuickLayoutItemProxyAttachedData instance Pick-to: 6.8 6.7 Task-number: QTBUG-126794 Change-Id: I1fb404512f079aa7a6b70b0e724624a17530d7f1 Reviewed-by: Matthias Rauter <[email protected]>
This is probably impossible to trigger since any realistic operation converts numeric types to JavaScript Number. However, we should rather be safe than sorry. Amends commit 372db48. Pick-to: 6.8 Change-Id: Ifea57f10728a3bf9461ad5067d1db2b6902e80a7 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
This is a major departure from the previous architecture. We can now alter a QQmlJSRegisterContentPrivate after it has been created. This is fundamentally necessary so that we can add further links to other types as they are discovered. With an immutable QQmlJSRegisterContentPrivate we have to clone every time which makes for long and rather meaningless chains of links that are hard to navigate, eventually. Making the register content non-const will in turn allow us to uphold the immutability of QQmlJSScope. That is much more important because it can fundamentally be used across different compilations. Task-number: QTBUG-124670 Change-Id: Iacee705be3260da0a2bc91c6758f91c70a137065 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
Change-Id: I60d1a475ba0c22f789c3412e58a9ecbe54dc9adf Reviewed-by: Shawn Rutledge <[email protected]>
… resizes 7b282e9 introduced a macOS specific mechanism to defer frame triggering on the render thread without synchronising with the main thread. It has now been moved to a more generic place to allow support from more platforms. Change-Id: Ie0d111e294dbe7d06ec6dfd8148fac1fae76cfab Reviewed-by: Tor Arne Vestbø <[email protected]>
This commit fixes the code snippets in the Run-Time Style Selection section of the Styling Qt Quick Controls article. Fixes: QTBUG-112453 Pick-to: 6.8 Change-Id: I522f9731214278467e1aa45a156a10f189ec1f1a Reviewed-by: Mitch Curtis <[email protected]>
51ccfc0b32f3d69340bf82de4e7624c9e27b35bd enabled Xdoclint:all. That caused errors in submodule depedency round. This patch fixes the errors. Fixes: QTBUG-131594 Change-Id: Ie7af71c6dfebb203dbe2c51a6e5204a9eb5f52bd Reviewed-by: Assam Boudjelthia <[email protected]>
Change-Id: I396f19fdc40d972448b85456d173dc61a9e6fb38 Reviewed-by: Qt Submodule Update Bot <[email protected]>
Due to the same problem as described in 98d4a44, qml tests fail to execute properly without qmltest tool on VxWorks, which is run on qemu as well as QNX. Fix this by excluding VxWorks from platforms for which qmltests are built and run. Task-number: QTBUG-100202 Change-Id: I87019405ce9aa5eb87d660887033bef17ef40a1f Reviewed-by: Alexey Edelev <[email protected]>
…erride The interface for how QQuickImageBase and QQuickImage handles loading of the image is via the virtual QQuickImageBase::load() function. For some reason QQuickIconImage was using its own updateIcon() callback for the same use-case, which was causing issues. For example, when updateIcon triggered a pixmapChange we would update the fill mode, but doing so via QQuickImage::setFillMode() would trigger load(), which in turn ended up in QQuickImageBase::loadEmptyUrl(), because the way we load icons is not based on QQuickImageBasePrivate::url being set. We now implement the icon loading in a QQuickIconImage::load() override, which also lets us remove some of the manual updates we had in response to e.g. the DPR changing. A small tweak to QQuickImageBase::itemChange is needed, since it can't assume that a DPR shouldn't trigger a load() just because the URL is empty. Change-Id: I6dea4bd23bb2c0b69ba5dbe2dbf7f95655aa406b Reviewed-by: Mitch Curtis <[email protected]>
We need to be able to look them up in the type registry in order to locate the inline components. Pick-to: 6.8 Fixes: QTBUG-131394 Change-Id: I86a615ffab1ffcc1262ca0f282ad4893366d4654 Reviewed-by: Fabian Kosmale <[email protected]>
This patch introduces TableViewDelegate to the Controls module. Key features: - Ready-made delegate assignable to TableView - Handles table drawing using predefined styles - Usable without customization - Implements all required properties set by TableView - Provides API for changing background and label Test Suite: - Verifies TableViewDelegate properties and functionalities - Tests include: - Verification of selected, current, and content text properties - Validation of selection behavior and item clicking BLACKLISTing two tests (dragToSelect and pressAndHoldToSelect), which will be removed from the BLACKLIST in the next patch (to fix cell selection on the Android platform). Implementation derived from TreeViewDelegate, adapted for TableView use. TreeViewDelegate patch: 0ddb0d4 [ChangeLog][Controls] New delegate added: TableViewDelegate Fixes: QTBUG-114636 Change-Id: Ibb8b0a7622016e0c6fd58d696e507e7bb76daced Reviewed-by: Mitch Curtis <[email protected]>
Flickable/ListView/TableView could sometimes pause (or lag) for almost a second if you dragged it in one direction, but then switched to drag it in the opposite direction (without lifting your finger). This was especially evident on iOS. It could be reproduced in, for example, the Gallery app (the controls-list in the drawer), or any other app with a Flickable. The reason this happened, was because a "reversed" drag would cause dx and dy to converge back to zero (compared to the starting point of the drag), which would result in overThreshold becoming false again. And since the deltas ended up below the threshold, the content item stopped moving. The biggest reason for this problem was because we reevaluated the drag threshold for each subsequent drag in an ongoing flicking session. This has already been fixed in a previous patch. This patch will in addition remove the related dx/dy != 0 checks because of the same reason; Once in dragging mode, the content item should always move, even if it was dragged exactly back to the starting point (dx/dy == 0). Fixes: QTBUG-129599 Pick-to: 6.8 Change-Id: I0af476903d537269458e2d2ee0d12a90e6dfd9c4 Reviewed-by: Shawn Rutledge <[email protected]>
Change-Id: I71729cca243bf8aaed76824ed76c549e2a9a8ecb Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
- call QFileSystemModel::setRootPath() to start populating it - singleton rather than context property - alternate-colored rows - TapHandler rather than MouseArea - required properties, qualified access etc. to satisfy qmllint - no need for QApplication in Qt 6 (QGuiApplication is fine) - make it buildable (how else would we know if it works?) Pick-to: 6.8 Task-number: QTBUG-131487 Change-Id: I8b42971a3ec4f3a2fd8cfadbb2de699c852783a0 Reviewed-by: Fabian Kosmale <[email protected]>
The SafeArea attached type provides information about the areas of an Item or Window where content may risk being overlapped by other UI elements, such as system title bars or status bars. This information can be used to lay out children of an item within the safe area of the item, while still allowing a background color or effect to span the entire item. The attached type also provides a writable property to add additional margins, which are reflected through the item's and any children's safe area margins. This is useful for informing child items about elements such as headers or footers, that may overlap the other child items. Task-number: QTBUG-125373 Change-Id: Id83e384f31f9770367c98e6455ec44e1086beb8a Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Mitch Curtis <[email protected]>
We want users to be able to attach SafeArea to Popups directly, without explicitly having to attach to the Popup's item. However QQuickSafeArea can't do that directly, as QQuickPopup lives in Qt Quick Controls. We solve this by introducing an interface for things that can have SafeAreas attached to them. Task-number: QTBUG-125373 Change-Id: I1610323132f318c855764b1c8759ce021218b4b4 Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
The issue was that the TableView was not selectable on the Android platform. This was due to `dynamic_cast<QQuickSelectable*>(QQuickTableViewPrivate*)` returning null, which prevented the QQuickSelectionRectangle's DragHandler (responsible for selecting cells by dragging) from being added to the TableView. Since dynamic_cast is not fully supported on Android, it fails sometimes (returns null instead of performing the cast), when interface types lack a key function (a non-inline and non-pure virtual function). To resolve this, we need at least one key function. References: * https://developer.android.com/ndk/guides/cpp-support under "RTTI" section * https://developer.android.com/ndk/guides/common-problems under "RTTI/exceptions not working across library boundaries" section This patch adds a destructor (key function) for the QQuickSelectable type to address this issue. Additionally, related tests in TableViewDelegate and TreeViewDelegate have been removed from the BLACKLIST. Fixes: QTBUG-101159 Task-number: QTBUG-114636 Pick-to: 6.8 6.5 Change-Id: I91440b0b2f746e866d242d12fb20918a4830cd39 Reviewed-by: Richard Moe Gustavsen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If there are 2 or more methods with the same name but reciving diferent arguments the QJSEngine Pickup the First One declared.
Example:
methodxyz(string)
methodxyz(objptr*)
It picks up the first one passing as argument a string and not the one that i was expecting an object as it was send.