The original intention was to connect to done signal
of the executed command.
Change-Id: I35e1f931a54bf763c3d9ffc71237b1d96cda1343
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Hopefully less confusion about the direction.
Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
- missing Q_DECLARE_TR_FUNCTIONS
- some full qualifications needed for confused lupdate
- avoid breaking some translations from former TaskListPlugin,
VcsCommand and highlighter settings refactoring
Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4
Reviewed-by: hjk <hjk@qt.io>
Get rid of abstract base ProgressParser and replace
it with ProgressParser function. The only one former
subclass GitProgressParser is now functor object.
Pass future interface directly to the ProgressParser
function, along with input text to be parsed.
Change-Id: Icbcf0b6e55097f8b38eb8a32ceaa4414723116d0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
Some flags directly relate to QtcProcess setup.
Group them together. Reorder other flags to keep
related next to each other. Modify some descriptions.
Change-Id: I8694fb5ca0edd7e770a084d7d1d890d48a13a347
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
It is going to be used outside of VcsCommand, too.
Use RunFlags enum as an argument to several functions
instead of unsigned.
Change-Id: I355c80a845a9b5982108fbde3412754392dce702
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
And rename it to runBlocking() in order to conform
a bit more to QtcProcess API.
In case of blocking run there is no need to instantiate
VcsCommand on user side. This nicely draw a line between
async usages (i.e. when start() is called and we need
an instance) and blocking ones (i.e. when runBlocking()
is called).
Change-Id: I1ba94ee36c92956d5044236cb9e2dd896bf3cfcf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This signal was emitted only from cancel() method and
used only when runCommand() was called. However, with
just 2 public usages of cancel() no-one was used
in conjunction with runCommand(). So, this signal is
no-op.
Change-Id: I2541c6498928d313faafc2fbe47ab609393486d1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Remove VcsCommand::FullySynchronous flag.
Rename VcsCommand::NoFullySync into UseEventLoop.
By default the command will run fully synchronous
(i.e. without nested event loop). Only when
UseEventLoop is specified, and the command runs in
main thread, the nested event loop will be used.
This change should preserve the current behavior
on all code paths.
Change-Id: Id4bbaf68402ceed5e3fcc6f294521e87eb0b8d4d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Add static PatchTool::confirmPatching() and reuse it
in two places.
Use Tr::tr() inside PatchTool.
Change-Id: I70779619dbb58ab6e46a585bbeff51588ccb2f53
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Quite a bit of special access from the outside, so LayoutBuilder is not
really helpful here.
Change-Id: I006b66e155c2abd46e7077add006fe31ec6b227d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Since we are being connected to the same done() signal twice,
the order of slot invocations started to play a role.
We were connecting done() signal to
VcsBaseEditorWidget::reportCommandFinished() first
and to VcsBaseEditorWidget::setPlainText() afterwards,
so they were executed exactly in this order. However, this
order isn't desired, as we need to set text first and
jump to line afterwards.
In order to fix it so that we don't rely on connection
order we handle setting the content and jumping into
the default line in one common handler.
Amends c767f193ce
Change-Id: Iea17476cc25b54759457710ecb6b6de2f0f5caf7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Get rid of ClearCaseResponse struct.
Replace foreach with range-based for loops.
Change-Id: Id78e2ca3598c16ad16ebaeddae73a140e3473936
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Conform to QtcProcess interface. Use result() when needed.
Change-Id: Idd4c71d9a103e8649b08ec7787c2f286423a31ec
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Add result() getter and done() signal in order to
conform to QtcProcess API.
Change-Id: Idc7c57e03d6e8acead9d4c034f4efc56250f944d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Conform to QtcProcess behavior and don't emit stdOutText()
and stdErrText() on finished when progressive output is off.
Use cleanedStdOut() / cleanedStdErr() getter instead.
Change-Id: I2c416c0264f2203c7a9c73de900c12777f4fd3b3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Conform to QtcProcess interface and provide cleanedStdOut()
and cleanedStdErr() getters, to be called after the process
finished.
Use cleanedStdOut() inside DiffEditorController for getting
the output after the process finished instead of connecting
to stdOutText() signal.
Change-Id: I7ba3735b0ab2167ac1f3b0954dd5dc9553910aac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Though it was looking weird, it's still needed.
Amends 73e48ef275
Change-Id: Idedc254a9dad125239becfe4f2edb9fe93298bfc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The workaround with VcsCommandResultProxy, introduced in
0b1eaacabb isn't needed anymore
since finished() and stdOutText() signals are now emitted
synchronously from the caller's thread.
Give a context object to watcher's finished handler.
Change-Id: I6608b7c2806fc0c18649ff40f91684e9eaa7b15d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Do it also in fully synchronous case, as QtcProcess
is able to handle them even when EventLoopMode is off.
Change-Id: Ic24ff34e3d8808d2aaaf0300ba4ac95662e46d23
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Handle SilentOutput flag into accound when runSynchronous()
to make it consistent with fully synchronous case.
Change-Id: I955714872601f8fb7ffff8d570eec5ff610d9cfe
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Make error reporting consistent with runSynchronous() case,
where error channel is reported via appendError().
Amends 2c5095c94d
Change-Id: I0d962d42eb696e91f05ebb4f1f92677607b24a27
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
In case of calling execute() the fully or not fully
synchronous setting is no-op now, as we execute
always in the caller thread and don't use blocking
API of QtcProcess and don't create nested event loop.
Behave the same regardless of these flags and always
setup std callbacks if needed.
Rename setupSynchronous() into installStdCallbacks()
to better reflect the current intention.
Change-Id: I93642c61d98a26c16298725f0d910d0dd80414b1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>