Commit Graph

135 Commits

Author SHA1 Message Date
Ulf Hermann
68740869ef QmlProfiler: Update timeline contentWidth also if width changes
As the contentWidth depends on both the width of the flickable and the
currently selected time range it should be updated if either of them
change. Otherwise we can miss changes and show stale data.

Change-Id: Iab9e17eef3490531175a2374fb3da0e0071f3bd1
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-12-03 14:42:30 +01:00
Ulf Hermann
06a23c6da5 QmlProfiler: Handle enable and show signals for zoomslider in C++
As it's hard to pass arguments for signals from non-QML-mapped objects
to QML objects handle the signal in C++ instead and just directly set
the properties.

Task-number: QTCREATORBUG-10943
Change-Id: I039f6938db3d7e64ca1a4bcff2f0f6aa79c65219
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-12-03 09:47:03 +01:00
Ulf Hermann
2f8f51912c QmlProfiler: improve selection behavior in timeline
When selecting ranges in the timeline the selector would sometimes hang
or behave weirdly when moving back. This was due to incorrect logic in
the selection bounds calculation and because the vertical flicking would
steal mouse events.

Change-Id: I14074463422d1d9a0aa8ecd1f88847e7330c9b6b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-12-02 12:12:29 +01:00
Ulf Hermann
070de17ec7 QmlProfiler: Properly align time labels and bars
Due to QTBUG-34962 we can't rely on the width properties of Flickables
so we use some other elements to size the background bars.

Task-number: QTCREATORBUG-10882
Change-Id: Iee427022111b6092486adaebfd33f8e2e6a91190
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-22 10:53:21 +01:00
Ulf Hermann
71f3baae6b QmlProfiler: Remover "rubber" behavior for horizontal Flickable.
By overflicking you could reduce the selected range and implicitly zoom
in. That seemed wrong. The rubber effect doesn't serve a real purpose
on desktop applications anyway.

Task-number: QTCREATORBUG-10864
Change-Id: Id4d6107e23c184621c5fcce21bf042e6ed4bd8e6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-21 17:13:16 +01:00
Ulf Hermann
2a4aebed76 QmlProfiler: Use anchors to determine the size of the timebar background
For some reason, when the timeline width is 0, the background width can
get negative, if using bindings; it works fine when using anchors.

Change-Id: I5eb76f83b9c41c1a71a135082770079cedc7f16c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-19 12:38:17 +01:00
Ulf Hermann
fa6a35b054 QmlProfiler: Use RangeMover to simplify and fix SelectionRange
Deduplicate the code and fix the "jaggy" behavior.

Task-number: QTCREATORBUG-10762
Change-Id: Iaca3bc5b77cb8d92f082232e6fd3c2d9e0935300
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-14 17:20:44 +01:00
Ulf Hermann
188f5de5ed QmlProfiler: Provide a vertical scroll bar for the timeline view.
The timeline can be vertically navigated by flicking, which is not very
appropriate for desktop applications. This change provides a scroll bar
and mouse wheel scrolling in addition to that. Also it makes the
vertical movement stop at the boundaries. The mouse wheel would exhibit
unintuitive behavior without it.

Change-Id: I5ef126525e452f46aa0a483a544345b8f618d829
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-14 17:20:08 +01:00
Ulf Hermann
c6bbf76151 QmlProfiler: Avoid persistent horizontal "overflicking" in timeline.
The content of the horizontal Flickable element could remain at negative
positions after flicking and generally showed inconsistent behavior.
This was due to the redundant storage of the horizontal offset in
view.startX and flick.contentX. Explicitly assigning contentX from JS
code disables the automatic "rubber" effect which pulls the content back
into the allowed area.

Change-Id: I69e827854e2be3d8f6f4e2537e7105f80a8f2a89
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-13 15:24:40 +01:00
Ulf Hermann
761fd1198d QmlProfiler: Move zoom calculations into QML and simplify them.
The zoom level calculations were much too complex and introduced
rounding errors in various places. By moving them all into one
place and avoiding circular recalculations of the same thing those
problems are mitigated.

Task-number: QTCREATORBUG-10635

