The assumption that the scale entries only have to be updated when
their stable index changes was wrong. The repeater can shuffle around,
stash and restore items at will. It might restore some item at the
same position, but the timestamp it refers to might have changed. Thus,
the value being displayed was wrong until the timeline got scrolled.
By using a proper binding we avoid this. In turn the blockStartTime
might get re-evaluated twice for a single update to row.firstBlock.
That would be bad as we would constantly re-render all the texts.
Experiments show that the current implementation of the QML engine
happens to order the bindings in a way where this doesn't happen and
we cannot get better than this without huge overhead.
Also, we simplify some of the expressions involved.
Change-Id: I93848f89bdbefd28c3dbf30f13551c9476dabd37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
While we're at it, also remove all the weird borders and use standard
icons. The timeline doesn't have a "baroque" theme, it's all flat for
now. If the need arises we can add some gradients here and there.
Change-Id: Ia9ce22d7f412c4999feca2284959be4d734267ac
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This avoids the "QTransform::translate with NaN called" warnings. They
were triggered by the text item having a negative width due to its
parent having a width of 0 and the item itself subtracting a margin
from that.
Change-Id: I3ee89b11ba2a27e568982a7ff9a9fe297907a37e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The only thing that needs clipping are the thin vertical lines. We can
manually manage those with the "visible" property. Clipping with the
"clip" property on the parent element can cause costly rebatching for
the whole content while scrolling.
Change-Id: Ia31eeefc4c0a943b00ea47b12c5c9d49b0f004e3
Task-number: QTCREATORBUG-14983
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
If the trace being shown is shorter than 1ns we better don't show any
labels as those are necessarily useless. Trying to "repair" the
duration to show something in that case creates more problems than
it solves, as the re-evaluation of the bindings when the actual values
arrive produces strange transitional states, which surface as large
negative numbers for the time labels.
Change-Id: I16598a2b1c3271dc50bbd3877baf4c0e15cc6411
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>