Commit Graph

295 Commits

Author SHA1 Message Date
Ulf Hermann
5d6f5ff2c9 QmlProfiler: Move unrelated code out of QmlProfilerClientManager
The client manager should not be bothered with details of QML events,
but rather just connect the client, the model manager, and the state
manager.

Change-Id: Iec4499f8441a06d4ef5cbcf7bfe23da6f5e7f239
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-08-05 10:44:46 +00:00
Ulf Hermann
62b1217818 QmlProfiler: Add some sanity to the client manager
Remove the PIMPL pattern, use smart pointers, add asserts for
important preconditions, add a timeout also to the local server case,
make sure all signal/slot connections to the old connection objects are
cleared when retrying to connect, make retry intervals configurable.

Change-Id: Ica7df0eaddc48778f13905795871d522401617ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-07-20 08:17:54 +00:00
hjk
3b233033b9 QmlProfiler: Add a "this" to capture list
Change-Id: I8bd7b0a8e488ee79262a46406f818d86326aabda
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-19 14:24:03 +00:00
Ulf Hermann
1cc8cd7f02 QmlProfiler: Move connection failure message to QmlProfilerTool
and show it on any kind of connection failure, not only on timeout.

Change-Id: I6b9c44cd3455d5dd383a552f9b422d3d236b67c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-15 09:22:45 +00:00
Ulf Hermann
48395b0e43 QmlProfiler: Rename registerProfilerStateManager()
... to follow the convention for setters.

Change-Id: Id471a93a1be1beed0438fed710fa09afa5ee2832
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-13 13:58:55 +00:00
Ulf Hermann
80e6bf1ef5 QmlProfiler: Terminate waiting processes when Complete arrives
Previously, in AppStopRequested state we would wait until we are done
processing the data. This is problematic as when aggregating traces
this doesn't happen spontaneously. If we've explicitly asked the
process to terminate it's safe to do so after receiving Complete as
we won't need any more data after this.

Change-Id: I64111ce6039ffc7f6815425c6b7e4432ac528c86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:09 +00:00
Ulf Hermann
51055e6799 QmlProfiler: Don't needlessly defer state transition from dying to idle
Otherwise we can run into an inconsistent state when we try to restart
the process while we're still "waiting" for it to die.

Change-Id: I82afd272a73b3be79328c45c8d027621d1feeace
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:01 +00:00
hjk
db9437c2e8 Generalize IDevice::qmlProfilerHost
The idea is to have a way for tools to specify what kind of
control channel they would like to use to communicate with
a device without making the choice explicit dependent on
the exact kind of tool to further decouple device and tool
implementations.

The 'hint' values are there to help the device implementation
to decide on which channel to use exactly in case there are
multiple choices. In any case, the tool is responsible to
check that the returned channel is suitable for its operation.

Currently the only choice is "QmlControlChannel" yielding
a simple wrapper around the former IDevice::qmlProfilerHost()
return value.

Other enum values may potentially be {Tcp,LocalSocket}ControlChannel
(to specify a type of transport) AdbChannel (to specify some
generic helper mechanism). It might also turn out that something
more complex than an enum will be needed, e.g. to express
a set of values with priorities or such, but I'd rather
avoid overengineering for now.

Change-Id: Id386425eb3dd2bb395065f0bdb6f67217cd40a71
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-08 08:16:22 +00:00
Ulf Hermann
b3fa768dfd QmlProfiler: Don't populate the file finder if there is no run config
Change-Id: I1cce87162836e0579577616956d9993f26e00a01
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:23 +00:00
Ulf Hermann
7ecd0763b9 QmlProfiler: assert that connections are AnalyzerConnections
... before accessing them as AnalyzerConnection

Change-Id: I6f6111ca3b0dede93ac85fbcb5ffbfcf3c7b19aa
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-03 08:45:01 +00:00
Alessandro Portale
a6683575c4 Icons: Move "next/prev", "[un]locked" and "zoom" from Core to Utils
They are needed in the timeline view.
The change in qtcreator-project.qdocconf makes sure
that qdoc still finds the referenced icons.

