Commit Graph

1631 Commits

Author SHA1 Message Date
hjk
69753cf9b6 ProjectExplorer: Remove direct runconfig dependency from ISettingsAspect
Change-Id: I5d8a6a31f6bf97c34163b64b8d37f9ea070717ba
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-11 07:51:11 +00:00
Eike Ziller
ac9f1f798c Merge remote-tracking branch 'origin/4.7'
Change-Id: Ifb51ca9893549c478e99c9fc3ea6c32d5d5a28a2
2018-09-07 14:39:42 +02:00
Ulf Hermann
0b706608fc QmlProfiler: Listen on QHostAddress::Any in QmlProfilerToolTest
The attach dialog retrieves the host address to connect to from the
device's toolControlChannel(). All of the toolControlChannel()
implementations currently specify "localhost" as host address.
"localhost" means IPv6 on macOS and IPv4 everywhere else. Unfortunately
there is no shortcut for listening on a dual-stack local address in
QTcpServer and urlFromLocalHostAndFreePort() will try both v4 and v6,
returning whatever works. There is a shortcut for listening on a
dual-stack "any" address, though. As this is only the test, we can live
with exposing a TCP server to the internet for a short time.

Change-Id: I4114f03668e608f80353d21a59edf67db4b7f738
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 11:52:13 +00:00
Eike Ziller
8e05783019 Merge remote-tracking branch 'origin/4.7'
Change-Id: I4332eba9f1f66fef185359c79c4d96420d8b78ca
2018-08-30 08:31:25 +02:00
Ulf Hermann
8ef4964168 QmlProfiler: Don't scan the whole file system in rewriter test
QLibraryInfo::location() returns one string. Iterating over that gives
us the individual characters, beginning with '/'. Running that through
FileName::fromString(), gives us "/", and feeding this to
ModelManagerInterface::importScan() is not funny.

This has to be backported as the sheer volume of files to be scanned
makes the tests time out.

(cherry-picked from commit af8bd12387)
Change-Id: Ib4293437ab83da8ed10a696fba2c30f5c51c8124
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-29 07:34:26 +00:00
Ulf Hermann
3008255bb5 Tracing: Make notes in TimelineModelAggregator mutable
When the notes model is deleted, it becomes null. The notes model
belongs to TimelineTraceManager, not to TimelineModelAggregator.

Change-Id: I0ef9312620e08c06d31bc65976a887af0ca90c33
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-28 08:36:45 +00:00
hjk
e6e38df436 Debugger: Shift some perspective related API to the perspective class
Also, use QString uniformly for the (now rarely used) perspective ids.

Change-Id: I682062e7d179d0fcfd309e7714713bd1218bd8bb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-23 08:57:10 +00:00
hjk
32d2a4c985 Shift perspective ownership to plugins
Change-Id: Id146ca771b4dc92f35cf156efbabae154f2d940f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-21 15:38:22 +00:00
hjk
263cf4c608 ProjectExplorer: Remove RunWorker::setDisplayName
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.

Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:02:22 +00:00
Ulf Hermann
4b57f6ac3d QmlProfiler: Don't save the run worker in LocalQmlProfilerSupport
We don't need it and will dangle when the RunControl drops its workers.

Change-Id: I93e872083a870ad860624509622c5d779e35dfd3
Reviewed-by: hjk <hjk@qt.io>
2018-08-20 10:32:56 +00:00
Ulf Hermann
5b2ac16011 QmlProfiler: Don't stop the RunControl from RunWorker dtor
The QmlProfilerRunner is owned by its RunControl. It will only be
destroyed from the RunControl's dtor and therefore we don't need to stop
the RunControl at that point.

Furthermore, accessing the RunControl there is dangerous because it is
partially destroyed already.

Change-Id: I006e053bb9cd0da23cedb8fedfc46e049b72517d
Reviewed-by: hjk <hjk@qt.io>
2018-08-20 10:32:49 +00:00
Robert Loehning
fc399d9bb7 QmlProfiler: Initialize members of ...Private class in own ctor
Change-Id: I70f897df83a413f322127905e6310c64d7ce9b81
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-20 09:30:28 +00:00
Robert Loehning
f8fb8767da QmlProfiler: Initialize pointer
Change-Id: I592ba7c058cc8665dfd5e010bb14e77fa9072619
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-20 09:30:15 +00:00
hjk
3b5ecac238 Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.

The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.

Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.

Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.

The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.

There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.

The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.

There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.

Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:35:15 +00:00
hjk
1567679b81 Debugger: Tighten Perspective interface
Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 08:42:52 +00:00
hjk
f45f1a8cef Debugger: Make perspective toolbar items part of the perspective
This simplifies the toolbar setup and removes the need for the
stack of toolbar widgets.

The actions themselves have been owned by the plugin already,
so nothing changed in this respect.

Change-Id: I44754e16c8fc2acc53633dd9d560b1e732eece27
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-06 11:12:44 +00:00
hjk
01f2b982a2 Debugger: Move ownership of perspective dock widgets to plugins
Similar to the previous patch, but affecting more plugins: with dynamic
perspectives lifetime is better managed close to the code that knows how
to (re-)construct the items.

