Commit Graph

34 Commits

Author SHA1 Message Date
Ulf Hermann
cfaa30d0b9 QmlProfiler: Eliminate ambiguity from TimelineModelAggregator::count()
It wasn't helpful that this method could either count all events or
only the events from a specific model.

Change-Id: I09dcb37edd3403a23f6ee9008fc71b6761aa9e26
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-29 14:28:10 +02:00
Ulf Hermann
b2487e1683 QmlProfiler: Introduce properties for timeline category heights
Like this we can easily refer to them from QML and it makes it simpler
to see if we mean the overall height or the height of a single category.

Change-Id: Ia2b79d99b5c46c3d9563cfc2ed0715bc352ce9b4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-29 13:19:23 +02:00
Ulf Hermann
38f4d6a5f2 QmlProfiler: rename "eventId" fields to "typeId" and "selectionId"
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>
2014-09-29 13:06:45 +02:00
Ulf Hermann
2b362de064 QmlProfiler: introduce properties for empty, hidden and displayName
Like this we can properly refer to them from QML.

Change-Id: I98378d543d307f78909191225e72c9d0404dfa1d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-15 09:15:52 +02:00
Ulf Hermann
2677e33782 QmlProfiler: rename relative height of timeline items to "relativeHeight"
This clarifies that the item height is not absolute but relative to the
row height, and it reduces the ambiguity of the various "height" methods.

Change-Id: I391441147c88b47a14e539fc3853702bb517d27b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-10 15:43:00 +02:00
Ulf Hermann
36d8ad4c39 QmlProfiler: drag&drop reordering of models in timeline
Task-number: QTCREATORBUG-12337
Change-Id: I399593f44aa8ff8dd79c623108fecb3c317cb63c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-09 12:02:38 +02:00
Ulf Hermann
57fe9b7b5e QmlProfiler: Rename get* and find* methods to their canonical names
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>
2014-08-26 14:52:09 +02:00
Ulf Hermann
df86884d7b QmlProfiler: Keep TimelineRenderer and Button states in sync
You could enable the select-on-hover mode by clicking in an empty time
line, even though the buttons bar was disabled. You could also trigger
various bad behavior by clearing the view and restarting the profiler.
Properly initializing and clearing all members, and sending change
signals on clearing helps with that.

Change-Id: Ie7df80a52daaf166c3a4adb2eb1f28a59c21df57
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-11 13:54:24 +02:00
Ulf Hermann
4f4251ba6d QmlProfiler: Fix rounding error for items starting outside the screen
Change-Id: I132b7058de9e51f6a1d958594917fc926039a585
Task-number: QTCREATORBUG-12648
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-10 13:35:11 +02:00
Ulf Hermann
e24618134b QmlProfiler: Fix logic when selecting previous event
Events should be walked in the order of their start time, not end time.

Change-Id: Id9f9746958dbfbdc28424c34b3ca1f5e4b9ff373
Task-number: QTCREATORBUG-12634
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-09 12:40:30 +02:00
Ulf Hermann
b9d349bda5 QmlProfiler: Draw selection boxes only as large as the items
Change-Id: I0f7f4f2a73c24faeff9c502b118e984938a27d25
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-24 14:56:54 +02:00
Ulf Hermann
f30cbf9711 QmlProfiler: allow interactive resizing of rows in timeline
Task-number: QTCREATORBUG-12337
Change-Id: Ib9ddb128605831841023bb3cc9aed758ed171de9
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-24 14:50:27 +02:00
Ulf Hermann
63ca524069 QmlProfiler: Put height of rows in the timeline into the model
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>
2014-06-24 14:50:02 +02:00
Ulf Hermann
9e802e3af1 QmlProfiler: Reduce the amount of useless signals on item selection
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>
2014-04-09 16:36:04 +02:00
Ulf Hermann
ca78bb358b QmlProfiler: Prevent integer overflows in timelinerenderer
When zooming in the x offset and width of events can be larger than 2^31.
We can restrict them to the visible area, though.

Task-number: QTCREATORBUG-11879
Change-Id: I841300b55cdd583d5c3fa58b196101038f6f6036
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-31 12:00:02 +02:00
Ulf Hermann
84eadb01c8 QmlProfiler: Update selection also when only model changes
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>
2014-03-31 11:59:31 +02:00
Ulf Hermann
f0e2196869 QmlProfiler: Make sure only hovered events are selected
Task-number: QTCREATORBUG-11824
Change-Id: Ib471f2a04b37e159fb7876e7f5c94ad3e8f368a9
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-31 10:55:18 +02:00
Ulf Hermann
ed537dabfe QmlProfiler: Remove pointless second check for endTime
If the selected events aren't in the specified time range the selection
should be fixed.