Change-Id: I7316caad1a590964402056a2e6430c8d059ae097
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-13 15:16:39 +01:00
Ulf Hermann
9e0175d8bb QmlProfiler: Reimplement zoom slider in QML
This restores the functionality of the old zoom slider. It probably
looks a bit different, but it does the same thing.

Task-number: QTCREATORBUG-10635

Change-Id: Idcb19187df066e4b1336df73b122aa567a732dee
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-13 15:16:28 +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
35a9015dea QmlProfiler: Draw time marks only in visible area
The vertical Flickable element can get very large if certain
categories are expanded. If the time marks have to fill the whole
element the underlying buffers holding the pixmaps and/or OpenGL
data may overflow.

Task-number: QTCREATORBUG-10420

Change-Id: I45952e8237bb827a963e0e4e8deb060646c0c8f4
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 14:26:49 +01:00
Ulf Hermann
20142d962a QmlProfiler: Add some indentation
Change-Id: I71a5ed05ccd219639a088fe73193d5263ca5880b
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 14:26:39 +01:00
Ulf Hermann
d3dd806546 QmlProfiler: Make timeline renderer vertically flickable
Introduce a second flickable element to encapsulate the timeline as
well as the labels and move SelectionRangeDetails and SelectionRange
out of that to make them float on top.

Task-number: QTCREATORBUG-10420

Change-Id: Ib4af7dc4b0155b9371c582938f1b4abb3e40cf06
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 14:19:37 +01:00
Ulf Hermann
d3e0ad9429 Remove non-functional tracking of profiler root's vertical scroll
Vertical scrolling doesn't work at the moment and has to be implemented
in a different way. Besides, the code tracking the root's vertical
scroll hasn't done anything useful in a long time.

Change-Id: If2add3874cba971bbaace2c22fbf1b2bf0b463b7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
2013-11-11 16:26:04 +01:00
Ulf Hermann
08b2de2d51 Request a repaint from the TimelineRenderer if endTime changes
Previously the timeline was only repainted if the selected start time
changed. If the start time is != 0 changes of endTime unfortunately
imply changes of startTime most of the time. This is why the
effect was mostly invisible.

Task-number: QTCREATORBUG-10707
Change-Id: I21a86a4248c949f5ad630e6c5a30f8caedcbfe7e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-08 17:11:06 +01:00
Ulf Hermann
8098347335 Don't set infinite or NaN numbers as start of the flick range
The flick range should always be bounded by finite numbers.

Task-number: QTCREATORBUG-10623
Change-Id: I27290eca531a1f36293dc0dea3dbdf0d2181e822
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-08 09:09:23 +01:00
Aurindam Jana
d349010445 QmlProfiler: Rename Label to CategoryLabel
This is to avoid confusion with generic Label
Quick component.

Change-Id: I6a72266c394862706215b6db40bcd3592f9d24b3
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-05 11:39:58 +01:00
Kai Koehne
0599cb7366 QmlProfiler: Avoid drawing outside of widget
Avoid rendering outside of the canvas by forcing the windows
size onto the scene, and also removing the related candidateSize
logic.

In the QtQUick1 based profiler one could scroll the canvas also
vertically, but that doesn't work any more. This is a hot fix
to work around the problem, we can hopefully bring back the
full solution later ...

Change-Id: Ibd3d54f6b98c3764e104116d395a77b880d88bcb
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-05 10:32:33 +01:00
Aurindam Jana
c9a851c649 QmlProfiler: Avoid generic property types in QML
Change-Id: I4dddf19d37004f59bfbe75b45e0b626bf1563fa2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-09-18 10:37:33 +02:00
Aurindam Jana
a2d771b41e QmlProfiler: Update Qt Quick 2.0 to Quick 2.1
Change-Id: Ib40cf370798e12540d81e2f7ec532bb119293e4e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-09-18 10:37:21 +02: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
f1f8706578 QmlProfiler: state dialog as floating widget
Change-Id: I48ff1d729e49347881c82c7bd066d30ecaca47a5
Reviewed-by: Simjees Abraham <simjees.abraham@nokia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2012-05-21 12:15: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
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
Christiaan Janssen
1322a73efd QmlProfiler: read trace when application ended by the user
This patch avoids showing the "use the stop button" if the
application dies but the trace data was sent in time.