Change-Id: I812fba8e57d06d93efc00c295467c83c08cd1784
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-31 08:51:12 +00:00
Ulf Hermann
5ee38fda5b QmlProfiler: Remove duplicate method
Change-Id: Iad8420e5836ad8bc3efc9ecf67bf85b005ede7d5
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-24 07:44:03 +00:00
Ulf Hermann
ecd8e764dd QmlProfiler: Add a binary trace format
Storing traces in binary form is preferable as loading and saving is
faster and the trace files are smaller.

Change-Id: Ia7340ac526d5ce9391b1e32fc48fc1fab3ffa13d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-23 12:32:10 +00:00
Ulf Hermann
67378a7928 QmlProfiler: Restore feature visibility when starting data aquisition
Some models check the visibility to determine what to load.

Change-Id: I94d42ddc6e531d04f240c66d4b789826d8c17cf6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-23 11:52:32 +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
Eike Ziller
0f94aa3f4d Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/projectwizardpage.cpp
	src/plugins/projectexplorer/xcodebuildparser.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/tools/clangbackend/ipcsource/translationunits.cpp

Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
2016-05-03 11:49:01 +02:00
Ulf Hermann
75d8169e1e QmlProfiler: Repopulate the file finder when loading a trace
We might have opened or closed projects since the last time we
populated the finder, and we will need the files from those projects
to resolve file names in the trace.

Change-Id: I5979702a105c60e1be452b0b029d01d7498bff3d
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-02 11:35:52 +00:00
Alessandro Portale
e42dd1eb70 Move "Clear/Clean" icon from ProjectExplorer to Core
And use it in the menu entry for
"Window->Output Panes->Clear"

Change-Id: Iff8c011fde8a21fd10bf52b35163eb3f63659153
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-27 16:45:41 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
Ulf Hermann
385237dbbd Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.

Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 11:06:34 +00:00
Ulf Hermann
88476a1435 QmlProfiler: Disable run controls after they are finished
Disabled runControls would still receive and send signals, confusing
the profiler state.

Also, connect lambdas with receiver argument where possible.

Change-Id: I0cd43456d3462efe402e9d68792b67314e9b6e0b
Task-number: QTCREATORBUG-16073
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-18 08:07:04 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Alessandro Portale
b81d624543 QmlProfiler: New Record ON/OFF button icons
Change-Id: I95f4a28de5aeefdd321a5fe131351a6aab5b9498
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 16:55:25 +00:00
Alessandro Portale
63cbcbc729 Locator: Remove old "Locator" menu icon. Re-use the "search" icon.
This patch removes the locator.png icon and replaces it with a
menu-friendly variation of the zoom icon.

The current ZOOM icon becomes ZOOM_TOOLBAR.

Change-Id: I8817c5c420801351db659caa4c4190a9074be720
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 15:59:10 +00:00
Eike Ziller
1ae483fc83 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/libs/utils/tcpportsgatherer.h

Change-Id: I495f3e05789f09efb8b1e84827893423a5b5b60c
2016-04-05 14:11:47 +02:00
Leena Miettinen
838216ab5b QML Profiler: Fix capitalization of UI text
- Qml > QML
- When an icon tooltip can be considered an action name, use
  book style capitalization and no punctuation.

Change-Id: I7ea6f4976f988c462160a4cdbecf14a792f8ca3f
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-04-05 09:55:20 +00:00
hjk
bcf7a11c24 Core: Apply 'static' pattern to Core::FindPlugin
Also, rename it to Core::Find. It hasn't been a plugin for a while.

Change-Id: I845885ccf18bdc1440258d523b033758d5583881
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-15 12:43:59 +00:00
hjk
5996ff0ab8 QmlProfiler: Disable start actions during building
Helps to prevent multiple starts of the tool in parallel.

Change-Id: Ibd2d0a66e7ce08ea07604f13fbee6d18a40dfc39
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-03-10 13:02:06 +00:00
hjk
92e301a054 Debugger: Merge debug mode and analyze mode
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.

Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.

Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.

Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.

Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.

Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-07 15:06:10 +00:00
Eike Ziller
f4e87a7e0c Merge remote-tracking branch 'origin/3.6' into 4.0
Conflicts:
	src/plugins/projectexplorer/applicationlauncher.cpp
	src/plugins/projectexplorer/applicationlauncher.h
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
	src/plugins/qmlprofiler/qmlprofilertool.cpp
	src/plugins/qtsupport/uicodemodelsupport.cpp
	src/plugins/qtsupport/uicodemodelsupport.h

