This establishes an additional invariant, namely that items
that are not part of a model have m_model == 0, even if their
destruction is imminent.
Change-Id: I0bad7fff57d21ddcefe06953cd0da8c2897baa4a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".
Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
This removes the need to emit the respective signal by the caller
of setRootItem() if the tree has been constructed before using
setRootItem().
Change-Id: I6f6210a9ef7d9ec3d347dc7cfdaf853535ca7656
Reviewed-by: hjk <hjk@theqtcompany.com>
isLazy/populate was the first incarnation of the canFetchMore/
fetchMore mechanism which now can take over completely. So:
- remove isLazy/populate
- the use in VariableChooser
Change-Id: I885d492c134fb6899759e19a73156b52df7a880a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This allows tree items to rely on not being part of a model
inside their destuctors.
Change-Id: I5f19739d3701426b068a07bf82f5199fbb259f29
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... in WatchHandler and DebuggerEngine interface.
Adjust using code.
Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Broke after moving to Utils::TreeModel. Use QSortFilterProxyModel on top
of TreeModel (can later be used for filtering as well).
Additionally we need to make sure to report changes only for the changed
column now, because otherwise QSortFilterProxyModel thinks that the
change could make re-sorting necessary, and does that in a non-stable
way.
Change-Id: I9fd12c55a45aba4c05f8e318ae8ea9a4ab9f3310
Task-number: QTCREATORBUG-14107
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
...and make sure model is propagated when using copy constructor.
Change-Id: I95b95ebb7f6058adc73bc6e73b4f23a87012a2b2
Reviewed-by: hjk <hjk@theqtcompany.com>
Functions that are meant to be overridden should be virtual.
Also add a convience level() function, seems to be a common need.
Change-Id: I09d452ab12f0ac29fb31de853057511418a47e7e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The circle closes, that's where the code came from.
Change-Id: Ic36ab61ec8886c9a2747aeb29a7245df3ef0b6c4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Only the top level entry was handled so far, but we might add
items with subitems.
Change-Id: I55084a1f595f4982bd37168e71b144b17eee63b1
Reviewed-by: hjk <hjk@theqtcompany.com>
Default to 'editable' (not selectable), intentionally changes behavior
in the Kits, Compilers and Debugger option pages, but brings it more
in line with Qt version.
Change-Id: I71739a5d61c9980fc6da729dcb59b0900047f066
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
canFetchMore/fetchMore, and insertChild (at given position). Make
prepend/appendChild use the latter.
Change-Id: I4162fe6e64f37d26de209aa81894c9730957694b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Full separation does not seem possible as QTreeView assumes
all items to have equal column count.
Change-Id: Ia260924fe13ea62789923af8484f9838295355b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... and use the items themselves as main entry point for
item related operations.
With non-uniform tree items it's easier to have item specific
functionality directly in the item implementation instead of
the model.
Change-Id: I4e9b7db98d16b91ddef81917417691129bb83621
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Currently #if'd out, but takes only a one line change to enable
quick testing. Tests pass with the included change to flags().
Change-Id: I6dca376f162ad26e8ce6de65241e56497ff7267e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Add functions to remove a single item, to access the last child
of an item and a simple way to construct items that only display
static data.
Change-Id: I89347fbb6bbbac6b77fcfb23fa0b780a13643d6f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This is mainly used to communicate the number of columns and
header contents.
Change-Id: Ic3163265338d71f1fa8250e4765bb764e5784197
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
That kind of boiler plate comes up often enough to justify a wrapper.
Change-Id: I94aa5b1ccbe5a98f091a47087654e59e9e122c1d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>