Commit Graph

1631 Commits

Author SHA1 Message Date
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
d7cb00d10c QmlProfiler: Fix jaggy behavior of range start handle
The left handle of the range mover element didn't properly follow
the mouse movement. Also, a lot of code is duplicated between
RangeMover and SelectionRange. This change prepares RangeMover for
being reused in SelectionRange by eliminating external
dependencies.

Task-number: QTCREATORBUG-10762
Change-Id: Ia3b83101263e7af8ed46e1aaf4e92654b0068861
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-14 17:20:31 +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
Orgad Shaneh
4442a92729 Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-14 08:13:52 +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
d68d57ac4f QmlProfiler: Restrict greying of out-of-bounds timemarks to content.
Before the grey shadows appeared on white background if you
"overflicked" at the beginning or start of the timeline.

Change-Id: I53361b5eecfacbd48967ea7e0c564c3376a8b170
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-13 15:16:58 +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
9a1da15739 QmlProfiler: remove broken zoom toolbar
The zoom slider has to be rebuilt in QML as positioning QWidgets on
top of QQuickViews creates various problems we don't want to solve
for such a simple element.

Task-number: QTCREATORBUG-10635

Change-Id: I9aa22edd3e3a4fddb1d04545260ceacf22184260
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-13 15:15:51 +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
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
2dd9e781ec Trigger dataChanged in timeline model on stateChanged in model manager
Allow the timeline model to clear its caches if the model manager changes
states. The timeline model caches for example event categories which
become invalid if the manager assumes the state EMPTY.

Task-number: QTCREATORBUG-10706

Change-Id: I10529ac56d39b169b850a8b5250fd36cb65a57ba
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-11 15:15:57 +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
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
Ulf Hermann
ac7fe92efe Remove disconnectClientSignals() from ~QmlProfilerClientManager()
disconnectClientSignals only disconnects signals of objects that are
deleted directly afterwards. As deleting a QObject automatically
disconnects its signals it's unnecessary to explicitly do that before.

However, if QmlProfilerClientManager is deleted from the destructor of
QmlProfilerTool, receivers of those signals may have already been
deleted. This can lead to crashes.

Task-number: QTCREATORBUG-10634
Change-Id: I1e5ce7a6ac4b331fa423987e3a8faa3584b991d2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-05 12:24:56 +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
Kai Koehne
33ac7e4445 QmlProfiler: Make sure UI is properly rendered
Do the QML based painting when requested inside the UI thread, and
only copy the final canvas pixmap in the renderer thread (in paint()).
To avoid excessive re-drawing delay the painting via a timer to the
next event loop run.

The previous logic was still from Qt Quick 1 times, where the paint()
method was called in the GUI thread. This has changed in Qt Quick 2:
Here the paint() method will be called (on Unix) in a separate renderer
thread, making the drawRegion / onDrawRegion connections implicitly
deferred.

Change-Id: I298547013658e4cd1e94115305577bdb96cd0b2a
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-05 10:30:22 +01:00
Kai Koehne
0d65cf11d0 QmlProfiler: Set objectNames to QmlProfilerCanvas instances
Helps debugging ...

Change-Id: I9d6508e05e5f581f7d43f4b015fcfd4596f5d5ec
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-05 10:29:34 +01:00
Kai Koehne
fe1cf36e1f Remove support for debugging JS with Qt 4.7
Remove infrastructure to debug/inspect QML applications with Qt 4.7.

Change-Id: I277e9884e009475a29017f502bbe1d069317460f
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-11-04 16:32:33 +01:00
hjk
d7d27fccbc Rename plugins/qt4projectmanager to qmakeprojectmanager
This finally renames the plugin itself.

Change-Id: Ibdf4f4b4e9776c2fdc809e0127f3e1310de44bd1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-29 17:57:06 +01:00
Friedemann Kleint
119548a0ff Remove most leading/trailing blanks from translated messages.
They are a hassle for translators and reviewers alike.

Change-Id: I363138212b692cf75fe1605df8af3721315d37e1
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-24 10:50:56 +02:00
Aurindam Jana
314a93ca4b QmProfiler: Remove dependency to QmlProjectManager
Change-Id: Ia17ccafc13674555922a59264ea9f5df5abef060
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-16 16:26:03 +02:00
Aurindam Jana
37f90fd63f QmlProfiler: remove dependency on QmlProjectManager
Change-Id: I6c13ce1636bbaf201602e4a9473aca4f9953d1cb
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-15 17:56:15 +02:00
Aurindam Jana
0cf3ef5926 QmlProfiler: Use LocalApplicationRunConfiguration
QmlProjectRunConfiguration is now derived from
LocalApplicationRunConfiguration.

