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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>