This makes it much easier to deduct where it's coming from.
Change-Id: Ica85e1df0a03a01c1b319b3523fb5746e6c2d8f8
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Split it up into some more files and remove all implicit cross
referencing by ID.
Change-Id: I3f829d6701906b1b054d18680d9e670b35b1716a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
By using the scene graph we can retain the geometry for events in
the timeline on the GPU and potentially speed up the rendering for
large amounts of items.
Change-Id: I2cfbb8ef4ebc7b56f1977ec1facb4f2e7f2002ee
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This is much cleaner than manually casting contentX and contentWidth
to int. Also, it actually forwards the int-aligned dimensions to the
TimelineRenderer.
Change-Id: I7dad8eeabf1f3b70c5e725a82a2926b3db6f1b16
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Create the vertical elements only once and stretch them over the whole
vertical space, but keep all horizontal elements distinct per model.
Also, add horizontal elements to the labels group and rename that
accordingly, so that we don't need a third Flickable or ListView
Change-Id: I4fe3bd526767e8ff5d0ebcd70e9343f65fcc787f
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This potentially allows us to use different views for different
categories and reduces the reliance on TimelineModelAggregator.
Change-Id: I486481599d1517abc0087c565358f27405e4108b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
The timeline did not jump back to the selection when the selection
range detail window was clicked and an error was triggered when it was
closed.
Change-Id: I2de5788a184f2958a07ad39a3a0f298667d9783f
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
That's where they belong. Having them in the view makes no sense.
Change-Id: Ia2a6c8b02804ed8a1e10b0731cd62b6fd6489b0c
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
The event view deals in type ids and the timeline view has to handle
selection by type id. Using the coincidence that typeId == selectionId
in the cases we're interested in is ugly.
Change-Id: I6f94ccd2c3945d5901d0a225deee7de077bfce58
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.
Stating the times as properties allows us to use bindings in more
places, too.
Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
If you click on a row with a note in the timeline you probably want to
see the place with the note, not some other occurrence of the event
type.
Change-Id: Ic94514e460a33dbadca5cfed0b1455a1718b6d03
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
It's rather unintuitive if it only centers horizontally.
Change-Id: I9245da0b26fccc14a100804715d09aaa82059413
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is faster and more accurate than propagating by source location.
Change-Id: I6aed3b1591380b49dd7c56a66bdc35912570e347
Task-number: QTCREATORBUG-12932
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The convention is now that selections are the rows in the expanded
timeline, "types" are the types in the QmlProfilerDataModel, and
events are the single boxes in the timeline. Thus, the event view
shows only types and for consistency the V8 view does so, too.
Having eventId as synonym for "type index" and "event index" as
actual index into the list of events is confusing.
Change-Id: I6b7c4c3f1ab0a8b71c511de52ab296a2e91cf5f0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Also, all methods about events in models don't really need the "event"
prefix as that is what the models are about.
Change-Id: I7b995aa9c9dce7e01d4c862d094b1e73e6b6fb40
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
A numerical representation of "state" is not so useful after all.
Change-Id: I7fc3ae08a2fd44000b5543f4ba25730a8d79358d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
If we use different x and width parameters in JavaScript and C++ we
introduce numerical instability which leads to visual glitches.
Change-Id: I352f3e8365ca52d135230343c2f034332ec71323
Task-number: QTCREATORBUG-12648
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It's considered bad style to access properties of parent objects
defined in a different component as that reduces code reusability.
Change-Id: I0dbe4a3663026d12b2666de75c93841528fe295c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
They had been lost somewhere between QtCreator 2.8 and 3.0. Also
putting the location in braces looks nicer than the original.
Change-Id: Ia455ba99015ad38c21e528a0f8177902749ba1d5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Like that we can provide functionality to interactively resize rows in
the model so that one can zoom in to more interesting parts.
Change-Id: I31f14cd8aa37703240ebec744ca2e77188fb0f27
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This simplifies the code a lot and allows for more flexibility
when interacting with the data.
Change-Id: I69630071eee66840e905fcd95ba8c708742d58b6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This allows more precise specification of which event is supposed to be
selected.
Task-number: QTCREATORBUG-11945
Change-Id: Iff2e9bb8569711cc5df72a5ca55956e0091d6163
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Having multiple views not only is bad for performance but also creates
difficult to debug problems on some hardware configurations and is
fairly confusing.
Task-number: QTBUG-38222
Change-Id: I885e800b1ededab9137874105e3b2f9ec88a06e8
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
By passing signals with identification information of varying accurary
between the different views the event being selected could be changed
while it was selected. By checking the current selection against the
information given in the signal and not reselecting when it matches the
situation is improved.
Also, the selection methods are given more appropriate names. We hardly
ever want to select the "next" event, but rather the "best fitting" one.
Task-number: QTCREATORBUG-11945
Change-Id: I659b4929cb88f4c931a0893aa95a3bc92da5a23b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Using the extra window the ZoomControl keeps makes it impossible to
increase contentWidth to a point where it overflows. The drawback is that
the position on the scrollbar doesn't reflect the real position of the
visible part of the trace anymore if you zoom in to such a depth.
Task-number: QTCREATORBUG-11879
Change-Id: I6649f3c139f76c242a91d60364a28a4a00c9acee
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Previously, if you selected an event with the same ID from a different
model the rangeDetails wouldn't be updated. Now modelId and itemId can only
be updated together and a single signal is emitted for that. This signal is
then used to update the details.
Change-Id: Ie1e971f5ac8c041b49df347fa0fbb401d5422766
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The selectedEventChanged signal was never emitted and aliasing the
selectedItem property was unnecessary.
Change-Id: I2a15ad82bbf20a7ae9a42e17935242fbac7b5129
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Several QML properties need extra treatment to avoid stale data
after clearing. Toggling the visibility of the timeline renderer
doesn't really help there.
Task-number: QTCREATORBUG-11833
Change-Id: I1903d7bd69d6fe31ecc4cadca8e30fa2104fa09a
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
No need to keep properties around that aren't read anywhere.
Change-Id: Ie9300ad646466a6a2368f644a420d8654891805f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
contentWidth has to be updated before contentX as the WheelArea
underneath will clamp its horizontal value to its bounds on change and
thus break the update to contentX if contentWidth is growing.
As contentX is automatically updated by changes to contentWidth it's
generally a good idea to prevent any reactions to that with a recursion
guard. When updating contentWidth before contentX this becomes necessary
for correct operation.
Task-number: QTCREATORBUG-11699
Change-Id: I34fff7a55e93745d658e8cbb5ac3d430a42770e8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
If the timeline is being flicked and we manually set contentX from the
zoomControl callback it will stop. That's unnecessary as the flicking
itself will trigger further updates to zoomControl.
Change-Id: Id14bde1bb33d6b1f6d719a41df23074981e474da
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This requires the consolidation of the nested Flickable elements into
one, which is probably a good idea anyway. The horizontal scroll bar is
important because people might not understand that they can use the
overview for scrolling.
Change-Id: Ie1555265fc3edafaf6e6e4f34d77b0d034d45639
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
MainView.eventCount is always 0 since the last cleanup. It doesn't do
anything useful and can be removed.
Task-number: QTCREATORBUG-11515
Change-Id: I367a11e41c34e691550b6d6e5943fc372f0f04ca
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We don't want to emit a signal for each event being added. That's
expensive and doesn't serve any purpose. We also don't have to save
the availability of data in QML as it isn't used anywhere.
Change-Id: I32db06a1955a7cfd6b569f50b81bf5278333b622
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Anchors are supposed to reduce graphical glitches such as the gradient
borders getting detached from the edges of the timeline while resizing.
I'm not sure if it's actually better like this, but the code certainly
looks nicer.
Change-Id: I9eb6a6a50780ce642ad7cb551d2895a80b00690e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Those functions aren't called from anywhere. Wheel zooming has been
removed a long time ago and centering is handled in a different way.
Change-Id: Ib55fdfdd3cf794563eaa50ff9b5f1a1dfe94a17a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>