Commit Graph

1631 Commits

Author SHA1 Message Date
Ulf Hermann
bc4586ffbe QmlProfiler: Make TimeDisplay and TimeMarks declarative
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>
2014-12-05 14:15:08 +01:00
Ulf Hermann
75e4bd7900 QmlProfiler: Make rowHeightChanged signals more specific
It's very handy to know which row changed and what the new height is.

Change-Id: Iff3a45c3fbfc47f9b1001a9cf15741349e1e50b8
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-05 13:56:50 +01:00
Ulf Hermann
db5131d1ad QmlProfiler: Remove most of timelinemodelaggregator
Change-Id: If56940133b54905700fd51feac61d097677002c2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-05 13:14:26 +01:00
Ulf Hermann
b1f4f56e99 QmlProfiler: Reorganize timeline into rows
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>
2014-12-05 13:14:18 +01:00
Ulf Hermann
3780afc1e0 QmlProfiler: Fix timeline range selection
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>
2014-12-05 11:45:04 +01:00
Eike Ziller
d341c48246 Merge remote-tracking branch 'origin/3.3' 2014-12-01 15:44:30 +01:00
Ulf Hermann
55a6050f37 QmlProfiler: Use ClosedHandCursor for dragging categories
It fits better to the OpenHandCursor we show when not dragging.

Change-Id: I6d3d635b4d56dc0b6e5baa502722cac045e2e6e2
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-11-28 14:29:01 +01:00
Ulf Hermann
f8e8d14bd4 QmlProfiler: Don't draw note markers for hidden categories
Change-Id: I6a2104522896fafb70d09c5872cb9641f45db5f4
Task-number: QTCREATORBUG-13533
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-28 11:24:05 +01:00
Ulf Hermann
e0d06f8681 QmlProfiler: Make TimelineModel usable from QML
Make the relevant member functions Q_INVOKABLE and properly notify
about the height change when data is loaded or cleared.

Change-Id: I7c1ee70942617af2045b84a2d8f0ab2adef72f52
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-27 16:09:34 +01:00
Ulf Hermann
0464c87773 QmlProfiler: Don't change row count if a model is hidden or empty
This reduces the complexity involved in making the row count a
property. Empty models do have rows like this, but don't have a height.
It doesn't get much more consistent than that. Before empty models
didn't have rows but you could still query the row heights. Having
height == 0 is very helpful for assembling the UI, rows == 0 not so
much.

Change-Id: I38ee9f46751a4beb288578d5cd1f0a17ea08814a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-27 16:09:27 +01:00
Ulf Hermann
7f7ebadae1 QmlProfiler: Move timeline prev/next functions to models
That's where they belong. Having them in the view makes no sense.

Change-Id: Ia2a6c8b02804ed8a1e10b0731cd62b6fd6489b0c
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-27 16:09:19 +01:00
Ulf Hermann
13c7d1c2ce QmlProfiler: Don't use the model factory if it doesn't exist
The model factory only exists if there is a plugin providing it. Also,
it's a good idea to initialize it.

Change-Id: I904bae1e733c37699a99e84e79c67ab4e8aea805
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-27 10:51:45 +01:00
Eike Ziller
a47fbb8309 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/coreplugin/coreplugin.cpp
	src/plugins/coreplugin/themesettingswidget.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.h
	src/plugins/qmlprofiler/qml/Overview.js
	src/shared/qbs

Change-Id: Ibe92c166fc5bfbcb4d6964e50ca7298d8459d60e
2014-11-24 15:43:48 +01:00
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
3d9c38f3ca QmlProfiler: use correct row heights for binding loop markers
Change-Id: Id476d9be7c0b1a4fb7c8e5fffb2861441d369316
Task-number: QTCREATORBUG-13451
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 11:09:48 +01:00
Ulf Hermann
e570e7a271 QmlProfiler: Make notes a property of timeline model aggregator
Change-Id: I5aa8162d18fad46601198fe71fe87591737c30ff
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:55:11 +01:00
Ulf Hermann
85768a4864 QmlProfiler: make notes model usable on its own
Change-Id: Ifbc42208d3a34051fbf87cff7e9179f7dcdd7bf9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:55:04 +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
b2c8e70117 QmlProfiler: Sanitize AbstractTimelineModel public interface
Remove things we don't need and add some more methods to allow
specialized models to operate without access to private class.

Change-Id: I1f42c4299825f581361a79dd0a0e00c1c08b79e7
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:07 +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
Ulf Hermann
70102410df QmlProfiler: Centralize trace/window/range times
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>
2014-11-21 10:53:28 +01:00
Orgad Shaneh
772ca7a654 QmlProfiler: Fix memory leak
Detected by valgrind

Change-Id: I505e8dec83a0c9d3be648e43d9886debeb2a5b3b
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2014-11-21 10:46:12 +01:00
Ulf Hermann
3382efb71e QmlProfiler: Center the binding loop marker on events in overview
Change-Id: If16ee4335b40e6ee611f04032246620ecf29f2db
Task-number: QTCREATORBUG-13453
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-20 17:29:58 +01:00
Ulf Hermann
4e3435a5cf Analyzer: Trigger stopIt() only once when pressing the stop button
The stopIt() slot is already connected in the constructor of
AnalyzerRunControl.

The double connection is clearly not intended and, considering that
various analyzers modify internal state from those callse, could lead
to incorrect behavior.

Change-Id: I1c68eb06729849771f4a25257a219c84a032adf3
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-19 18:57:10 +01:00
Christian Kandeler
c91980ce12 QmlProfiler: Fix potential null pointer access.
Change-Id: Ic1f52a73c910612d0664e0ea909f04729109bcb2
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2014-11-19 13:03:14 +01:00
Ulf Hermann
aa34d93e3c QmlProfiler: More precise drawing for selection rectangles
Keep the rectangles in the row they belong to and use MiterJoin to get
sharp corners.