Change-Id: I0e7bfcf769d198ec2afa88b972be900baa1b6a46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-01 11:27:21 +00:00
Tobias Hunger
f685e2bfb4 KitManager: Use unique_ptr to manage kits
Change-Id: I8c66290f0d23afe37673bd858f7db135c8232a78
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-25 10:30:27 +00:00
Robert Loehning
f4f2ecc7c5 QmlProfiler: Fix placeholder
Change-Id: Ibb6d4abed9e7b7da1d3ccceaa04970d72769195a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-23 12:03:38 +00:00
Robert Loehning
8fefe0c591 QmlProfiler: Fix place markers
Using the numerus form requires "%n".

Change-Id: I18e32795d6f4f58e9b531e89572351d6520e7e33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-18 15:13:50 +00:00
Eike Ziller
56cd442693 Merge remote-tracking branch 'origin/4.7'
Change-Id: I441f2b093992fcc7af29541681206bd3175614e3
2018-07-18 12:03:08 +02:00
Ulf Hermann
37bcbf7575 Tracing: Make sure we don't cast between different kinds of events
Add a classId to TraceEvent and TraceEventType and add is() and as()
methods that check for it.

Change-Id: I76fe1df624516b36db90d57d4788b17e0b690726
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:03:59 +00:00
Ulf Hermann
c73c86e1a3 QmlProfiler: Remove extra file cache
The FileInProjectFinder has its own cache. We don't need to duplicate
it.

Change-Id: I90450ac734953e3747e55cb74505dd48e5f22f6e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:03:42 +00:00
Ulf Hermann
af8bd12387 QmlProfiler: Don't scan the whole file system in rewriter test
QLibraryInfo::location() returns one string. Iterating over that gives
us the individual characters, beginning with '/'. Running that through
FileName::fromString(), gives us "/", and feeding this to
ModelManagerInterface::importScan() is not funny.

Change-Id: I627e5739337efacc0632d8a476bb5ad3093793ea
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 09:53:06 +00:00
Ulf Hermann
d1d4d0cdcd Qml Profiler: Do toggle extended statistics when option is checked
Task-number: QTCREATORBUG-20778
Change-Id: I3390241c25ab7a87329bc8b20c49c32cf4c02944
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-16 09:41:54 +00:00
Alessandro Portale
3d3f14e3fe Prefer using 'override' instead of 'virtual'
warning: prefer using 'override' or (rarely) 'final' instead of
'virtual' [modernize-use-override]

Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-07-11 16:31:35 +00:00
Eike Ziller
997f7166fd Merge remote-tracking branch 'origin/4.7'
Change-Id: Ifec1f8dc20a18f432ec6ccf68153f31fff3f8b29
2018-06-25 11:07:03 +02:00
Ulf Hermann
36d5d3acc1 QmlDebug/QmlProfiler: Fix integer range checks
The packet protocol should check if the number of bytes to be read is
positive.

The check in QmlTypedEvent is supposed to happen before we cast the
number to the more restrictive type. Furthermore, if subtype doesn't
fit the range constraint, we don't have to do anything at all as the
default rangeType is already set before.

Change-Id: I45006f8dd752787d59960948b222148d78509aba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-19 10:29:29 +00:00
Eike Ziller
3bbe535b95 Merge remote-tracking branch 'origin/4.7'
Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
2018-06-19 10:03:28 +02:00
Ulf Hermann
5f9f8f9f16 Tracing: Handle mouse events in FlameGraph QQuickItem
Having an additional MouseArea as child of a ScrollView or a Flickable
is not well defined and leads to inconsistent behavior on different
systems. We can easily catch the relevant events in the FlameGraph item
itself. Also, don't redirect the typeSelected() signals through the
model. They don't belong there.

Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78
Task-number: QTCREATORBUG-20573
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-18 12:35:36 +00:00
Christian Stenger
a8e5b9e509 QmlProfiler: Fix unit test execution
Adjust to changed message - otherwise we get millions
of fails on macOS. Amends 0f2febd784.

Change-Id: If9a4c453ae952e708c873c4b11f550aa6632bbd5
Reviewed-by: hjk <hjk@qt.io>
2018-06-14 06:30:10 +00:00
Leena Miettinen
0f2febd784 QML Profiler: Fix punctuation in messages
Change-Id: Iebe1bb75a47d2aff7b5e92a6d6890ebe758c771b
Reviewed-by: hjk <hjk@qt.io>
2018-06-13 07:13:19 +00:00
Eike Ziller
9b43b55dc0 Merge remote-tracking branch 'origin/4.7'
Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
2018-06-11 16:01:18 +02:00
Ulf Hermann
27907bc417 QmlProfiler: When retrying to connect, double the timeout
If you are retrying, then probably you want it to be more patient this
time. Also, tell the user how long we have waited and how long we are
going to wait when retrying.

In turn, reduce the number of "internal" retries. Retrying 10 times
should be enough to determine if the given timeout is too short. This
will give us an initial waiting time of 2s, and make the second try 4s.