Change-Id: Ieddac63ff9832771ed141c3f0aff1bcc0313f6bf
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-15 17:53:09 +02:00
Aurindam Jana
fc0da55e1f QmlProjectRunConfiguration: Derive from LocalApplicationRunConfiguration
Change-Id: I4a7c29f2f679e62bae6fa3d01983851207e532c8
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-15 17:51:50 +02:00
hjk
a527fbe91c IDevice: Add a qmlProfilerHost function
This seems to be a better abstraction than the "pseudo dynamic cast"
in the QmlProfilerTool and the DebuggerPlugin itself.

Change-Id: If7dea70e1353852ebb6d3ce43220c0b03ccb4b00
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-10-11 13:40:53 +02:00
hjk
8f28a37d71 QmlProfiler: Remove unused code
Change-Id: I16b0d27eb622066bc4b02fffe3905a1818f3d12f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-10-11 13:26:04 +02:00
Nikolai Kosjar
b8dbac0b9c Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.

This is a follow-up patch to commit 872bfb7.

Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-10 15:56:12 +02:00
Leena Miettinen
e79d764f20 QML Profiler: fix UI text punctuation
Change-Id: I3950828a0b6a9c12aee4214d7c6db9bc551bd260
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-10-10 09:45:48 +02:00
Christian Kandeler
f1da03c73b qbs project files: Make use of new qbsSearchPaths property.
Change-Id: I396d970fafea1fd0b4c4d73883796662a1d0064b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-09 18:08:56 +02:00
Friedemann Kleint
005bef9295 Remove unused files qmlprofilerv8eventsview.cpp/h.
Change-Id: Ica255de84d9d523be7262ce65707d9ad49e456dd
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-09-26 14:08:02 +02:00
Christian Kandeler
7e9a413141 Fix qbs build.
There was more stuff broken by the switch to Qt Quick 2 than were
originally noticed, and the original fix was buggy as well.

Change-Id: I2b3e0619af923c52aba809355ac271b67097adf1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-19 13:27:55 +02: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
hjk
527046acc2 MessageManager: General cleanup.
Apply 'static' pattern, rename 'printToOutputPane' to 'write'

Change-Id: I6f31f1a8c914661e2a2182c0b6256b41ead28de7
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:51:00 +02:00
hjk
aadb6f16af SessionManager: Apply 'static' pattern
Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:28:12 +02:00
Christian Kandeler
15d1048ef2 Fix some include statements.
In several places, it says '#include "..."' for headers
from different libraries/plugins.

Change-Id: I96cd74fef9b30163adefe3e1720e0847bed9553a
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-04 15:51:36 +02:00
Christian Kandeler
72d173829c Remove superfluous include paths from project files.
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
    a) Paths that are already set in more general files
       such as qtcreator.pri.
    b) Paths that serve no purpose at all, possibly
       left over from earlier versions of the project.
    c) Paths that act as workarounds for wrong include
       statements of the form '#include "xyz.h"', where
       xyz.h is not in the same directory as the including
      file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.

Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-02 17:28:17 +02:00
hjk
87a0f018ed QmlProfiler: Simplify QmlProfilerClientManagerPrivate
Change-Id: Ib43417ef11ba9d052869e5088dd4c0cc551261c6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:36:45 +02:00
hjk
d66369e21d Core/Help: Clean up HelpManager interface and users
Change-Id: Ia6edf583f2a002d7c6f4878df670a78614ea087d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:34:39 +02:00
hjk
4a24df38a3 EditorManager: Use static pattern, adjust surrounding code
Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:22:56 +02:00
Friedemann Kleint
4d11977bb7 Reduce usage of QStringRef::toString() in the QML profiler.
Change-Id: Id246bea7c21c61c87d02e3a839b44617e24d58fc
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-08-29 13:45:34 +02:00
Christian Kandeler
0dab64b6cf Qbs project files: Use groups wherever applicable.
Provides better structuring of source files.

Change-Id: Ic2d0094312bb7c8da01a1f38270564407fdbefce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 17:30:36 +02:00