Change-Id: I8cb6b57054888433b5ebf66fce3b479b3266f86e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 15:58:50 +01:00
Ulf Hermann
ae32a276a1 QmlProfiler: Make sure that very narrow events can be hovered over
By giving the area the mouse "covers" a non-zero width events that last
only a very short time can be selected even if no pixel in the timeline
falls "into" them.

Task-number: QTCREATORBUG-11692
Change-Id: I53b74e2a770719872e0afc57740f7762636dc641
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 15:58:41 +01:00
Ulf Hermann
5dbbc74651 QmlProfiler: Make sure all binding loop markers are drawn
Binding loop markers aren't ordered in any particular way so we cannot
stop drawing them when we find an invisible one.

Change-Id: I16dcc96c15febc5cfe0203e23c1ca657714a2c25
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-14 11:04:55 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Ulf Hermann
84e7504317 QmlProfiler: Make sure the painter state is restored at some point.
By returning early from the method painting the binding loop markers
painter states could be left on the stack, triggering error messages
later.

Change-Id: I0b9c336e44a28feec96c506d0e3d0da291054bbd
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-02 16:08:34 +01:00
Orgad Shaneh
4442a92729 Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-14 08:13:52 +01:00
Ulf Hermann
bac12cfa2a QmlProfiler: Restrict rendering of timeline to visible area
The timeline can cover a large vertical space. The introduction of
the Flickable element to navigate that space has reverted the effect
of commit 5eb057c7e. This change restores the performance
improvements and avoids overflows in the underlying buffers.

Change-Id: I86ddd66652ee0a26c81619682a883622072b0f87
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 14:27:03 +01:00
Ulf Hermann
bfe55bc818 QmlProfiler: Rename some variables to avoid shadowing of methods
Change-Id: Icdafee1bcc38812ace152d71c6302e130d1b6cf5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 14:26:56 +01:00
Ulf Hermann
5eb057c7e2 Optimize TimelineRenderer to not paint invisible items
Check the dimensions of the window being painted to before actually
painting the events and skip invisible ones.

Some primitive profiling using QTime shows that the average time taken
per event in TimelineRenderer::paint() is approximately halved by this
patch when profiling the QML widget gallery example and expanding all
categories in the timeline.

drawSelectionBoxes() is not optimized because the number of selection
boxes is expected to be so small that the overhead of the check might
outweigh the performance gains of skipping events.

Task-number: QTCREATORBUG-9982
Change-Id: I42e533c11e3a17f9d63b61ce5e4192c8f40e1be9
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-06 11:46:00 +01:00
Thomas Hartmann
9e58ab2ac8 QmlProfiler: Initial conversion from Quick 1 to Quick 2
Updated class names and functions. Fixed imports.

Change-Id: I5f12e3a108a0e60c091acc9c415ff77e52118029
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-09-16 14:35:53 +02:00
Christiaan Janssen
0a3b20f5f9 QmlProfiler: reworked
Change-Id: I66a236a024d76e7bef6edfb91ae30b5dd098b76b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-08-09 17:19:32 +02:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Christiaan Janssen
af72e4bb3f QmlProfiler: show empty trace
In the case that the application did not generate any event
after running the profiler, still show an empty trace.
Otherwise the user will think that the profiler didn't work.

Change-Id: Idd15225270d55d834719f66387864433fcb9026d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-05-11 17:16:12 +02:00
Kai Koehne
4d3395b990 QmlDebug: Rename library and (most) classes
Rename the QmlJSDebugClient lib to QmlDebug (shorter names, easier differentiation with the shared/qmljsdebug lib).

Also rename
 - QDeclarativeDebug* classes to QmlDebug*
 - QDeclarativeOutputParser class to QmlOutputParser

To clarify the features,
 - Debugger::QmlDebuggerClient is now Debugger::BaseQmlDebuggerClient
 - QmlEngineDebugClient is now BaseEngineDebugClient
 - QmlDebuggerClient is now QmlEngineDebugClient
 - QDeclarativeEngineDebugClient is now DeclarativeEngineDebugClient

Change-Id: Ie15713730a614c8ab4b637fad0924f95b54e633f
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-04-18 14:31:36 +02:00
Christiaan Janssen
b7304e2f2e QmlProfiler: Refactor
The code of the qmlprofiler client has become a bit too complex,
this patch reorganizes the modules in a more sensible way,
having the modules communicate with each other through a
state machine instead of the excess of signals and slots
from before.

Change-Id: I76f7313779888a1bd07a1cdb1acbf2e47aacf42a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-14 11:38:25 +01:00