Change-Id: Ibdfe02d041550eb16cadc59cec1b78ce97289b30
Task-number: QTCREATORBUG-20529
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-06 12:44:47 +00:00
hjk
0fbb2839f9 Remove ApplicationLauncher::Mode
The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 15:08:29 +00:00
Eike Ziller
c585e7091b Merge remote-tracking branch 'origin/4.7'
Change-Id: Ib288796892faf5345d2a150a5ce0dadf91552924
2018-06-04 16:33:03 +02:00
Ulf Hermann
92530fd05d QmlProfiler: stop trying to connect when the application quits
Change-Id: I3b33ced218320a19fd4e4e834093c0f3b67a8cba
Task-number: QTCREATORBUG-20499
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-04 08:28:18 +00:00
Ulf Hermann
7b08624ae7 QmlProfiler: Only consider data as lost if we are recording
If the server stopped recording before breaking the connection, we're
fine.

Change-Id: Ic6d57cd4eb7c831cdd8aca1f305b44b9ecbd10dc
Task-number: QTCREATORBUG-20530
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-31 12:01:29 +00:00
Ulf Hermann
aee9cde160 QmlProfiler: In statistics view use source model for location lookup
The sorted model's rows are not equivalent to typeIDs.

Change-Id: I88868e192079f61bd1d336dac98142fd415d9a4a
Task-number: QTCREATORBUG-20501
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-31 07:50:48 +00:00
Ulf Hermann
cb70c38ca2 QmlProfiler: Actually update the details when rewriter tells us to
Before, only the signal was sent. While we're at it, also disambiguate
the method and signal names.

Change-Id: Iafce9b06841d7faedfefdb0638d0fa1f60c061c1
Task-number: QTCREATORBUG-20500
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-31 07:13:56 +00:00
Ulf Hermann
7a68196328 Tracing: Don't change visible features on clearing and replaying
This used to be important for the mockup in the Timeline, but as the
mockup looks just fine with all available features visible, we can drop
it. As TimelineModel::clear() clears the "hidden" flag, we have to
restore that one on initialize(), though.

As a side effect the visibility settings are retained across profiling
sessions now.

Task-number: QTCREATORBUG-20503
Change-Id: I1512ab7e494ed79d20e2097d68f8494990cfecbb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-31 07:12:04 +00:00
Ulf Hermann
5e66f834e3 QmlProfiler: Keep text marks when replaying events
The text marks are conceptually part of the type storage, not the event
storage. We need to hide them on initialize and show them again on
finalize, though, so that they get updated.

Task-number: QTCREATORBUG-20506
Change-Id: I5fe50110b99ea81b9a7585758a30fcad98bfcaa3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-30 07:49:38 +00:00
Ulf Hermann
a5f83fb66e QmlProfiler: Suppress debug message in test
The application is expected to fail after the transition to "Starting"
there.

Change-Id: I61e69df73ca9db82b9649727b69800927b1c16c5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-29 13:39:18 +00:00
Nikolai Kosjar
8960075b42 QmlProfiler: Fix comma in qbs file
Change-Id: I7ac4abf4b9a764c0d9ff2b7c3a8db299e92a2f7c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-29 13:23:45 +00:00
Ulf Hermann
6b9ff15ad5 QmlProfiler: Move action registration out of QmlProfilerTool
This enables us to have multiple QmlProfilerTool instances without
conflicting action registrations. Ultimately there should be a way to
unregister actions, or to add some extra description on which tool
instance they refer to, but this is a minimal first step.

The main problem this fixes for now is the warnings generated by the
tests.

Change-Id: I2193fc48a5a68c52f46e5567919f3035bc93df36
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 12:14:58 +00:00
Ulf Hermann
0f3409bf3f QmlProfiler: Set the future to finished after loading all events
Change-Id: I9b23eb5a10558279a47b9bcc106430d5c2b802e0
Task-number: QTCREATORBUG-20508
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 08:17:58 +00:00
Ulf Hermann
bfb3764328 QmlProfiler: Set the feature on Qml types when loading from qzt
Otherwise they are all invalid and nothing is loaded.

Change-Id: I12c71b231c81ce961754c1de67766010f00dd8d5
Task-number: QTCREATORBUG-20508
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 08:17:40 +00:00
Eike Ziller
c8c6b28e22 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h

Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
2018-05-28 16:10:23 +02:00
Ulf Hermann
bd659b2b99 QmlProfiler: Clear the model manager before deleting it
We cannot have the model manager clear itself from the dtor, as the
order of deletion between the various other objects parented to the tool
is undefined. Make sure we get into a clean state before the model
manager disappears.

This fixes the soft asserts when the tests shut down.

Change-Id: I8fcd52a7c2d0703cbdd215d85aa1d80c2e3296a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 12:54:39 +00:00
Ulf Hermann
ae5698fa8e QmlProfiler: Avoid double delete in details rewriter test
Using unique_ptr for parented QObjects is maybe not the best idea in the
first place ...

Change-Id: I95e2d1dd27f8f3d42d90d206e4fed0d866d1ea49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 08:58:44 +00:00