aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/consoleprocess.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of ConsoleProcessJarek Kobus2022-01-261-866/+0
| | | | | | | | Use QtcProcess in Terminal mode instead. Change-Id: Iba237f3ee3e5802eed494e4ea9caf7c4ad1bc61a Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
* Make a copy of ConsoleProcess classJarek Kobus2022-01-211-2/+2
| | | | | | | | | | | This is needed for transition period. Make a copy of ConsoleProcess and name it TerminalProcess. Make it a private, non-exported class. The ConsoleProcess is going to be removed after unification of TerminalProcess and QtcProcess classes is over. Change-Id: Ib2d4bc8e8fd7ff714d891c57f695dd0debcb5a11 Reviewed-by: hjk <[email protected]>
* Move TerminalCommand into a separate fileJarek Kobus2022-01-211-154/+3
| | | | | | | | This will ease the ConsoleProcess and QtcProcess unification. Change-Id: Idda9ad393d184088c3e3a734389761d7176bd0c0 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Make setSettings() a static memberJarek Kobus2022-01-211-25/+23
| | | | | | | | | | | | Since it's not possible to use directly ICore::settings() inside Utils lib, make setSettings() a static member. This simplifies the API of other static methods. Set the settings just once now, inside main(). Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f Reviewed-by: <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-2/+2
| | | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Rename command() to commandLine(). Return const references from commandLine() and from environment(). Change-Id: Iacbf48030d00f8dbba053ece70bd460924f96041 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-18/+16
| | | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Don't return bool from start(), all callers ignored it. Rename stop() to stopProcess(). Change-Id: I2fda1337e6f490685669fbd7ad6987a97866fdbe Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-9/+9
| | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Rename applicationPID() to processId(). Change-Id: I1f9a28e768505c08c2ca3529c2ff0432f2a62c78 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Cleanup internal fieldsJarek Kobus2022-01-201-14/+4
| | | | | | | | Remove unused members. Rename one member. Init some members with sensible default values. Change-Id: Ia7a6e561fcbb612c90aeb7a2c4c6b041d2018a7f Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Move private static methods to cpp fileJarek Kobus2022-01-201-55/+54
| | | | | Change-Id: I0d79d615853e042b8baaba1ea91ad4a3ca15fb0c Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-12/+0
| | | | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Remove unused detachStub(). Move killProcess() and killStub() to private section. They are not used outside. Change-Id: I45f55027fa537cc800cd1776478390725f7236c4 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-2/+0
| | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Remove unused stubStarted() and stupStopped() signals. Change-Id: I3b508fa9fb0ff243355f91fd79bc40f8db1c9a82 Reviewed-by: hjk <[email protected]>
* SshDeviceProcess: don't connect to stubStopped, it's no-opJarek Kobus2022-01-201-2/+1
| | | | | | | | | | | | | | | | | After 479c39300945d5263e20adf3b29377153b688c78 the connection to ConsoleProcess::stubStopped() became no-op, since when finished() signal is emitted we are disconnecting from console process signals inside setState(). In case when the socket of console process got disconnected while the process was still running, we are emitting finished() signal prior to stubStopped() (when m_appPid != 0 or m_hInferior != nullptr, otherwise it had to be emitted earlier), so the stubStopped is also no-op in this case. Amends 479c39300945d5263e20adf3b29377153b688c78 Change-Id: I75189b9476281413c8a206de78b9008f9ee08a25 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-201-1/+0
| | | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Remove processError() signal, use errorOccurred() instead. Change-Id: If11064944228c82a9099fffdba942c4276690085 Reviewed-by: hjk <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* ConsoleProcess: Uniform the common interface of QtcProcessJarek Kobus2022-01-191-23/+17
| | | | | | | | | | | | This is a preliminary step before merging ConsoleProcess into QtcProcess. Rename: processStarted() -> started() processFinished() -> finished() Change-Id: Ifd94722822c7628fc8130e3a6377d55d24db6eb3 Reviewed-by: hjk <[email protected]>
* ConsoleProcess: limit code repetitionJarek Kobus2022-01-181-26/+19
| | | | | Change-Id: I3b07e61105b3c2a37658df438ef39bb65968aeea Reviewed-by: hjk <[email protected]>
* Use QtcProcess for console processJarek Kobus2021-11-051-3/+4
| | | | | Change-Id: I1510c576992ce5a28f42cf3c7e1a7333ae7981ac Reviewed-by: hjk <[email protected]>
* Remove QTC_REL_TOOLS_PATH and use RELATIVE_LIBEXEC_PATH insteadJarek Kobus2021-08-181-1/+1
| | | | | | Change-Id: If737d7050985f2ae03d543c63347ea465a65c648 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Utils: Fix compile on WindowsChristian Stenger2021-08-091-3/+1
| | | | | | | Amends 0567f35e210. Change-Id: I337d4de98533aa408d404d1e6f49fa90cf757ee5 Reviewed-by: hjk <[email protected]>
* Utils/ProjectExplorer: Use FilePath for Runnable::workingDirectoryhjk2021-08-061-7/+7
| | | | | | | ... and in some using code. Change-Id: I231ea56628908f7d305d13f07eabe8803fe8a791 Reviewed-by: Christian Stenger <[email protected]>
* Move CommandLine out of fileutils.hEike Ziller2021-05-111-1/+1
| | | | | | | | | to ProcessArgs and rename the files to commandline.*. fileutils was a strange place for CommandLine, and this reduces the dependencies needed for sdktool. Change-Id: I9d7e8ffe8a3560f5d12934457b086f9446976883 Reviewed-by: hjk <[email protected]>
* Utils: Move ProcessArgs class into filepair of its ownhjk2021-05-111-0/+1
| | | | | | | | There's not much interaction between ProcessArgs and QtcProcess and both .cpp are still quite big, with non-trivial bits. Change-Id: Id84202f6c34057bf87cc8f27fbb45f78f105e9a5 Reviewed-by: Eike Ziller <[email protected]>
* Utils: Move process arguments class out of QtcProcesshjk2021-05-111-29/+29
| | | | | | | | | | | | The main QtcProcess interface is nowadays a CommandLine, with no explicit references left to QtcProcess::Arguments and related static helper functions, so it only clutters the QtcProcess class interface So move these items out of QtcProcess, later potentially to a separate file pair. Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Don't raise SIGSTOP in the process stubhjk2021-03-091-0/+12
| | | | | | | | | | | | | | | | | | Previously, the starting inferior was sent a SIGSTOP to avoid progress before the debugger could attach. However, these signals are then also visible in the debugger and need to be ignored as part of the startup handling in Creator. The waiting effect can be achieved less intrusively by waiting on a pipe read between fork() and exec(). Task-number: QTCREATORBUG-25073 Task-number: QTCREATORBUG-25082 Task-number: QTCREATORBUG-25227 Change-Id: Ie70b9eb5ea865f85411c26b0dbf377a019fec8d5 Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
* ProjectExplorer/Debugger: Add a 'Run as root' option for Unix hostshjk2021-02-221-10/+22
| | | | | | | | | | For local run and GDB debug, with or without terminal. Task-number: QTCREATORBUG-2831 Task-number: QTCREATORBUG-25330 Change-Id: I9b5d2156bcffea4f358474ecdbcad580a4419917 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Add the ability to interrupt inferiors via the process stubhjk2021-02-161-0/+12
| | | | | | | | | This will be handy once we want to debug processes running as root. The mechanism is the same as for "killProcess", and currently unused. Change-Id: I2c5e5b77577ca32ed1118fcc81c03c6320db8800 Reviewed-by: Joerg Bornemann <[email protected]>
* Fix initial directory when using konsole for Open Terminal HereEike Ziller2020-11-201-1/+1
| | | | | | Fixes: QTCREATORBUG-24947 Change-Id: I14f5b47ba2ad71005653faadd5e78fda9570196e Reviewed-by: Christian Kandeler <[email protected]>
* Avoid signal overloadingJarek Kobus2020-11-191-1/+1
| | | | | | | | Choose a different name for them. Change-Id: Ie2cc2c85dca72b7f7ff84c95fb0abd0a0e99a63d Reviewed-by: Henning Gründl <[email protected]> Reviewed-by: hjk <[email protected]>
* Fix more compilation issues with Qt6Eike Ziller2020-11-041-7/+9
| | | | | | | | | | | | Various Windows related issues and issues with additional QML designer components. Don't use very generic template definitions if the type has to provide not so generic base functionality (in this case providing a stream operator for QDataStream). Task-number: QTCREATORBUG-24098 Change-Id: Id0729c249d1b81e4e939fdaeb2e02b8a64e7e8f9 Reviewed-by: Cristian Adam <[email protected]>
* Utils: Determine shell from $SHELL instead of hard-coding /bin/shhjk2020-09-231-1/+1
| | | | | | | | Fixes: QTCREATORBUG-24659 Change-Id: Icafc001b681cc76af76b8759a4de84db51146fd4 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Replace some QRegExp to QRegularExpressionChristian Stenger2020-06-191-2/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I7d12992506bbe33306c0ab750f73c7db1626abc3 Reviewed-by: hjk <[email protected]>
* More Qt 6 portinghjk2020-06-181-3/+3
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I8d118e75021996127344e75dffe263cebd95a5b8 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Replace foreach with range-based forOrgad Shaneh2020-06-161-1/+1
| | | | | Change-Id: I9aeea9c029ffc56cbadc04edd20e9b35b154f986 Reviewed-by: hjk <[email protected]>
* Python editor: Add buttons & actions for opening REPLEike Ziller2020-03-191-0/+5
| | | | | | | | Opens interactive Python, optionally with the current file imported, for testing and experimentation. Change-Id: Ieb120e3698bdba77a1445c40fe7fda533773a0cf Reviewed-by: David Schulz <[email protected]>
* lib/utils/consoleprocess: Check for xdg-terminalMaximilian Goldstein2020-01-241-12/+17
| | | | | | Change-Id: I9970153d9abc9beff3081ddb09e7d3d95ea8c63a Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Use isEmpty() instead of count() or size()Alessandro Portale2020-01-201-1/+1
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <[email protected]>
* Utils: Fix determining default terminalEike Ziller2019-09-031-4/+5
| | | | | | Change-Id: Id39ef638a184a7cc593e1e6127f87814b9ca6381 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-08-221-1/+1
|\ | | | | | | | | | | | | Conflicts: src/libs/utils/consoleprocess_win.cpp Change-Id: Ibdc265eed2f7080726e11ff6f2931c8559943af2
* | Utils: Avoid compile issue with upcoming QtChristian Stenger2019-07-251-1/+1
| | | | | | | | | | | | | | | | | | QStringList::join() can be ambigous when it gets passed a '\0'. Avoid this ambiguity by explicitly casting its parameter. Change-Id: I65b33d7d59da90d78bfb86d146093338b31e7fd0 Reviewed-by: hjk <[email protected]>
* | Utils: Lump ConsoleProcess files togetherhjk2019-07-251-2/+837
|/ | | | | | | | | | ... to reduce scope of conditionally compiled code which causes regularly problems when forgetting about their special nature. The code model isn't a big fan either. Change-Id: I6a85b694b59a293daf4b9aab7c8e81c7ca284f0d Reviewed-by: David Schulz <[email protected]>
* Fix terminal command comparisonEike Ziller2018-09-071-3/+7
| | | | | | | It ignored the openArgs part. Change-Id: Ib5df9cfd424aa7bcf63b2fa5d16ece0261ef0746 Reviewed-by: Orgad Shaneh <[email protected]>
* Make terminal settings more flexibleEike Ziller2018-09-031-0/+19
| | | | | | | | | | | | | | | | Currently "Open Terminal Here" and such expect the terminal command without any arguments to be behaving correctly for this. That is not the case for Konsole at least, since it just opens another window in a running instance, with the same working directory, when not convinced to do otherwise with additional command line parameters Separate options for "Open Terminal Here" and "Run in terminal" in the options. Task-number: QTCREATORBUG-20900 Change-Id: I598d1f7f0bf22b5c21dc1c60333397bdf9fab1b4 Reviewed-by: Robert Loehning <[email protected]> Reviewed-by: André Hartmann <[email protected]>
* windows: stub out terminal-related functions of ConsoleProcess more thoroughlyOswald Buddenhagen2017-01-181-17/+0
| | | | | | | ... as the concept really doesn't make any sense on windows. Change-Id: I5fa970d17e6f4c1724250b8ee8cf0fd4eafc10ca Reviewed-by: Tobias Hunger <[email protected]>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <[email protected]>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <[email protected]>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <[email protected]>
* ProjectExplorer: Extend ApplicationLauncherOrgad Shaneh2014-05-071-0/+18
| | | | | | | Implement some more QProcess functions Change-Id: I1afe3fa5f5b353508cf300178cb50507b3dd4b3e Reviewed-by: Daniel Teske <[email protected]>
* Use double quotes instead of single quotes as per our guidelines.Christian Kandeler2014-04-221-3/+3
| | | | | Change-Id: Ib608bb49e26781aef1914085a5d801fcdcd5eb56 Reviewed-by: Leena Miettinen <[email protected]>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Kai Koehne <[email protected]>
* Merge remote-tracking branch 'origin/2.7' into HEADEike Ziller2013-04-181-2/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/generalsettings.cpp Change-Id: Ic92d637fb92748b2bb40e1a2895ea5d0644b4646
| * consoleprocess: use empty string as default terminalFawzi Mohamed2013-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | Using empty string as default terminal avoids storing a path to QtCreator resources (which becomes invalid if creator is deleted) on mac. Change-Id: I9d5fe9bce38387d82de451652df6be9ec5eb5960 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Eike Ziller <[email protected]>