Commit Graph

8 Commits

Author SHA1 Message Date
Ulf Hermann
cfe06a8132 Timeline: Drop manual control of scale updates
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>
2016-11-07 12:25:55 +00:00
Ulf Hermann
94ca84c1e4 Timeline: Add some theming
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>
2016-08-05 11:35:35 +00:00
Tobias Hunger
f72370f20a Update License according to agreement with Free Qt Foundation
* Update remaining files in src

Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:59:41 +00:00
Ulf Hermann
666fd0d659 Timeline: Provide some sane defaults for all text elements
Change-Id: I40e4a777c6f485443ab142cc220ae22dab44b752
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-15 13:06:50 +00:00
Ulf Hermann
fba007741c Timeline: Make time labels invisible if the timeline is empty
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>
2015-09-11 09:13:21 +00:00
Ulf Hermann
5c815dea19 Timeline: Avoid clip on TimeDisplay
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>
2015-08-28 07:35:19 +00:00
Ulf Hermann
d00eaa8e04 Timeline: Fix display of time labels for empty traces
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>
2015-07-02 07:36:17 +00:00
Ulf Hermann
c40d9e9d17 Timeline: Create new library from contents of QmlProfiler
Change-Id: I964b2f149e237eb25a08600e8dab8968e8bc0cb9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-16 15:22:48 +01:00