Commit Graph

32 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Alessandro Portale
d1df55d128 QmlProfiler: Modernize
modernize-*

Change-Id: Ibdf9c0ae91bf8a622facc7f323112b550f532f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-12-02 14:27:29 +00:00
Ulf Hermann
e0cab79965 QmlProfiler: Clean up type selection in statistics model
The statistics have one extra valid event type: "Main Program". This
should not be mapped to typeId -1, as -1 is the invalid typeId. Map it
instead to std::numeric_limits<int>::max() and remove all the hacks
around it.

Additionally, optimize the selection algorithm for the statistics main
view: We don't need to iterate all types to select one. We can rather
use the fact that the row numbers in the source model match the type
indices (except for the two special ones).

Change-Id: I7c4dc4f84fd167f9a21c418466ad2bfce56e441f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 09:09:32 +00:00
Ulf Hermann
b135306d9f QmlProfiler: Remove now-unused members from statistics
Change-Id: Ibf56f405dc51a82d0f56ab300905b1137375d5c0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-16 14:16:03 +00:00
Ulf Hermann
4aa432bb9a QmlProfiler: Eliminate QStandardItemModel from statistics
This resolves the data duplication between model manager and statistics
models, that gets in the way of updating the details strings on the fly.

Task-number: QTCREATORBUG-20106
Change-Id: I1c4881f903402dff936267de03b84d05ab7c39ca
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-16 13:35:44 +00:00
Ulf Hermann
495b9aa9c2 QmlProfiler: Make statistics models QAbstractItemModels
This way we will be able to replace the QStandardItemModels in a next
step.

Change-Id: I863fde958d29c8bf8c36aa1f501cb1224720ad7a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-16 13:35:33 +00:00
Ulf Hermann
87c12c4e1b QmlProfiler: Store statistics data in a saner way
We don't need to retain the durations after finalize(), and we can use
vectors instead of hashes, as we will cover almost all types anyway.

Vectors allow us to potentially use the position of an item in the data
as its row.

Change-Id: I2c09406f0e0a42f5f517f8444755b1664efb8f3b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-16 07:16:35 +00:00
Ulf Hermann
1155601da5 QmlProfiler: Move some methods from statistics view into model
This allows us to tighten up the public interface of the model.

Change-Id: Iaa0363993de7cd94c3468d2c939198e65746e829
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 10:15:44 +00:00
Ulf Hermann
f94e048c2f QmlProfiler: Un-pimpl statistics classes
They aren't part of any public API and the pimpl pattern just gets in
the way here.

Also, initialize members inline where possible, remove redundant
deletes, prefer explicit ownership over parenting, and use
std::unique_ptr for owned objects and QPointer for non-owned QObjects.

Change-Id: Ibe1e1f88d0e38b6ca26544fccb1db6b809d1556b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 09:12:10 +00:00
Ulf Hermann
5aaaa7c198 QmlProfiler: Get rid of field/column mapping in statistics view
None of the fields are ever unavailable, and they are always shown in
the same order, so we can just use the enums directly instead of a
mapping and an extra whitelist. This enables us to also drop some magic
numbers. In addition, none of the items have children. So we don't need
to expand or collapse them.

Change-Id: Ibf3d1933d1fb703f5d8e74ae5043c3d1db462738
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 05:51:34 +00:00
Ulf Hermann
046e4db97a QmlProfiler: Remove slots declarations and Qt4 connections
The signals from QML are relayed through the respective models, so that
we don't have to use Qt4 connections there.

Change-Id: I864b49061c1f28acbebfc7378bfe39f96d3cae18
Reviewed-by: hjk <hjk@qt.io>
2017-09-07 12:48:14 +00:00
Ulf Hermann
548a86f577 QmlProfiler: Add text marks for QML/JS types into documents
The text marks are little labels next to the lines in the editor
that tell you how much of total run time was spent in the
respective QML/JS construct during the last profiling session.
This is similar to what the valgrind profiler does.

We add the text marks only when the documents are loaded into an
editor. This keeps the number of text marks manageable. Multiple
events on a single line are shown using a tooltip.

Task-number: QTCREATORBUG-17757
Change-Id: Ie38b8ab880a718a1ef72ef343d84070ab34bc5bc
Reviewed-by: hjk <hjk@qt.io>
2017-02-21 10:43:47 +00:00
Ulf Hermann
2ad8e27d53 QmlProfiler: Make the views accessible from the view manager
And then, drop some methods we don't need anymore.

Change-Id: I057bdc012072abddca2df83918ee9a0460f78611
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-12-28 10:48:14 +00:00
Ulf Hermann
5101a504b3 QmlProfiler: Clean up statistics view
Fix some misnomers and remove an unused declaration.

