| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp
Change-Id: I0b6018fdac65a5385136e4c3561fba1c52ecd32e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Property binding for row property in styleData causes an update which
tries to read new value for the index property, but index is changed
afterwards which causes old value to be read. This may lead to crashes
and other unwanted behavior.
Depth changes are now delivered to update item depths in visible
items and model index changes though role instead of looking for a row
change.
Task-number: QTBUG-47523
Change-Id: I540cd06a25281f18e4628f4b030cf969dc8e0a7f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is consistent with the classes that have already had this done.
It prevents clashes with Qt Quick Controls 2.
These classes are not available to the user, so it doesn't affect
compatibility.
Change-Id: Iee73ee6bc530182732ae95993e1f4fc3766eb8e0
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Update old header.LGPL3 to header.LGPL
Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|/
|
|
|
| |
Change-Id: Ieb9019b62696479a4e0317a590bceaeb30abf62c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: Ifec0f56816809abb90a294b8462391cb7e54c87d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the missing includes and helper functions to make the
QtQuickControls module compile on WinCE
Change-Id: I3c614de295c0db616543953a142d796e58a9a11c
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Gunnar Roth
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its purpose is the same as QAbstractItemView::rootIndex
and allows to display only the part of the model data that
is descendant of this index.
The filesystembrowser example has been updated to only show
files reachable from the user's home directory.
[ChangeLog][TreeView] Added rootIndex property
Change-Id: Ib8d9af4ce9d1f341ab509de3cc991773830ba9f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we keep track of the previous user-selected row,
it can happen that that row is no longer part of the
TreeModelAdaptor items if the user collapses it or
any of its ancestors (collapsing a node doesn't update
the current selection). This will result on the row
index pointing to the wrong entry in the model (or a
completely invalid one).
Instead, we now track the selection with QModelIndexes
making it more robust to branch expansion and collapse
in the view. We'll still need to account for model changes
which means that, in the future, we should invalidate
the previous user-selected item.
Change-Id: I54ba2582e65515eef95d5f8ad755a8c68568d7ad
Task-number: QTBUG-46891
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And warn the user about it. We omit printing anything else in
case we would be holding an invalid reference to some model.
Internally, we assert if, despite the guards, we still get
the wrong model indexes.
Change-Id: I8e7451375d19c2aa406257a9b0193d59f69b0355
Task-number: QTBUG-46214
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
They should not be needed anymore at this point of the
release. We also add an extra consistency check when no
model is set.
Change-Id: I59618c94bc24aa08d77bae96c5131ca129b36c11
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We make the model adaptor behave as if it had no model
set if the model gets deleted. Also, while not strictly
necessary, using a QPointer adds some extra safety.
Change-Id: Ic6963319678acee0097dcddfea36059f9046b093
Task-number: QTBUG-46214
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When removing or moving items, we may call lastChildIndex()
with an invalid index because we're not checking for childless
items which can be expanded (think about expanding an empty
directory). Same thing when relayouting an item.
The solution requires testing for the actual children count
since hasChildren() count return true even when the item has
no children.
Change-Id: I0fa6de41e20c6cb2433f8846449e9f1a2989ce91
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation doesn't emit the datachanged signal on the
hasChildren role during insertion or remove of rows. This could cause the
missing visualization of the expander images in the view. This happen
when a new row is inserted inside a leaf node or when a previously not leaf
node becomes a leaf because its last child has been removed.
Change-Id: I4145cb6bd58fe2efeb38c5c14f10657d956fc6ed
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I328faac14adf32512ced9bba5a7ee33b8acdfaec
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
The TreeView, as currently implemented, extends the
TableView by adding support for hierarchical models. In
the broad sense, it remains a list view with columns,
like TableView.
The main architecture is based on TreeModelAdaptor, that
wraps the hierarchical model. It keeps track of which
items are expanded or collapsed, and also relays model
changes to the view. (TreeModelAdaptor is a private type
and should be considered as an implementation detail.)
The TreeView only supports QAbstractItemModels for the
time being, and, just like TableView, relies on roles to
pass the data to the view. This also means that model
columns are not supported.
Selection is supported by ItemSelectionModel which exposes
part of the API of QItemSelectionModel. For this, support
has been added for QModelIndex and related classes. This
requires importing QtQml.Models 2.2 should an actual usage
of the TreeView use selection.
In the same way, TreeViewStyle currently extends TableViewStyle
with the relevant features, like branch indicator.
[ChangeLog][QtQuick.Controls] Introducing TreeView
With-Help-From: Caroline Chao <caroline.chao@theqtcompany.com>
Change-Id: Id3dba240a732744571e4a646b7b98678ab522da6
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
|