Currently the only place that's using it and the scope is much smaller.
Change-Id: I1a43d14f0e2c69a16f76e6f83b82436bbeeac1c9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
ConsoleProcess stumbles over the special characters in the remote
command and as a result silently runs the command locally instead.
Prevent that. We can (and should) simply leave these characters alone,
as they have no special meaning on the local machine.
Change-Id: I31b3afe1cf170e51d431372b15f4df3656006959
Reviewed-by: hjk <hjk@qt.io>
Recent adaptations to Qt 5.13's API deprecations require using APIs
which were introduces in Qt 5.11.
Change-Id: I6c077d824c9ce716e019543b290c355a5d512fad
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This script will become even less trivial in the future, so use an
actually usable programming language for it.
Change-Id: I4fa1c8d327f97585bf8dde0ffaefc5fac7c1ca18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
QProcess::startDetached(qint64 *) has been introduced
in Qt5.10. When using Qt5.9 just use the old way where
it was not possible to set the environment for the
process. Additionally disable the respective UI part
to avoid complaining users.
Amends 626665b7a4 and 72ada44be3.
Change-Id: I34233402fe385035566484431838dd6edbda483e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
After 4c88c1808c the terminal command
itself may no longer have quoted spaces (since it is directly passed to
QProcess as the program name).
Change-Id: Iee4b9a6c3a87c29cb29cc732f6027f1c742f9eb5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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 <robert.loehning@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Many issues, mostly in headers, were not addressed in
e38410b76c
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
Change-Id: I320a51726db881e582b898948d53735ebb06887a
Reviewed-by: hjk <hjk@qt.io>
... as the concept really doesn't make any sense on windows.
Change-Id: I5fa970d17e6f4c1724250b8ee8cf0fd4eafc10ca
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
qt 5.8 made QProcess::startDetached()'s behavior consistent with
start(), which means it won't open a console any more. however, qtc
relied on this (unspecified) behavior.
the correct solution is to add a static function startTerminalEmulator()
to ConsoleProcess, which already has most of the necessary code anyway.
Task-number: QTCREATORBUG-17439
Change-Id: Icf04666869ce6593555302a54c49331a29846a99
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
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>
The path where the tools are located has changed.
Task-number: QTCREATORBUG-14732
Change-Id: Idb404b291ef651d2c0f03bce454b9aa0c0319183
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
On modern linux distributions (Ubuntu >= 10.10, Debian >= Wheezy),
trying to debug a terminal application fails, with
"ptrace: Operation not permitted".
In order to allow the debugger to attach to the created process, the
process itself needs to inform the kernel of the debugging process.
Task-number: QTCREATORBUG-3509
Change-Id: I68670426fad18cbe3b7cce9d57633e58e631e025
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
* If Creator is not executed from terminal, this value is missing.
* If it is executed from a terminal of another type than the stub
it might be wrong.
Change-Id: Ia6bd1dd59be04e01398ed5cdffff3080539b10ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The code still assumes host == target in some places...
Change-Id: Ief495df6ff5fbff890fc46d42a6b29eee3a1ed2c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This is used to get a platform-agnostic handle on "command line
arguments". It essentially wraps a single QString on Windows,
and a QStringList everywhere else.
As a consequence, several occurrences of #ifdef Q_OS_*
can be removed from the codebase.
Change-Id: Ic93118c1bd0bce0ebb58f416d395dbaebb861772
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Ensure that we read before zeroing the pointer to the stubSocket
and not after.
Change-Id: If9d6f11916e644be96ed88db6a2595509f177233
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Correctly returns true when the stubSocket is connected but the
process has already returned
Change-Id: Ie687e4109254cbe3a3a60e95bf182ce3b835e73a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.
Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: hjk <hjk121@nokiamail.com>
Distinguishes the process that starts the terminal from the stub
process, as on mac to support Terminal.app they are different.
Handle the stub not through the process that starts the terminal,
but through the local socket (on *nix).
Replace the blocking wait(...) in the main thread, with a nonblocking
wait in the signal handler when receiving a SIGCHLD, to leave the
main thread able to handle communication with creator.
This change allows the use of terminal emulator commands
that share a single instance or that fork.
So this is also the real fix for QTCREATORBUG-1633 on linux.
If creator crashes the stub and the debugged program live on.
This was done on purpose, it could be changed if considered better.
Task-number: QTCREATORBUG-6371
Task-number: QTCREATORBUG-1633
Change-Id: I4d4fb3a67b1987f4e46e2c603dcefe8c15152ad2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
e8b5c6dfcca3fc139049136b42459e7840efed7 :
Provide terminal emulator functionality in ConsoleProcess for
Windows as well.
e833b794b3 :
Use Core::Id().
Change-Id: Idad2bd2180e9a5dd2d1266496e340726435835d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>