aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/extracompiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: Use more concise code to register extra compilershjk2017-02-031-6/+3
| | | | | | | | | | | Saves some line noise and a function. (void) new Foo(this); is not really a new pattern in Creator code, but a bit of a new pattern for "registering things". Change-Id: Ie1bb409ed77bc20833fc07ca14715b9ecbc9bd5d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix up QProcess::waitForFinished()Tobias Hunger2016-05-111-2/+2
| | | | | | | | waitForFinish returns false if the process is no longer running at the time of the call. Handle that throughout the codebase. Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094 Reviewed-by: hjk <hjk@theqtcompany.com>
* Projectexplorer: Modernize codebaseTobias Hunger2016-04-151-2/+1
| | | | | | Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
* ProjectExplorer: Gracefully abort process upon ExtraCompiler deleteOrgad Shaneh2016-04-071-9/+31
| | | | | | | Task-number: QTCREATORBUG-15993 Change-Id: I9d3bf92a6c2e41bb40a01a1a613f6b98f72cf6be Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* ExtraCompiler: Remove stored targets listOrgad Shaneh2016-03-151-21/+23
| | | | | | | | Itereate over the hash keys instead. Change-Id: Ib14bef708b74ed1938bcb985b3a5091aca704391 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* ExtraCompiler: Parent extra compilers to pluginsUlf Hermann2016-03-141-1/+5
| | | | | | | | | | | Previously the extra compilers were never destructed. As any plugin that registers an extra compiler factory has to depend on ProjectExplorer, it will delete its factory before ProjectExplorer is unloaded. So, removing the extra compiler from the list on destroyed() is safe. Change-Id: I22fbe662a5704c0294512b8774acb85745c1cbe5 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* ExtraCompiler: Run extra compiler in a threadTobias Hunger2016-03-111-17/+134
| | | | | | | | | | | and make sure there are not too many of these threads running at any time. This stops the massive process startup when loading a project with many UI files, etc. Task-number: QTCREATORBUG-15795 Change-Id: Icfcddd80d04e36b61ecafbbefe5a1a8b7ea02ec6 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* ExtraCompiler: Use a hash for contentsOrgad Shaneh2016-02-291-14/+9
| | | | | | | | | | Avoid recurring scans of the targets. From a simple test, there is usually a single target. This is mostly done for correctness. Change-Id: Ic025de0825133f1096c400278c929a7e9087c643 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* ExtraCompiler: Store contents as Utf8Orgad Shaneh2016-02-181-7/+6
| | | | | | | Avoid conversions when they're not needed. Change-Id: I7e996bc6e87be4327d75f0d743ff2de38d6ccc32 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* ProjectExplorer: Allow extra compilers to post compile issuesUlf Hermann2016-02-161-0/+43
| | | | | | | | If we have a text editor for the source document the errors will be highlighted in the editor then. Change-Id: I02ed24783e7079c3d2cb308d8111b399cd77adb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Generalize support for extra compilersUlf Hermann2016-02-161-0/+321
Allow for different extra compilers which may get called to generate additional code for the code model. The build system is expected to know what files are generated from which source file and the extra compilers know how to generate the content of those files, without touching the build directory. the uic adapter is refactored to be the first such extra compiler. The extra compiler is run when an editor for its source document loses focus, or after a timeout of 1s when the source document has been changed. Change-Id: I13c110c61120c812f02639a3684144daf8979b37 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>