Note: with the current implementation in Qt5, the application
sometimes closes before all data could be sent.  That happens
with any non-trivial qml application.

Change-Id: Ie7b1568b2d69320d1887587dccac40a4b4d4d788
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-02-17 17:25:00 +01:00
Christiaan Janssen
585e651310 QmlProfiler: manage server-side start tracing message
also
QmlProfiler: refactor eventlist state

If unexpected data is received, assuming server stopped profiling.
Also, introducing a eventlist state instead of relying on
signals sent around.  This is part of a coming bigger patch
where the profiler client is refactored.

Change-Id: Ibed9007903956daf03cc0fcb90f77b5ad2d3cf90
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-17 17:22:23 +01:00
Christiaan Janssen
bd438d1c5c QmlProfiler: display binding loops
Change-Id: Ib553f67b25e614bd210959ce82bc970daa228fdb
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-08 16:02:17 +01:00
Christiaan Janssen
95f1bb190f QmlProfiler: scroll automatically when selecting events out of view
Change-Id: I2f242895b00792d2e6930ec642209be886e22bad
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-03 17:09:50 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Christiaan Janssen
1958fd82d5 QmlProfiler: reading column information in bindings
Change-Id: I1a99c3508de733d98eb99f41419eccfdca030fe0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-20 12:18:50 +01:00
Christiaan Janssen
5fede0d497 QmlProfiler: tooltips for the labels column
Due to space restrictions, the descriptive text of events
in the labels column of the timeline view are elided.  This
patch adds tooltips on mouseover with location and details.

Change-Id: I229988e114f21e4d9575dff137aa91918ad1afa3
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-13 11:28:43 +01:00
Christiaan Janssen
72c06cb6fd QmlProfiler: timers for all profiler activities
Change-Id: I2ecbf4d1d90e353506e7c164560b69b81fcc6c66
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-07 10:46:01 +01:00
Christiaan Janssen
1cd6972ac8 QmlProfiler: minor adjustments to timeline UI
Change-Id: I74460d9a32ced707fa4a550199bba5f5906f417e
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-05 10:10:40 +01:00
Christiaan Janssen
8c64d132fd QmlProfiler: improved look of the timeline UI
Change-Id: I5d79394529f3ba303e7353a60df77f59bbe38a12
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-11-24 13:53:05 +01:00
Kai Koehne
e249265a96 QmlProfiler: Don't let timer run if we cannot connect to port
Previously the timer was started as soon as we connect, but we
should actually make sure the service is there.

Change-Id: Ic59ccb4a402a54dc1fc1f0c92ca2f80dad436581
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-11-11 12:51:44 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Christiaan Janssen
d09b3b903d QmlProfiler: link selections in events and timeline views
Change-Id: I1fb511fdb77e7c74f66624fcc88c2e0ce9adb457
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-10 11:03:43 +01:00
Christiaan Janssen
c4694275fb QmlProfiler: option to get statistics from local region
Change-Id: Id11cce971b081d67052dd8e7c74f51e2e25a8fd8
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-10 10:21:44 +01:00
Christiaan Janssen
bddfae7182 QmlProfiler: refactor postprocess step in internal statistics
Change-Id: Id6ea03161ccad92a27a664e84f56b2a49400be91
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-09 16:34:17 +01:00
Christiaan Janssen
71763310ad QmlProfiler: center event on clicked in details
Change-Id: I6e81089b3014f15545be4c40e0909ff2a37dbe1b
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-04 14:56:54 +01:00
Christiaan Janssen
886e613572 QmlProfiler: nonzero trace starttimes
Change-Id: I734c1af79a4975f5f331f212721331ea877b391a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-03 12:48:18 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Christiaan Janssen
bf4dfd5e74 QmlProfiler: optimized timeline display
Change-Id: I0d7cf110356ef5f805b81a5fc39dca3870765ea3
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-02 10:14:09 +01:00
Christiaan Janssen
3a4710e780 QmlProfiler: updated zoom controls
Change-Id: I3e09e0879a44f1dbf03f3989267aaf79c959526f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-01 17:01:55 +01:00