Commit Graph

25 Commits

Author SHA1 Message Date
Jarek Kobus
38b19bfae6 DiffEditor: Cleanup includes
Change-Id: Id8127b9b0c99ee2a0d5d367cb551a1d5779c5d38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-29 15:15:12 +00:00
Jarek Kobus
29ecc7b5dd VcsCommand: Rename execute() to start()
In order to conform to QtcProcess API.

Change-Id: I71fcc03846f32cd3c2df39824ce3f6730c20ebbb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-21 05:33:46 +00:00
Jarek Kobus
b795bd8042 VcsPlugin: Use VcsCommand::done() signal instead of finished()
Conform to QtcProcess interface. Use result() when needed.

Change-Id: Idd4c71d9a103e8649b08ec7787c2f286423a31ec
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-20 10:41:35 +00:00
Jarek Kobus
3978cdde6c VcsCommand: Add std channel getters
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>
2022-09-19 10:31:35 +00:00
Jarek Kobus
2429232e72 VcsBaseDiffEditorController: Fix git show
Though it was looking weird, it's still needed.

Amends 73e48ef275

Change-Id: Idedc254a9dad125239becfe4f2edb9fe93298bfc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-17 21:37:34 +00:00
Jarek Kobus
73e48ef275 VcsBaseDiffEditorController: Get rid of VcsCommandResultProxy
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>
2022-09-16 11:40:12 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
60302debd7 Move ShellCommand into VcsBase plugin
Rename it to VcsCommand. Move also ShellCommandPage into
VcsBase plugin.

Change-Id: I335ac47e3090f2be497643ebcda0eaad2987ac81
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-01 14:33:06 +00:00
Jarek Kobus
0da525d65c VcsBase: Cleanup some Utils:: in cpp files
We are using namespace Utils in these files.

Change-Id: I0526f7e4fff2fe0d24d1e2b9fa087298d5331955
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 16:01:35 +00:00
Jarek Kobus
89e7201048 VcsBase: Hide VcsCommand class
Make it an implementation detail.
Introduce VcsBaseClient::createVcsCommand() method instead
for instantiating VcsCommands.

Replace all occuriences of VcsBase::VcsCommand in public API
with Utils::ShellCommand.

Change-Id: Ie438cc3a5e867b3ee8f9e935b56b2f16ea453f8a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-07-13 16:01:28 +00:00
Jarek Kobus
0490e3426d ShellCommand: Merge VcsCommand::VcsRunFlags into RunFlags
Use ShellCommand class name in signal-slot connections.

Change-Id: Id50ee6887708558a2ba0972ece6c420b0be36f72
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-07-12 14:49:10 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
hjk
4bf6008158 Vcs: Use FilePath for working directory in DiffEditorController
Change-Id: I7b5e1349bc679bd90b7781fbe0b40485ec653473
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-20 15:06:26 +00:00
hjk
ff57cb548d Vcs: Use more FilePath for file paths
Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 14:40:33 +00:00
hjk
793d673f39 Vcs/Utils: Use Utils::Environment for ShellCommand
Change-Id: Ica289ab2f83d52270923c4ff4983860cfbe0b494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 12:21:29 +00:00
hjk
c17767c78e Vcs: Use setters to set up DiffController parameters
Plan is to avoid client use down there, so extract the actually
used data first and pass it down.

Change-Id: I088fc9cc3086e8f6e1e0c3c9d3a35445f752e6f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 07:03:14 +00:00
hjk
4e4916ce35 VcsBase: Use settings instead of client when it suffices
Change-Id: I145659d3c423361e87c92e8995fa3476d798cc7b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-03 17:30:03 +00:00
Eike Ziller
30143478f3 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	src/libs/utils/consoleprocess_win.cpp

Change-Id: Ibdc265eed2f7080726e11ff6f2931c8559943af2
2019-08-22 09:53:37 +02:00
Orgad Shaneh
eaf8ccf118 Git: Fix branch expansion on show before the diff display is done
The description is shown first (with the <Expand> placeholder), and the
diff parsing can be long. If <Expand> is clicked during parsing, it fails
because the base directory is not set yet.

Change-Id: Ib5e839b292c32091c726f24eb643d0fa5a142cb7
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-16 08:49:40 +00:00
hjk
00b692e67e Utils: Use CommandLine in ShellCommand
... and adapt users.

Change-Id: I218523ffe34720d5fe199aa0ca6892a8dc2985fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-06-11 11:01:16 +00:00
Orgad Shaneh
17b3e45b8c VCS: Fix display of diff/show commands in progress bar
In 6ae0e8d2c7 we added 2 arguments that
precede the diff sub-command (-c diff.color=false).

When display name is not set, ShellCommand uses the binary followed by the
first argument, so it now showed "Git -c" instead of "Git Diff".

Change-Id: Ie584837bd87fd529e0cd015025fc3bf1a69d085c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Xiaofeng Wang <wasphin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-28 08:12:30 +00:00
Eike Ziller
cd93f624da VCS: Fix translation issues
Change-Id: I3d85a3fc9d34144ca30ef1e37b22bfe7874b8e64
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-24 08:12:11 +00:00
Jarek Kobus
0b1eaacabb DiffEditor: fix the cancellation of diff requests
Change-Id: I36c4af4ec51473fb9da5d9f099f2251f75b2020a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-17 09:32:28 +00:00
Jarek Kobus
6509753e86 Make it possible to cancel async diff calculation
Change-Id: I38fe86159daab794d060860de6ee5ab30fb395eb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-05 14:20:16 +00:00
Jarek Kobus
4bea049c45 VcsBase: Create common base diff editor controller
Reuse it in subversion and git plugins.
It makes subversion diff more asynchronous than before.
Make VcsBase plugin dependand on DiffEditor plugin.

Change-Id: Iafea2941b890a95a269362e022af2dc03cdea550
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-05 14:20:07 +00:00