Change-Id: Ia5e30ccc7c465a10c5214b7fe025aa0f578cdab4
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:33 +00:00
Ulf Hermann
d527cc8d5a QmlProfiler: Add default argument for parent widgets on event views
Change-Id: Id67e87920a09ff2f5f5bbf73327f2cac6b299973
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:36 +00:00
Ulf Hermann
4a1e5a637a QmlProfiler: Drive event loading from the model manager
We want to get rid of the big master list of QmlEvent in
QmlProfilerDataModel, as that gets very large for longer traces. In
order to reduce the dependencies on that list we load the events on the
fly into the child models while they are being received, rather than
having the child models query QmlProfilerDataModel for the event list
later.

As the trace client so far only emitted rangedEvent() for complete
ranges we run into problems with models that need their events sorted.
The rangedEvent() signals were sorted by end time, rather than start
time which makes it inconvenient to analyze them in a stack based way,
for aggregation. This is solved by passing on all the details from the
trace client to the models, with the QmlProfilerDataModel aggregating
the type information before having the events dispatched to the child
models.

Change-Id: I5831a20551f21cf91e27d298a709f604ebd96c3e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-23 12:31:44 +00:00
Ulf Hermann
dd87df7e5d QmlProfiler: Load data event by event in aggregated models
This paves the way for driving the event loading from the model
manager. Also, unify the loading and eliminate the two different
classes for the children models.

Change-Id: Ic89e757963292d75b3b6fd7d6012f09194dff5a9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-23 12:31:28 +00:00
Ulf Hermann
a53780924d QmlProfiler: Apply some code cosmetics
Change-Id: I772713aec3a6c25136174b39b853a9ef3ee42a0b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-06 10:27:09 +00:00
Ulf Hermann
e5a38bacc4 Move QmlProfiler specific files from qmldebug to qmlprofiler
These file were not used anywhere else and had no business to be in
qmldebug to begin with. Moving them allows us to drop a number of
namespace qualifications and forces us to rename a few local symbols
in other classes in order to avoid name clashes.

Change-Id: I658ed455eec027cbaddacf2980d2ea6827ae6205
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-03 15:00:50 +00:00
Ulf Hermann
a01dccb426 QmlProfiler: Remove QmlProfilerStatisticsView::getStatisticsInRange()
Change-Id: I49afff5b522fe51651b65046dc560aeb8217e23c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-29 13:32:50 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
hjk
931ee3382c Analyzer: Rework the dock widget layout generation
Decouple layout generation from widget generation and
separate analyzer action description from menu action creation.

Tool specific layouts are named "Perspective" now.

Change-Id: I774efe77a07640c4cc26e4e566662c8a673c8831
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-29 10:47:43 +00:00
hjk
aaf05f5acd Move analyzerbase to debugger
This is the first mechanical step to execute on the 'shared pool of
debugger/analyzer views' idea.

Future steps would be providing infrastructure for the view pool,
making all analyzer/debugger views use the pool and then re-extract
a sensible base for a 'analyzer-and/or-debugger' tool plugin interface.

Change-Id: I1bb392e6dd3084fc56937956bee1d6fd9530335d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-25 12:31:06 +00:00
Ulf Hermann
33916d8078 QmlProfiler: Remove duplicate signal declaration
We want the signal from the base class to be sent.

Change-Id: Ic681b3b8527b849f5edd9fec476e5e9e1768408a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-16 13:47:28 +00:00
Ulf Hermann
2e26d4abc8 QmlProfiler: Remove duplicate signal declaration
If the wrong signal was sent the desired slots weren't invoked. The
effect was that clicking on entries in the statistics view didn't take
you to the right source location anymore.

Change-Id: I187c3e53969558fb7992bb44f868c9d8730eaef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-16 11:28:43 +00:00
Tobias Hunger
dc8a12780f QmlProfiler: Fix warning during build
Change-Id: Ibfb33a67ee431159bdbe132ecd5cdce95cf6add8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-20 09:02:16 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Ulf Hermann
e4efb9bb3b QmlProfiler: Retrieve common actions from ActionManager
This removes the need to pass the QmlProfilerTool instance to all views.
QmlProfilerTool is exported so that we can access the common actions
from plugins.

Change-Id: Ie7072c23ef35763b729f4b87acce47ecbdb76e43
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:28:20 +00:00
Ulf Hermann
c16b843ecc QmlProfiler: Remove "Limit to Range" option from statistics view
You don't see the range you are limiting to in the statistics view, so
I doubt that anyone has ever understood what this does.

Change-Id: Ic9da3c1ac067f76d239a931d316a69a3999884a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:25:19 +00:00
Ulf Hermann
3cd2d375ff QmlProfiler: Rename QmlProfilerEventsModelProxy
It is only used for the statistics view.

Change-Id: I71027dd864715b4a2f95c2b11af0c0d83c514229
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:25:15 +00:00
Ulf Hermann
4223d76c48 QmlProfiler: Rename "events" to "statistics" view
Change-Id: Id552e0ead056214a7d72dd618c54897b55cd5e38
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:25:08 +00:00