Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Ulf Hermann
916883e70f Tracing: Move event storage out of trace manager
This is a step toward making the trace manager non-virtual. It should
just juggle the storages for types and events, and manage the threads to
access them. It doesn't need to know what exactly it stores.

Change-Id: I45093c60d8ae921e68aeb09bd48d24d5877ce306
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 16:26:55 +00:00
Ulf Hermann
6e0373adb3 Tracing: Move the type storage out of the trace manager
When we replay events we want to keep this constant and pass it to the
event receivers as separate entity. This way we can move the replaying
to a separate thread.

When loading we will have a similar situation, but then the loading
thread will create a new type storage and later assign that to the trace
manager.

Change-Id: I11402ed1e0663da6da5b61b15bba40e1a62adc4b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 16:11:25 +00:00
Ulf Hermann
dcd8d37f35 QmlProfiler: Don't expose the vector of event types
We always want either the total number of event types or one specific
type. There is no need to expose the fact that we keep them as a vector.

Also, use int as the type of the "number" methods as that aligns better
with Qt containers, and rename the methods. We don't need to state the
fact that we've loaded the events and types at some point.

Change-Id: Iaf680ec9fa10e1070ddee6bcc079800e401775f0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 12:20:57 +00:00
Ulf Hermann
41017d1bbd QmlProfiler: Use a predictable kit in the QmlProfilerTool test
We may not have a valid kit at all, and then the test would fail.

Change-Id: Ie2613e67309121f0df847e76668bc433fd88c315
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-19 17:03:11 +00:00
hjk
da33f94e20 QmlProfiler: Pimpl QmlProfilerPlugin class a bit more
... to be able to remove an unneeded use of the global object pool.

Plus some code cosmetics.

Change-Id: Ifdb0ff9cd40820a34a8951563402a50a594e4fdd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-19 10:17:36 +00:00
Ulf Hermann
89a6611e9e QmlProfiler: Test that server recording changes only clear events
... and not event types.

Change-Id: Ic6c4ac3ef52bf07678d1ff0c0aaaf15242ea472e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-13 10:55:34 +00:00
Orgad Shaneh
d3096f0f73 QmlProfiler: Fix build
Resolves a build conflict between e1ad7a1784
and cfd54505eb.

Change-Id: I70baec1ca2f388bc699866a134c9cb6f64203fdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-17 19:44:58 +00:00
Ulf Hermann
cfd54505eb QmlProfiler: Improve robustness of QmlProfilerTool test
The QmlProfilerClientManager will only report connectionClosed() if the
connection was open before it dropped. If the connection never opens,
that is the hello message never arrives, it will retry a few times,
triggering the QTRY_VERIFY timeout.

We don't want the retries to succeed, so close the server after the
first connection. Furthermore we want the hello message to be
transferred before dropping the connection, so check for isConnected().

Change-Id: Ie96c48b2aaf2748d082c4bef3efe85c261ca4812
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-17 14:31:09 +00:00
Ulf Hermann
e1ad7a1784 QmlProfiler: Drop static accessors from QmlProfilerTool
It wasn't really a singleton even before. For testing purposes make the
client/state/model managers accessible.

Change-Id: Ie5efbc47a6b9119495f999e4e05877d4789da407
Reviewed-by: hjk <hjk@qt.io>
2018-01-11 14:04:13 +00:00
Ulf Hermann
58ae456f4b QmlProfiler: Verify attached RunControl stops when connection closes
Change-Id: I2b7bd63c4e84fcb0e78318f810ed54e58468d05e
Task-number: QTCREATORBUG-19496
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-09 17:02:05 +00:00
Ulf Hermann
747818291d QmlProfiler: Test that attachToWaitingApplication tries to connect
Change-Id: Ic71cb60b70e9b68e455795511594a6be5739eb5f
Task-number: QTCREATORBUG-19496
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-08 15:14:27 +00:00