Change-Id: I0dc9106975ccb550bfb5b5645865d0ea9318d577
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-18 17:23:16 +01:00
Ulf Hermann
a46fe36bce QmlProfiler: Fix toggling of internal client recording state
We cannot just set it unconditionally on setRecording() because the
client recording state is supposed to reflect the user's intention.
Instead, if the recording button's state differs from the intention
and then spontaneously changes to match it (through a change in the
application), we toggle the client recording state twice to make sure
everything is properly synchronized.

Change-Id: I070d38364e63ab9cf0597fabed3d326ac3685589
Task-number: QTCREATORBUG-13322, QTCREATORBUG-13430
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-18 12:45:34 +01:00
Ulf Hermann
3aebcdc540 QmlProfiler: Don't switch to designer when clicking on events
We want to only navigate the text editor when browsing through profile
data.

Change-Id: I2156b9853a6a1547a52c491ea021a68ca4f6dde9
Task-number: QTCREATORBUG-13433
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-18 10:43:14 +01:00
Ulf Hermann
fd3f544bb2 QmlProfiler: Avoid numerical overflows in calculation of event width
We must not keep intermediate values in 32bit integers as they can
easily get too large for that. This change restores the behavior from
before change 10a14ced36, which coaxed
the compiler into using floats by stating the minimum constants as
"1.0".

Task-number: QTCREATORBUG-13391
Change-Id: Ie83337b7e2b09b37d94a31a07813de14b85152ee
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 12:29:15 +01:00
Ulf Hermann
673cc77dd0 QmlProfiler: Disable loading of trace files while recording data
Change-Id: I32f1c6640bdde278e8342886f30e50a78c61b120
Task-number: QTCREATORBUG-13321
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 12:29:06 +01:00
Ulf Hermann
6264f7cb4d QmlProfiler: set the client recording state correctly
If a change was triggered from the profiled application we still need
to update the client recording state for the UI to stay consistent.

Change-Id: I2955bd9f2da27a2c32ac93e33742ee5fefbd2751
Task-number: QTCREATORBUG-13322
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 12:28:56 +01:00
Ulf Hermann
99f4b6353d QmlProfiler: show a warning if unsaved notes are to be discarded
Change-Id: I5152f0eefd1f0beec2b0f4fc9e27fedeb3bf7a14
Task-number: QTCREATORBUG-13318
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 12:28:20 +01:00
Ulf Hermann
1d483cd352 QmlProfiler: Fix location for QtQuick1 events before using them
If this is not done multiple event types with empty locations are
regarded as equal which leads to confusion later. Also, it's not a
good idea to change the "location" member for already inserted event
types as that prevents us from looking them up in the eventTypeIds
map.

Finally, preprocessing the filename and stripping certain parts
from the URL prevents a proper lookup later on, so this is removed.

Change-Id: Idbe87e0b16444291bb13ff604ae65e1d7e74c3a5
Task-number: QTCREATORBUG-13382
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 11:30:06 +01:00
Christian Kandeler
9d677e3302 qbs build: Remove unneeded import statements.
The respective items are available without it.

Change-Id: Idc840cf08e7bec84f561c096afe8de25b1fb8468
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-11-10 15:45:14 +01:00
Christian Kandeler
4fcb49be1c qbs build: Remove outdated "minimumQtVersion" specifications.
These were added when the overall project still supported Qt 4. Now the
general requirement is even stronger than what was specified in these
plugins.

Change-Id: I71241e20a72a413d30c4e089bcc19b0762a732da
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-10-31 10:33:42 +01:00
Tim Jenssen
d14b2850e4 QmlProfiler: use qsTr just around the strings
Change-Id: I23b2fc2d1c64581dbfde9f77d8a39bc5d185bb54
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-10-30 16:54:25 +01:00
Ulf Hermann
0cdbd78554 QmlProfiler: Properly initialize features bit field
Change-Id: Id3d0c1a7993b862b46d79af5cccb39c3f3836570
Task-number: QTCREATORBUG-13238
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-24 13:41:30 +02:00
Tobias Hunger
6568d9fbc0 Fix some copyright headers
Change-Id: I5a6bba98684208cf7ca5fb30b4bd29635c4c0f21
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-10-16 12:02:57 +02:00
Christian Kandeler
25be45a5aa QmlProfiler: Fix qbs build.
Change-Id: Id9c3659242841b29a328639a9073860af2b400b4
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
2014-10-16 10:00:48 +02:00
Eike Ziller
9c7019f0b2 License update.
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-15 15:19:55 +02:00
Ulf Hermann
24c990475a QmlProfiler: Prefer events with notes when propagating selections
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>
2014-10-15 11:23:57 +02:00
Ulf Hermann
9331565e6e QmlProfiler: Show notes in events view
Change-Id: I21542128c4cc9b7a31f7b834defbdf1dd15cd37a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 11:22:51 +02:00
Ulf Hermann
bb517a645e QmlProfiler: Show notes in overview
Change-Id: Ie24c2c01a978640bd2925265385ff7c7b3274a41
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 11:22:44 +02:00
Ulf Hermann
bac3b888fc QmlProfiler: Show note indication in category labels
Change-Id: I9bcb9bcaab6d24c87c932fce610a6026461a5ecb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 11:22:37 +02:00
Ulf Hermann
a466a3eb55 QmlProfiler: show notes in range details
Change-Id: Iaee0c3488e3eaa2c347e8533d57b16e47d1a9328
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 11:22:26 +02:00