Commit Graph

13 Commits

Author SHA1 Message Date
hjk
76185b3b09 QmlProfiler: Convert to a RunWorker based setup
This also re-enables the remote linux case and enables
the recording of a single run of events.

Change-Id: I9ea55017c8e5f2f17e6f32c5453df48093e41931
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-30 08:57:08 +00:00
hjk
89f02cba2c ProjectExplorer: Split Target and ToolRunners into smaller tasks
This increases re-usability of activities like 'port gathering',
and makes their use less dependent on actual device implementations.

Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-15 14:35:03 +00:00
Alessandro Portale
3624a663d8 Reduce usage of qApp in favor of static function calls
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.

This patch replaces many occurencies of qApp with the according
Q*Application classname.

Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
2017-04-24 18:36:28 +00:00
hjk
112e32228a ProjectExplorer: Merge AnalyzerRunControl into RunControl
The change is "conceptually wrong", the AnalyzerRunControl derived
classes' functionality should be provided by ToolRunners based classes
encapsulating/"being" the current Analyzer*Runner classes.

However, the AnalyzerRunControl is only three (empty even) virtual
functions, but a big obstacle in merging attempt due to a lot of
mechanical followup changes in downstream users.

The current construction mechanism of analyzer run controls is actually
two different mechanisms (locally direct RunControlFactories, and a
"generic" createAnalyzerRunControl wrapper for remote cases). The generic
createAnalyzerRunControl makes it difficult to migrated them one-by-one,
due to the various downstream users.

So instead of merging the per-analyzer two uses directly reduce
the "indirection" distance by removing the AnalyzerRunControl
intermediate layer. After that the createAnalyzerRunControl mechanism
can be dissolved by using normal RunControlFactories also for
the remote cases. After that, porting to ToolRunner, and combining
with ther local equivalent can be done one by one.

Change-Id: I0ddace33fcce210cf3a547ac5bb23b3d85013934
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:47:53 +00:00
hjk
2360a2d743 ProjectExplorer: Run RunControl::{start,stop} always asynchronously
This introduces a mini-state-"machine" to handle RunControl states
Intialized->[Starting->Running->Stopping->Stopped->]*->Finished.

Needing time between trying to start and getting feedback is nowadays
the normal setup for all remote targets as well as for most local tools.
Making that the default for all runs simplifies the code and provides an
opportunity to (a) fix some currently wrong reports of "stopped
immediately" and (b) to remove target-specific (WinRT) or tool-specific
(Valgrind, GammaRay) state members doing essentially the same.

Change-Id: I7f52fee41144188ee8389e922fdc265f8c0a6459
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-24 13:37:46 +00:00
Ulf Hermann
ec28a4b0f3 QmlProfiler: Work around QProcess not emitting errorOccurred
When given an empty string as executable and some non-empty arguments
QProcess might emit error() but not errorOccurred(). This was fixed by
2f0ffba638bdb868a810bc0349c240b6b6e172cd in qtbase, but we cannot rely
on that being present, yet. Thus, avoid passing empty strings as
executable.

Change-Id: Ia1bb5ebceb6edeca1e54489d12b838f3cea8851e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-11 12:32:27 +00:00
Ulf Hermann
dd3fa30212 QmlProfiler: The local runner can spontaneously stop an application
If the application outputs the "QML debugging is disabled" line (and
Qt Creator can read it), the QmlProfilerRunControl will kill the
application. In the test this happens if Qt Creator was compiled
without QML debugging enabled.

Change-Id: I958a991d304ec9af8643e88dd9709f580a28753f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-26 08:41:01 +00:00
Ulf Hermann
8067297edf QmlProfiler: Ignore messages in local runner test
Depending on the build configuration of Qt and Qt Creator there can
be various kinds of messages and we cannot reliably determine their
number in advance.

Change-Id: I162cc02a72200026d3cbe7498fa705911f4cda39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-25 12:21:19 +00:00
Ulf Hermann
30eab176fd QmlProfiler: Output unexpected errors in LocalQmlProfiler test
We want to know why it's failing.

Change-Id: I794f183d8aae7f0f7c6444b432d9a2e80db16f22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-22 07:21:20 +00:00
Ulf Hermann
f7924a23b2 QmlProfiler: Fix LocalQmlProfilerRunner test for windows
Start the process with valid environment, connection, configuration,
and better suited arguments, and re-enable the test.

Change-Id: I4ff92ab60d46f3a96a1eb7c8414abf0fc56e8b26
Task-number: QTCREATORBUG-16436
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:15 +00:00
Christian Stenger
a5a6206e92 QmlProfiler: Disable a plugin unit test on Windows
This test does start QC with '-version' which results in a (blocking)
dialog on Windows.

Change-Id: I75fc84382bf7228f17febe4b852db01362b02537
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-14 08:48:47 +00:00
Ulf Hermann
98207ae020 QmlProfiler: Give test processes some more time to start and stop
Change-Id: I144ee2201feba2d635d1b8af4f6afac78aecdf3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 08:55:11 +00:00
Ulf Hermann
16bf9227ba QmlProfiler: Add tests for LocalQmlProfilerRunner
Change-Id: I5d770adace7096f945e6385a62383282df3e5745
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:38 +00:00