Commit Graph

30 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
Tim Jenssen
964f539e55 Merge remote-tracking branch 'origin/8.0' into 9.0
resolved conflicts:
* doc/qtdesignstudio/src/developers/studio-designer-developer-workflow.qdoc
* src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
* src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
* src/plugins/qmldesigner/components/navigator/choosefrompropertylistdialog.cpp

and compile fix in materialbrowserview.cpp

Change-Id: I686e7e93ded8ac1afc792942ded47cd9fe4341ed
2022-10-04 13:44:42 +00:00
Antti Määttä
b16d1e2b11 Add more checks for backwards compatibility
Stop using MaximumXXXType in events where they might be saved into
trace files. It makes older traces incompatible with new traces if
new fields are added since new versions treat them as valid events.
Instead use UndefinedXXXType that doesn't change if new fields are
added.

Add checks for event types greater or equal to MaximumXXXType where
they are missing so that older versions do not process new
unrecognized events.

Fix opening old traces by checking missmatch between quick3d event
and the range type.

Fixes: QTCREATORBUG-28146
Change-Id: I8950da2d636ef1fedf4500916896a9ecae222166
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-29 11:04:24 +00:00
Antti Määttä
0f49728c32 Fix backward compatibility issue with QmlProfiler
Previous implementation uses MaxMessage and MaxRangeType constants to
specify events with undefined message or range type. This causes
backwards compatibility issue if new message or range types are
added, because those constants are also written to files when saving
profiler traces.

Add UndefinedMessage and UndefinedRangeType constants and use those
instead of the MaxMessage and MaxRangeType constants. This doesn't fix
opening old traces, but the same problem won't happend again with new
traces.

Also update profiler autotests with fixed data.

Task-number: QTCREATORBUG-28146
Change-Id: Ief003d39f871dd1ff2cc908e6a4d4b4678fd0868
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-29 11:03:56 +00:00
Alessandro Portale
59ae002e92 QmlProfiler: Convert to using Tr::tr
Change-Id: I9f4f8c0e499eeb1e686d1094f3442c415b845c21
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-22 07:33:51 +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
34213f5717 Tracing/QmlProfiler/PerfProfiler/CtfVisualizer: Remove pre Qt 6.2 code
- Remove code for Qt below 6.2 from c++ sources and CMakeLists.txt
- Remove Qml code from .qrc files
- Qbs: Add qt.core.resource_data Groups for Qml code
- Remove OpenGL shader .frag and .vert files
- Remove Qml import version numbers

Change-Id: I3bd1cd95381e66c98ee3af4259e89b0b1eff0709
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-18 07:11:06 +00:00
Alessandro Portale
43c5944571 Tracing/QmlProfiler/CtfVisualizer/PerfProfiler: Compile with Qt 6
This makes the tracing lib, its tests and the three plugins which depend
on the lib compile with Qt 6.

The rectangles are not yet shown most likely because some OpenGL
specific code was #ifdef-ed for Qt 6. That code needs to be
reimplemented on top of the new Scenegraph API, using the RHI instead of
direct OpenGL in a follow-up patch.
An assertion failure in QQuickWidget::createFramebufferObject() needs to
be fixed as-well.

The code still builds and runs assertion free (and the autotests pass)
when built against Qt 5.

Task-number: QTCREATORBUG-20575
Change-Id: I47ebb477823de2f0d27329dac7c292a466cea1d7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-09 15:30:21 +00:00
Ulf Hermann
86b368f912 QmlProfiler: Rename all the timeline model data structs to Item
This allows us to define a template for filling a
QmlProfilerTimelineModel without spelling out all the type names.

Change-Id: I97870287a795d95f58a949729afa715f145817bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-11 15:41:55 +00:00
Ulf Hermann
9685711cb3 QmlProfiler: Remove accepted() methods
The only place where we used them was handlesTypeId(), and there it was
wrong. Each QmlProfilerTimelineModel has exactly one main feature it
subscribes to. It might additionally accept events of some auxiliary
features for context, but it doesn't really "handle" the respective
types in the sense that you could, for example, attach notes to them.
Therefore, just checking for the main feature is the right thing to do.

Change-Id: If0c00444084b957f3b99d3456cdbf703ae4afc3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-11 15:41:45 +00:00
Ulf Hermann
734611131d Move Timeline and FlameGraph into a common "Tracing" library
This allows us to share code between the two, in particular the QML code
for the Details window, and the theme code. This way we can potentially
deduplicate some code.

Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 14:08:47 +00:00
Ulf Hermann
1c2e0f387f QmlProfiler: Move parts of model manager and trace file to Timeline
This way we can use the trace file loading and saving mechanism for
other profilers.

Change-Id: I98ec1cdde6f7abcea152cabf72e64d4e696dfa59
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-19 08:09:07 +00:00
Ulf Hermann
780d4c6a43 Timeline: Move modelId generation into aggregator
The way the notes model works requires every timeline model to have a
different ID. Conversely no other kind of model actually needs an ID.
Therefore it makes sense to have the TimelineModelAggregator manage the
IDs as every timeline model will sooner or later be associated with an
aggregator.

