Use SynchronousProcess::run and SynchronousProcess::runBlocking.
Using SynchronousProcess::run in ShellCommand::runSynchronous
is generally safe, since this method is usually called in its
own thread. This makes the processing of cancel requests work
again and makes output available via signals.
Task-number: QTCREATORBUG-16532
Change-Id: I6907194bd00cd5713673d9b1911978d69b996a80
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This name just got free, so use it for the method that actually is
called if the process runs with the FullySynchronously flag set.
Change-Id: Ic86bb291d578ad06b74db1ab89a22b1b8cb4f4bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.
This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).
Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.
Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is run in a background thread, so there is no need to keep the UI
alive.
Change-Id: I81267b918ef2350a180b0a8ee55244feca2406b4
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Reorder members to avoid padding
* Use C++11 member initialization
Change-Id: Ib04c2d59dfcf54f5df7afddc6e21197f1095e829
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.
Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Use Utils::runAsync to avoid use of global thread pool. Move watcher
connect to constructor. Report "failure" of the command by internally
canceling.
Change-Id: Ib7616734176be2ad9356162724ca06cfd8821e52
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Not all jobs of one command can run in the same directory, so
prepare for having individual working directories per job.
Change-Id: Ice43361fe54f2b7153ccd38435f6108d83570082
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Rename the signals used to report stdout/stderr to make it clearer
what they actually do. Remove some unimplemented private member
functions while at it.
Change-Id: I7e856f906ccb45964f3b1b64336d4d8ebca7b9ee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.
Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>