Change-Id: I6f6ae77422d99f4f422b108ade6b64273df9dd57
2016-03-03 16:10:04 +01:00
hjk
55dcec95f7 QmlProfiler: Shuffle tool widget creation around
Put the border between plugin code and view code in a more
natural place.

Change-Id: Ib5250a30e52ec9899dcb01bac23cdad62a2d5c5e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-03-03 09:57:31 +00:00
Ulf Hermann
dfa8e27968 QmlProfiler: Check runConfiguration for 0 before accessing it
Change-Id: I274d7a75313a899a2b0c05fddbe8e189f9b99156
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-01 09:00:31 +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
hjk
249a36b573 Analyzer: Remove AnalyzerRunControl::runnable() and .connection()
These re-implementations are conceptually "too specific". Rather let
the indiviual tools handle there expectations themselves.

Change-Id: I0bbea407b2241816a40d19eb1dbb0a7589cbda7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-29 09:39:47 +00:00
hjk
9ae2ce7629 ProjectExplorer: Drop LocalApplicationRunConfiguration
The functionality can be provided by producing a suitable Runnable
in the derived classes directly.

Change-Id: I7b8e8fe33fffd2b00176b6cf6633eca4e152e466
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-26 10:09:29 +00:00
Ulf Hermann
ed96957714 QmlProfiler: Fix logic in QmlProfilerTool::clientsDisconnected()
We want to do acquiringDone(), no matter if the app died or not.
Otherwise we wait forever for more data to arrive if the app has not
died.

Change-Id: Iad807ad75d7b8aba899211497586e5324124d16a
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-22 17:34:54 +00:00
Ulf Hermann
a1dd1e4c5b Add runConfiguration to remote tool starters
Most of them need a run configuration. It's better to pass the
right one than to use various hacky ways to work around it.

Change-Id: Ic21b0ef33bdd79b526b1e1a1ead5ca87d9f32c4d
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-22 17:26:17 +00:00
Ulf Hermann
434b51dca6 QmlProfiler: finalize setup when starting
Change-Id: If7cf8158bf4c0cd6a2ffff2d5157a98f2d8c0f50
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-21 09:05:52 +00:00
hjk
5dad96e3b7 QmlProfiler: Adapt QmlProfilerRunControlFactory to Analyzer changes
Change-Id: I8047cdb3fc65df2139c1a5770218c48e83ef5f5a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-20 16:08:07 +00:00
hjk
abe08966a4 Analyzer: Remove AnalyzerStartParameters from AnalyzerRunControl ctor
Change-Id: I0f7e982a9144469869e0c42daedfb411789511ca
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-20 11:06:50 +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
42d570a3fe Rename Project::ExcludeGeneratedFiles
We want to distinguish between source files and generated files. So
let's call them by their names.

Change-Id: I324c4b82ca7fb7d8d0e175ea6c4f14f1306ec929
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-13 14:12:08 +00:00
hjk
8150209ff7 Analyzer: Slim down AnalyzerStartParameters
* SysRoot can always be determined from kit.
* Pass around RunMode as extra parameter
  not as part of AnalyzerStartParameters.
  That's closer to the pattern used elsewhere.
* Environment was always initialized from the runconfig's
  EnvironmentAspect. The tools can do that directly.
* Provide setter for display name for cases where
  it is not equal to RunConfiguration::displayName

Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-07 18:11:09 +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
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Ulf Hermann
ffc11d5e9e QmlProfiler: allow for multiple sequential traces to be aggregated
Task-number: QTCREATORBUG-13317
Change-Id: Ic7d1d5c94d8d522741b6c4207a21a43f521da5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-19 12:16:44 +00:00
Ulf Hermann
7b4e253a1e QmlProfiler: Support local connections on Qt >= 5.6
This removes the need to receive messages from the application via
stderr. The "Connecting to socket" is still parsed, but only for
diagnostic purposes. If it doesn't arrive, the profiling will still
work.

Change-Id: I022691293da2a1e671ba1263bc76e4044bf1a5b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-19 11:33:20 +00:00
Ulf Hermann
b4e6591188 QmlProfiler: Convert connections to Qt5 style
Change-Id: I1a490add706cd0cfce3f243e4ebc32a8c9a975c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-02 10:12:42 +00:00