Change-Id: Ib8b2c88ed883351d4e3e156dd13e1dd113c21808
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 14:11:51 +00:00
Ulf Hermann
7ca958fa85 QmlProfiler: Integrate TraceTime into ModelManager
We never use it independently and only a subset of its interface needs
to be public.

Change-Id: I97bbc638270bcbb8fb1a4097fcfeacf37e96c048
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 12:17:23 +00:00
Orgad Shaneh
eea6a7c3b3 Utils: Purge qtcfallthrough.h
No longer needed.

Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:13 +00:00
Friedemann Kleint
f482270432 Introduce Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: I9d06d04b496c9ec060e13e1be6f43d8fbadb1f3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-24 14:50:43 +00:00
Ulf Hermann
13910a1176 QmlProfiler: Accept unknown input events
We might get more event types in the future and filtering them is harder
than just displaying them. Also, traces might contain invalid input
events which would trigger the assert.

Change-Id: I9b38422af953ebb65363fc2b7a91facb7f757976
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2017-09-12 14:24:01 +00:00
Robert Loehning
9a9f1f9cfe QmlProfiler: Add comments about deliberate fallthroughs
Change-Id: Ia9a7d62f8f3dbc753f2746f3f53f5557d9607d45
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-21 12:19:22 +00:00
Ulf Hermann
405c456d0d QmlProfiler: Print timestamps with context
For traces that start at a high timestamp, we want the timestamps to
still have some meaning. Without context the formatter will only
print something like "5h 25m" for all of them, which is not very
useful.

Change-Id: I7ec37659083f967c9ed03a843f6b7c9430214670
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-01-04 16:57:03 +00:00
Ulf Hermann
18332d15b5 Timeline: Move printTime() into Timeline and add hours, minutes, nanos
We should use it for all time printing instead of duplicating the code
everywhere.

Change-Id: I530baa31fd7044aefce6201fec0ab27c99a61a1d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-12-19 13:24:16 +00:00
Ulf Hermann
faf77fd0e5 Timeline: Use QRgb and a lookup table for colors
It makes no sense to return a QColor as the only things we are using
are the red, green, and blue components. Furthermore, colorFromHue()
can only generate 360 different colors which we can easily cache
instead of recalculating them on each request.

This significantly reduces the time it takes to update the timeline
render nodes.

Change-Id: I7961014364a1bec5b089285148b2e6c141a6dc7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-09 11:55:02 +00:00
Ulf Hermann
e10bc709bc QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally
change them.

Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:05 +00:00
Ulf Hermann
c3a873b906 QmlProfiler: Add some consistency to input events model
Methods that are public in the base class should also be public in the
derived class. Also, the accepted() method takes a type, not an event.

Change-Id: I086d382ffc2e71c7efda56b0dbf341942986582c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:43 +00:00
Ulf Hermann
5ba6f04d4b QmlProfiler: Load the timeline model data event by event
All the models do the same thing when loading the data: They iterate
the list of events, determine for each one if they accept it, and if
so, they load it. After the list has been fully loaded, they do some
finalization. This can be centralized, and ultimately we won't need to
expose the central QVector<QmlEvent> for that anymore.

Change-Id: Ia82facfdc3968200bbec323a02f2fcc02ac44e9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-23 12:04:49 +00:00
Ulf Hermann
1093be0425 QmlProfiler: Remove detailed progress tracking
The progress bar in the state widget was rather meaningless. We rarely
know how many events we expect and it's rather hard to tell how long
each model will take to process them. Instead, we just show a 0-ranged
progress bar to tell the user that "something is happening".

Change-Id: Icb80840d1f0a1538bcf254faa37cbb36e25d342c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-23 11:44:13 +00:00
Ulf Hermann
8d15633a22 QmlProfiler: Add a QmlTypedEvent and extend QmlEvent
The QmlTypedEvent is mainly useful to read a generic QmlEvent and
QmlEventType from a QPacket. QmlEventType has a stream operator to do
exactly that. QmlEvent also gets further options to store 32-bit data
in addition to 64- and 8-bit data. Also, with the more generic storage
layout we can reduce the memory consumption of range events by 50%.
This comes at the cost of additional memory allocations for non-range
events, but as non-range events are significantly less frequent than
range events, this is a good tradeoff. Finally the new storage layout
lends itself to efficient serialization, which will help when
developing new storage and transfer formats for QML traces.

Change-Id: I420de68b0142f23c8fb2ca8b329d7ffe69c83fe0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-09 08:20:22 +00:00
Ulf Hermann
215c0533d2 QmlProfiler: Rename QmlEvent::startTime to "timestamp"
As many events are instantaneous and we're going to drop the duration
property soon, this is more fitting.

Change-Id: I6e13dd076a5b9df16aed44bf9f631ea5760e9cbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-06 10:36:40 +00:00
Ulf Hermann
a955537132 QmlProfiler: Fix the naming scheme for events and event types
Move them out of the QmlProfilerDataModel class, drop the "Data"
suffix, and rename symbols that refer to them in order to call them by
their names.

Change-Id: I41151359921b325edb79111371083c4185bd148b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-04 09:49:32 +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
600e1cdcea Merge QmlProfiler and QmlProfilerExtension plugins
Change-Id: Iaa1de7afda664a7a0779f47d104f863a16a34976
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-26 14:10:17 +00:00