Commit Graph

8 Commits

Author SHA1 Message Date
Ulf Hermann
10d942e268 QmlProfiler: Split AbstractTimelineModel in two classes
We need a general purpose TimelineModel and a specialized
QmlProfilerTimelineModel.

Change-Id: I2da02d65efa11e160cab5fa9f8a21075beb0e2bf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 14:03:58 +01:00
Ulf Hermann
7956b176e6 QmlProfiler: remove useless checks from labels() methods
The view should check if it needs the labels before requesting them.

Change-Id: I935259e91337202224af7890d0617e1b12dd922a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:43 +01:00
Ulf Hermann
91cb52d40b QmlProfiler: Require model manager when constructing timeline models
This relieves us of the headaches created by figuring out what should
happen if the model manager is changed later. Extension models can be
safely created through a factory.

Change-Id: I8cf8fd6d639e4e6c9da66351ea44cfc35fd614a5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:29 +01:00
Ulf Hermann
307d45ecaa QmlProfiler: switch storage for typeId and selectionId
The selectionIds are an integral part of the timeline and have to be
given for each event. The typeIds are optional. Thus it makes more
sense to store the selectionIds in the basic Range classes and have the
derived models handle the typeIds instead of doing it the other way
around.

Change-Id: I824224b6f58e8d45311134887482586283fbff41
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:24 +01:00
Ulf Hermann
4ec75995f8 QmlProfiler: fix selection propagation from event view to timeline
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>
2014-11-21 10:54:18 +01:00
Ulf Hermann
936480316f QmlProfiler: Don't needlessly use AbstractTimelineModelPrivate
We can easily implement all specialized models with only the public
interface.

Change-Id: I2fc75ad4a4270d9dd40068e78f9364f3963805e0
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:12 +01:00
Ulf Hermann
b7742f79b6 QmlProfiler: Merge SortedTimelineModel into AbstractTimelineModel
In order to provide a stable interface we need most of
SortedTimelineModel to be private. There is no real benefit in keeping
a distinction between AbstractTimelineModel and SortedTimelineModel as
SortedTimelineModel isn't very useful on its own.

Change-Id: Ibc6945e2740320f430f2634f95c7807d6b460123
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:01 +01:00
Ulf Hermann
a42e07beba QmlProfiler: Rename some classes and files to follow the common pattern
The ones we'll refactor into the timeline library should be called
timeline* and the others should be called qmlprofiler*.

Change-Id: I6ecccbe4ef523681ca0baeef140368e2c1839964
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:53:53 +01:00