aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QmlProfiler: Merge LocalQmlProfilerRunner and QmlProfilerRunnerhjk2017-06-121-167/+0
| | | | | | | Also streamline code paths in the result. Change-Id: Id7d96343a8f778ba8f415b1a850cc78576afa475 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlProfiler: Convert to a RunWorker based setuphjk2017-05-301-7/+15
| | | | | | | | | 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>
* ProjectExplorer: Merge AnalyzerRunControl into RunControlhjk2017-04-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Utils: Introduce a TemporaryDirectory and TemporaryFile classTobias Hunger2017-01-201-1/+3
| | | | | | | | Both wrap the corresponding Qt class, but make sure all temporary files or directories are created inside a "master temporary directory". Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlProfiler: Move output parser into LocalQmlProfilerRunnerUlf Hermann2016-08-291-0/+29
| | | | | | | | | | | | | | | In the general case we don't want the QmlProfilerRunControl to parse the QML debug port from the application output. As for most platforms the ports are mapped via some remote connection mechanism the parsed port is almost certainly wrong. In the case of local connections, however, the port is actually correct, so we keep the output parser in the LocalQmlProfilerRunner. Change-Id: Ifdaae85196d8b034e67bc2ba0b8c05be980b62e5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlProfiler: Assert for sane configuration in local runnerUlf Hermann2016-07-051-0/+2
| | | | | Change-Id: Idec9531019b1b95bbacf5d5bd5ea68168e28e895 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QmlProfiler: Remove QmlProfilerPlugin::debugOutputUlf Hermann2016-06-061-19/+2
| | | | | | | I doubt that anyone has ever used it. Change-Id: Icf8c6513f5cdd10a9aa790e7373df9eba7c12ef2 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Don't send stopped() signals before started()Ulf Hermann2016-06-061-1/+4
| | | | | Change-Id: I225c4786b8720e24085175cb1c13c662417fd9d8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Rename "engine" to "runControl"Ulf Hermann2016-06-061-6/+6
| | | | | | | Call it the same way it's called everywhere else. Change-Id: I5e61275c264c337307643c0874b7c764c4e18118 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Remove useless dtorUlf Hermann2016-06-031-5/+0
| | | | | | | Signals will be disconnected by QObject dtor anyway. Change-Id: I193fa207e02b8f91258d165f0a7eacb0ccc4b9df Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QmlProfiler: Pass AnalyzerRunControl to LocalQmlProfilerRunnerUlf Hermann2016-05-301-4/+4
| | | | | | | | It doesn't make much sense to require a non-exported class to be passed to the ctor of an exported one. Change-Id: I15463f3ec0153a71cb55ad83724ec071a504a483 Reviewed-by: hjk <hjk@theqtcompany.com>
* Merge AnalyzerRunControl::logMessage and RunControl::appendMessagehjk2016-05-201-1/+1
| | | | | | | | | | | The tools' ability to hook into processing of the output is retained by making the function virtual. Also remove the unusual overload of the RunControl::appendMessage slot and the signal of the same name by renaming the signal. Change-Id: If3c3cc2dd9c933169dc30b16e3165c9b3cf1440e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlProfiler: Apply some code cosmeticsUlf Hermann2016-05-061-1/+4
| | | | | Change-Id: I772713aec3a6c25136174b39b853a9ef3ee42a0b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Use Utils::Port where possibleUlf Hermann2016-04-201-5/+8
| | | | | | | This solves the ambiguity between 0 and -1 being the "invalid" port. Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5 Reviewed-by: hjk <hjk@theqtcompany.com>
* Debugger: Merge debug mode and analyze modehjk2016-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* ProjectExplorer: Use StandardRunnable in ApplicationLauncherhjk2016-01-281-4/+5
| | | | | Change-Id: I7092d748207762d3dbd6c69c01cc06c88cbf63d8 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* QmlProfiler: Use StandardRunnable in LocalQmlProfilerRunnerhjk2016-01-281-8/+8
| | | | | Change-Id: I8c59f9dfe562717edd86453b0154b7f2811a06f3 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* ProjectExplorer: Drop LocalApplicationRunConfigurationhjk2016-01-261-1/+0
| | | | | | | | 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>
* QmlProfiler: Adapt QmlProfilerRunControlFactory to Analyzer changeshjk2016-01-201-48/+8
| | | | | Change-Id: I8047cdb3fc65df2139c1a5770218c48e83ef5f5a Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Analyzer: Slim down AnalyzerStartParametershjk2016-01-071-3/+4
| | | | | | | | | | | | | | | * 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>
* QmlProfiler: Support local connections on Qt >= 5.6Ulf Hermann2015-11-191-6/+24
| | | | | | | | | | 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>
* QmlDebug: Allow different styles of command line argumentsUlf Hermann2015-11-191-2/+2
| | | | | | | | We have tcp, local, and native by now. We have to expose that in a clean way. Change-Id: I0ce7be693aa7f47ebea7abe435a224a176b6c94b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* QmlProfiler: Convert connections to Qt5 styleUlf Hermann2015-11-021-12/+13
| | | | | Change-Id: I1a490add706cd0cfce3f243e4ebc32a8c9a975c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Tell the QML debug server exactly what services we expectUlf Hermann2015-08-171-1/+3
| | | | | | | | | | | | | | | | | | The services need to be loaded before the first QML engine is created. The first QML engine may be created before a client connects. When the JavaScript debug service is loaded the engine is put into interpreter mode as we don't support debugging in JIT mode. Profiling, however should be done in JIT mode, whenever possible. Thus, in order to avoid the loading of unnecessary plugins and to get better results from the QML profiler we tell the debug server which services we expect, even before the client connects. Qt 5.6 will support additional command line arguments to specify the services and this change uses them. Change-Id: I6dcee016c39995e9adada6eaf0e39d8299c9b7e7 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
* Consistently rename QmlProfilerEngine to QmlProfilerRunControlUlf Hermann2015-07-081-1/+1
| | | | | | | | It's always a pain to search for the only RunControl that's called "engine" half of the time. Change-Id: I4cece9f8958ff989925d9efaaf6fb41731842647 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* QmlProfiler: Drop redundant checks for useStartupProjectUlf Hermann2015-06-181-6/+0
| | | | | | | | | Those were misusing the flag to distinguish between local and remote startup and that was unnecessary as the LocalQmlProfilerRunner is only instantiated for local startup anyway. Change-Id: I030931c9db9e8482199e4fbd04665a6c973b67f8 Reviewed-by: hjk <hjk@theqtcompany.com>
* Analyzer: Replace StartMode with a useStartupProject booleanhjk2015-06-171-2/+2
| | | | | | | | | | | | | This is what it is on the top level. The change makes it obvious that in the valgrind(-derived) plugins the value is later wrongly used to make a decision on whether to run the valgrind process locally or remotely. But that's isolated in valgrind now and can be fixed there. Change-Id: I6fa5e669dec1f9e2cdebe42a1591d15144082a21 Reviewed-by: Anton Kreuzkamp <anton.kreuzkamp@kdab.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* QmlProfiler: Make creation of local RunControls more flexibleBenjamin Zeller2015-06-151-20/+49
| | | | | | | | | | | | | | | | | | | In order for plugins to create a RunControl for locally running applications that do not use LocalApplicationRunConfiguration it is required to export an API that takes care of the internal setup. Also this removes the hard dependency on LocalApplicationRunConfiguration. We don't want to expose Internal classes in public API, so we have to make QmlProfiler::Internal::QmlProfilerRunControl and QmlProfiler::Internal::QmlProfilerStateManager public. Also, AbstractQmlProfilerRunner doesn't do anything useful and can be removed. Change-Id: I0403e5b17e14ac894addd818ad7b249c51a8ed8d Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* QmlDesigner: Remove unneeded qualificationsOrgad Shaneh2015-02-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly done using the following ruby script: Dir.glob('**/*.cpp').each { |file| next if file =~ %r{src/shared/qbs|/qmljs/} s = File.read(file) s.scan(/^using namespace (.*);$/) { ns = $1 t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m| before = $1 char = $2 if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/ m else before + char end } if t != s puts file File.open(file, 'w').write(t) end } } Change-Id: I492792bb9e5655c55795e938031efc557c9a462f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QmlProfiler: Use LocalApplicationRunConfigurationAurindam Jana2013-10-151-18/+6
| | | | | | | | QmlProjectRunConfiguration is now derived from LocalApplicationRunConfiguration. Change-Id: Ieddac63ff9832771ed141c3f0aff1bcc0313f6bf Reviewed-by: hjk <hjk121@nokiamail.com>
* QmlProjectRunConfiguration: Derive from LocalApplicationRunConfigurationAurindam Jana2013-10-151-2/+2
| | | | | Change-Id: I4a7c29f2f679e62bae6fa3d01983851207e532c8 Reviewed-by: hjk <hjk121@nokiamail.com>
* QmlProfiler: Use StartLocal instead of StartQml start mode.Aurindam Jana2013-08-051-2/+2
| | | | | Change-Id: Iee7895e9cafc373c32749f3dcc44a690dfc551bc Reviewed-by: hjk <hjk121@nokiamail.com>
* ApplicationLauncher: Also emit the exit statusDaniel Teske2013-08-021-5/+11
| | | | | | | | | And adjust the message in the appliation output to take the exit status into account. Change-Id: I1b7507fdc8ff6fa7ec3db48dba72ad723f124fc3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Analyzer: Merge IAnalyzerEngine and AnalyzerRunControlhjk2013-08-011-2/+2
| | | | | Change-Id: I74edaef59600a44924d2692c1ebc7f98d8581115 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* QmlProfiler: Separate out LocalQmlProfilerRunner from engineAurindam Jana2013-07-231-3/+58
| | | | | | Change-Id: I6f9245179090bebb98b6d9849a7a696105e43a3a Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* QmlProfiler: fix potential crashChristiaan Janssen2013-06-051-0/+5
| | | | | | | | fixes Ib2ea66bd5694046577a0b5a0e2f611f3ffba0238 Change-Id: Ib7a4e02391513984f1c81a43a5fab490b7f88923 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk <qthjk@ovi.com>
* | QmlProfiler: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-11-271-3/+2
|/ | | | | | Change-Id: I99c96e723e80ec318acd9300b4f44e7c3ce37485 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QmlProfiler: Always use quint16 for port numberKai Koehne2012-03-011-1/+1
| | | | | Change-Id: Ie77227058637c4900248eaca0ea183ad46b82663 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* corrected license headersThomas Murach2011-07-061-13/+12
| | | | | | | Change-Id: I56fa50745a80abf52488bebe6a5a72cf26932a8b Merge-request: 352 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1251