| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the app expands a row in TreeView, that row will for a brief moment
be expanded in the proxy model, but not in the view, until the
view is polished. For that reason, when determining if a row can be
expanded or not, we should check the state of the proxy model, and
not the view.
Note: if the application needs the state of the view to reflect the
state of the proxy model immediataly after a call to expand,
forcePolish() is always possible.
Task-number: QTBUG-91374
Change-Id: Ibda8d90e2dc2077a6f24090566ce3ba20a734c29
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Ic74cd899c839efeb842a2c267f628783f8a0689a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Building TreeView with cmake is completely broken in Qt 6.3. To fix
this, use qt_internal_add_qml_module instead of qt_add_qml_module
to ensure that the module installs into Qt rather than the
build dir.
Change-Id: Ib103c8ec1b8d3be12463b2edaf1a92b877068151
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both QtQuick and QtQuick.TreeView exports a TreeView
item in Qt 6.3. In order to avoid conflict, all usage
of the marketplace version in Qt 6.3 will need to either:
1. import it into a namespace
2. use TreeViewTemplate instead of TreeView as a prefix for enums
3. Create a custom subclass of TreeViewTemplate that is
named something else than "TreeView" (e.g "CustomTreeView").
Change-Id: I74f04eea4e279ccbef713b1894d9fb09cbd94dc8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
| |
Some functions in the private class QQuickTableViewPrivate has
changed in Qt 6.3 to be virtual. Update qquicktreeview so that
it takes these changes into account when building with Qt 6.3.
Change-Id: I81c78d3f16da36d9859031ac28434987981d99f1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
| |
Change-Id: I3fc757a331d59df3e5317b30f30622798713f173
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When the source model changes layout, the proxy model
will change layout as well. Hence, we also need to
emit that the layout for the proxy model has changed
so that TableView will do a relayout.
Fixes: QTBUG-97579
Change-Id: I0dac30c9c909b915f47f701726702d53c91134b5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a test that verifies that you can expand and
collapse nodes in the treeview, and that we end
up with the expected number of rows.
Task-number: QTEXT-12
Change-Id: I2d287d8fe868b49d89e226a1b5f492a9abfe2f8d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a test that verifies that if we add new rows to the
model, TreeView will update correctly and show all the
rows as expected.
Task-number: QTEXT-12
Change-Id: Ic03d52388c3ca89eef44be029c1c83674bbfe3fe
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
As it stood, we would never update attached properties when
the underlying model data changed. The effect would be that
properties like depth and hasChildren would not change in
the view when it changed in the model.
Fixes: QTEXT-6
Change-Id: I310a8b08dda8909d238d328e01b5ec1100508839
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
| |
Change-Id: Ied81773b8ca094a187d8416f99f897047bf00f33
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: If6dc11437491b487a1c5beba9257b58ecd22ea45
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
| |
Change-Id: I265ddebbb7f5f28f16b9d41296c043e63374d5d0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
| |
This only needs to be done on the qmake side as cmake will generate
this for us automatically.
Change-Id: I6976729dc9d522ca42ebf653ddfd4d6ec08e5cb6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The symbol in this case is doing the registration, but without a
reference to it, then it will be lost by the linker, so we need
to make sure we have an explicit one to it.
Fixes: QTEXT-5
Change-Id: I4cb2d40b2949ad6affb715baaeac30146232e567
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- opt out of deprecated internal functions
- port deprecated API to newer equivalent
- use new QML CMake API
Additionally, disable the Qt 6 check: By using REQUIRED in find_package,
cmake will abort if no suitable Qt 6 version can be found. The old check
would instead get confused if there was a Qt 5 qmake in the path, even
when a perfectly suitable Qt 6 were too exist somewhere else.
Change-Id: I3f2658836f13f607757a4609a121a00159e6f140
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
At start-up, m_currentIndex is not yet set. So if the
app tries to access e.g currentItem, it will cause an
assert to happen in QQuickTableView.
This patch will do some extra checking to avoid this.
Fixes: QTBUG-93843
Change-Id: I461fa5a90d822a65795acabe36c18afa38f4810d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler warns about the code returning a reference from
rootIndex(). As there seems to be no good reason why we
should return a reference in this case, return a value
instead.
Fixes: QTBUG-93593
Change-Id: I9eb2dbd95917d28397e648b71c16fc709ab0b429
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Also includes how to build the examples
Change-Id: I094071168ccef0990d4d6216a9fa7b6ee55c9004
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CustomTreeView doesn't inherit from TreeView, but from
TreeViewTemplate. So you cannot assign CustomTreeView
to a TreeView pointer.
This patch changes the type from TreeView to CustomTreeView
to fix a run-time warning about this.
Fixes: QTEXT-2
Change-Id: I230ac6412cf9b205741c57f6b62f9e2e751d7799
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
| |
Change-Id: I317bad2da6ad7ea60c7a32b2c27a1c4a0ec7cce7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Only stop keypress propagation if TreeView uses the key.
Otherwise, forward the event to the parent. This will
ensure that TreeView don't stop Keys.onPressed handlers in
anchestor items from working correctly.
Fixes: QTBUG-92517
Change-Id: I6d7ea4062bbb9eef4a64aa6bd18ff29696352dcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
We need to check that the view has items loaded before we call
functions like "leftColumn()". Otherwise the application will
crash.
Change-Id: I8421f11c3b12527f3ee923f21c3ccf20e171d1f0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If9fcde221d5de7302e62b314be34e5311bd3efae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
This also extends and fixes the test so that it tests this case
and works with Qt 5.15.x as well as Qt 6.x
Change-Id: I731c8568a2c6279441a78558808dc7a8906f0763
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I7d1b331c325cfbbdf020ee60c37f172b1dae2b07
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When adding a HoverHandler to a TreeView/Flickable,
it will actually end up as a child of the contentItem.
The problem then is that the contentItem of a
TreeView/TableView has a size that is an estimate of the
actual size of the table. The result is that the
HoverHandler will not cover the exact size of the table,
but an estimated size, and therefore not work as expected.
The solution is to add HoverHandlers directly
to the delegates instead.
Fixes: QTBUG-91745
Change-Id: Iac0c0d289379060e4e82c64c1212a3143ae73cf7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for users of TreeView to be able to access properties
from TableView that are revisioned for 6.0, we need to do
the following:
- Bump the version of TreeView to be 6.0
- Add a struct with QML_FOREIGN that helps the QML
engine to resolve the properties.
Task-number: QTBUG-91706
Change-Id: Ia3e448f6c24d24e4e21a91921e08939fff9e5f7b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
TreeView.view was never set in qquicktreeview.cpp. This
patch will ensure that we do.
Change-Id: I43eee26555a656de3d15a768fe004db2d912d19d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This patch will add the boilerplate code for writing auto tests.
In addition to the QTestLib code, it contains a QAIM (TestModel)
that implements a tree, as well as a QML file with a TreeView that
uses it.
Change-Id: I1810e12ed34f71083fac159bbb87701c46184a6c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The treemodeladaptor stores a list of nodes in the
tree that should be expanded (m_itemsToExpand) upon
the next call to expandPendingRows(). As it stood, this
list would be populated with pointers to items inside
another list (m_items). But this strategy is not safe.
As soon as you insert other items into m_items, the
address of the pointers stored in m_itemsToExpand would
be pointing to some other random location. And this
happens quite frequently. By luck, this memory corruption
did every now and then cause an assert to trigger.
This patch will ensure that we don't store raw pointers
to items inside a list. Instead we store a copy of
the little TreeItem struct.
Fixes: QTBUG-91067
Change-Id: Idf616d7eeb3ac2b8db23a1e4e6f05a7ccd2808cf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use the pro2cmake script found in Qt 6 to generate
cmake files for TreeView. That scripts is not available
in Qt 5, together with important functions like "qt_build_repo"
and "qt_add_qml_module".
Rather than investing a lot of time to support building
TreeView with cmake and Qt 5, just inform that we only
support building it with qmake for that version.
Change-Id: Iae1a91de5e6cb10bb518ee21f9bcccdbff6c8561
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|
|
|
|
| |
Change-Id: I47e7972bd2853608239a831586ba304573a7aef5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I8dae2b8e1d0b2c063d1d4fb0f0b39af83573e715
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: Ic7a9e19c9cc6acc5d43965d51c2296bff6d7db3a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
| |
Change-Id: Id857e8584ce782e1438270e963788cbadf2e5c43
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use header.GPL3-MARKETPLACE-QT which must be used in marketplace
components
Change-Id: Idf5bb061b0724f4bc0f691586eb74e839fe0ad37
Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I722f4d534bd058d4358a84f9e5dd36c322f4a123
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Update the license headers of the source files (excluding
examples and tests) to use the Marketplace version.
The first patch was missing two files. This patch will
update those as well.
Change-Id: I73f6689bc739e06d5c48d7e4a8f444954fc6469f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Update the license headers of the source files (excluding
examples and tests) to use the Marketplace version.
Fixes: QTBUG-85354
Change-Id: Ic06e8300f2744bd71a3294c506d9b2e6259f499d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
| |
Change-Id: Ic2e24da36e72c94aa3192aabd10858e3a79658ef
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
| |
Some examples uses QFileSystemModel, which is a part of widgets.
Change-Id: Id52940410273dfdeceaf027aa9fa71da8e8606ba
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
|
| |
Qdoc by default assumes the qhp filename is
same as the qhp.projects name in lower case.
Change-Id: Ic7ffef901352fdc46afe94316c23989c061015b9
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
| |
Change-Id: Iabef91ca8404e33b8b3818e98cfa1d9ff5f175e9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I1f7214bf6ea9ce6e006ed30f7ee7bf36d3de3e39
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
| |
Add missing QT_END_NAMESPACE
Change-Id: Ife419dc5a28436ab3585084bdb6635a0973ad92c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
Change-Id: Id45430e88f4e34117ccb727537c697f356f25c37
|