Commit Graph

249 Commits

Author SHA1 Message Date
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
e793841b4f Remove Core::ShellCommand
Move the implementation into VcsCommand.
Use Utils::ShellCommand inside coreplugin API.

Change-Id: I74a34057b33832a138b05f1dfa6937565027edb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-07-11 10:04:08 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
Jarek Kobus
92d7e4601d QtcProcess: Forward declare Environment in QtcProcess header
Change-Id: If85a8a07b144c94cb6e45f66dcb06573ef07c777
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:40 +00:00
hjk
51d00709a5 Utils: Drop [Qt::]SkipEmptyParts from porting.h
Not needed anymore after 7c942cfd18.

Change-Id: I5e6021cb64a399fa3bc3067b2fcd60ab48587daa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-10 12:59:39 +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
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11:14 +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
edcedabed9 Vcs: Use FilePath in IVersionControl API
Adapt first level of users.

Change-Id: Ifcd7bff45631ff3b9e26a9e3176daa6cf0cf2e56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-29 13:20:23 +00:00
hjk
430e81facd All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 07:55:31 +00:00
David Schulz
410b02f8c5 Core: filepathify expected document changes
Change-Id: Ifa9341e55c79459db9ecef3c441da9b2816695bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-17 06:30:51 +00:00
hjk
0ba4338467 Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccess
To make clear that this is not just any finish.

Also change FinishedError to FinishedWithError, to create
symmetry.

Also adapt enum member description to reality.

Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-02 14:16:36 +00:00
David Schulz
a13aef759e Utils: filepathify fileutils
Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 14:30:53 +00:00
hjk
73c0175f4b Vcs: Simplify VcsCommand::runCommand interface
The timeout and exit code interpreter properties are already
accessible via the SynchronousProcess parameter.

Change-Id: I1ba9c768a781009df65b5070a1d017c41d7e2663
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-17 09:10:49 +00:00
hjk
b2dc771d80 Utils: Simplify QtcProcess::exitMessage() interface
This was requiring parameters the process object already knows.

This is a slight behavior change in most cases, it now includes
always the command line arguments, which previously only happened
in gcctoolchain.cpp and iarewtoolchain.cpp.

Change-Id: Id25a68c397e2f1d8bf52ab29210e215b1de46c6d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 08:59:48 +00:00
hjk
55f768e1b0 Utils: Make process results accessible through QtcProcess object
The result is fully stored in the object anyway. Using the extra
SynchronousProcessResponse structure only causes copies of
the data and complicates access on the user side in
a lot of cases.

The result bits are now also accessible individually.

There's obvious room for follow-up changes on the topic, e.g.
ShellCommand::runCommand's parameter list could shrink to
just a SynchronousProcess parameter.

Change-Id: I45aa7eb23832340be06905929280c012e1217263
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 13:19:01 +00:00
hjk
0c8d8c6b2a Utils: Don't expose Utils::defaultExitCodeInterpreter
Instead, make its behavior implicit if none is given.

Change-Id: I3c1a054751a0afe22d0f40a2fed6dd00b5aef205
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 13:15:25 +00:00
hjk
c23cdd9262 Utils: Merge {synchronous,qtc}process.{h,cpp} file pairs
Mechanical to prepare merging the actual classes.
Adapting #includes.

Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-10 09:47:51 +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
71d3b04406 CVS: Use the new AspectContainer::applied signal
Change-Id: Icd86026a22f730fb5c7a460d5b1e38c16c5768b9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-04-06 06:24:41 +00:00
Eike Ziller
072607962d Locator: Add longer description to filters
This is shown as tool tips in the location options, and if any platform
supports this also as tool tips on the menu actions of the locator input
field.

Change-Id: I8b439e45e6097a16a5f932d25d4e5d3e9bddb6ad
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-23 08:29:30 +00:00
hjk
ce85282866 VcsBase: Remove VcsBaseClientSettings
It's replaced by VcsBaseSettings.

Change-Id: I60a0e4e267337f71e8a32b9b220565b765c973b1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-22 09:34:52 +00:00
hjk
78b4449692 CVS: Aspectify settings
Change-Id: Ib5170405b33b3e521470407065e85c95dad6163b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-19 14:00:00 +00:00
Eike Ziller
f811b87c66 EditorManager: Small API clean-up
- Move private enum to private header
- Add missing parameter to openEditorAtSearchResult
- Remove convenience singular close* methods, we have {} nowadays

Change-Id: Ic5b6d831a9f506ffee09b89b3358874433d62998
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-30 14:57:20 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Orgad Shaneh
5ebe34a332 VCS: Add vcsDescribe
Already exists in all implementations, but there was no common declaration.

Change-Id: Ieb3d10d1936c207722b5001712bce41e8114dcdc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:17:59 +00:00
Orgad Shaneh
e9df7825fa IVersionControl: Change vcsAnnotate return type to void
All implementations return true unconditionally, and the return
value is never read anyway.

+ Remove superfluous function with the same name in Perforce.

Change-Id: I83f361ec7fd8be3177cb4be52e6276e295cd4279
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-06-18 05:16:24 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
hjk
9c96a1c4de Vcs: Make VcsBaseEditorWidget::test* operate on factories directly
Saves re-discovery by id.

Change-Id: I026c1388d02f125147a9b4f5367d7a1a266bff3c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-13 07:10:21 +00:00
hjk
299d34d547 Remove apparently unneeded QtPlugin includes
Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-12 16:03:37 +00:00
hjk
b5710099bb Vcs: Make some editor factories proper plugin pimpl members
Change-Id: I7f815c53bac8621b2198c57d7f1d7d4bd43eb282
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-07 10:23:47 +00:00
hjk
9c02a11039 Vcs: Separate plugin and QObject parent roles for VcsSubmitEditorFactory
These are different when the factories are used as real members,
as already done in Bazaar.

Change-Id: I3c187896dcbacb5156be1543424ccacb9140a493
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 15:02:04 +00:00
hjk
7f37c503db Vcs: Move responsibility to set editor parameters to editor factory
So it doesn't need to be named twice in the editor factory setup.

This intentially includes a de-optimiztion: storing the parameters
by value, not by pointer. That's more natural, does not need to
keep the parameters alive on the caller side, and it's uncritical
in this context.

Change-Id: I92867d3f2f75c38911ae82d3eeb4759cba71b723
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 07:03:44 +00:00
hjk
85d9756c00 VcsBase: More use of settings instead of client when it suffices
Client::vcsBinary() maps directly to Settings::binaryPath()
except for git can be replaced by that in non-generic settings.

Change-Id: I245659d3c423361e87c92e8995fa3476d798cc7b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-04 07:11:41 +00:00
hjk
b23dc3a0bf VcsBase: Partially move vcsTimeoutS() to VcsBaseClientSettings
It's the source of information for this, and the plan is to
ramp down and merge *Client and *BasePlugin.

Change-Id: I13f813d1f94a2bd4a704d120493a28b92443605b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-03 17:29:50 +00:00
hjk
b1f5b18ac5 Vcs: Provide default implementations for some pure methods
Saves empty re-implementations in some cases.

Change-Id: I4ffa039d70257f2256942e09fcabe790943e1578
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-03 07:15:38 +00:00
hjk
039e70c727 Cvs: Lump cvsclient.h and .cpp into plugin
Given the reduction of the code, this here makes sense to have
by itself, but it is actually triggered by the wish to to merge
the parallel VcsPluginBase and VcsClientBase hierarchy.

An immediate merge affects a lot of code (>10kloc), with mostly
mechanical moving, but also some non-mechanical changes. Try to
get the main part of the moves done one-by-one through do reduce
size of the non-mechanical part.

Change-Id: Id276a9f64ef9113567d631129662cd0607ba88d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-03 07:15:24 +00:00
hjk
320958f2f5 Cvs: Remove unneeded indirection to access a settings value
Change-Id: I30d4d87e8ae646ce826e4ffb5081759700c49f36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-31 12:37:01 +00:00
hjk
b8fe25db25 Vcs: Merge IVersionControl and VcsBasePlugin hierarchies
They were 1:1 in parallel, with quite a bit of function call
ping-pong inbetween, for code-sharing-by-inheritance. Merge
them by making VcsBasePlugin inherit IVersionControl and
merge the derived classes below.

Size of this patch is hard to avoid as all seven systems have to
move simultaneously. Non-necessary potential follow-up cleanup
have been left out on purpose.

Change-Id: Icb71e4182af3db21069cc637e7ae87ffa3829791
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-31 12:36:23 +00:00
hjk
0f67026794 Cvs: Move plugin pimpl to .cpp
Change-Id: Idacee6b43f34c74eadc551496d4c596536eddde4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-30 08:51:08 +00:00
hjk
731a3f24da Cvs: Remove CvsPluginPrivate::cvsVersionControl
Base implementation is good enough.

Change-Id: I9c608f5636a8b9d34375f9c8d690f9c90120c880
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-29 08:25:55 +00:00
hjk
b093941435 Vcs: Drop VcsBaseOptionsPage hierarchy level
Adapt the remaining users: Cvs,Git,Svn.

Change-Id: Idd730a33e5c64d18002b1a21b5f5c715b7fa5ffb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-27 06:44:55 +00:00
hjk
68f90d1c67 Cvs: Drop direct access to plugin singleton data
Not needed anymore.

Change-Id: Icb00cddf01ebfe7054cb85efc76f46578e3f1a1e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 13:33:30 +00:00
hjk
4f8f156aa1 Cvs: Remove some unneeded indirections
Change-Id: Ia2265d1a46c6141b1412f65d9548e3ad04f6a6a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 12:57:25 +00:00
hjk
16a4c56bdf Cvs: Fix crash on load
Amends 1cd936c531

Change-Id: I14239730bc079be570f060ce48cb84eb2bfe02d4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-01-24 12:17:24 +00:00
hjk
866f3aeb4a Vcs: Pass settings handles to settings pages more directly
Change-Id: I5fdec80de5678dd544713fc18335cbd805d7b9f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 11:40:49 +00:00
hjk
e0072ec165 Vcs: Move settings ownership from VcsBaseClientImpl to plugin
Turns out CVS and Bazaar already had an unused copy there...

Change-Id: I512c4d6322620e2b55d9008600ac676ce09032aa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 09:55:35 +00:00
hjk
1cd936c531 Vcs: Pimpl plugins
Essentially rename all *Plugin into *PluginPrivate, and pull out
the actual IPlugin related pieces into new *Plugin classes.

Shift the construction of the PluginPrivate to initialize(),
following the general pattern.

I tried to keep the patch as mechanical as possible, giving
room to some obvious but less mechanical cleanup needs,
that are intentionally left out of this here.

Change-Id: Iac662bf73338f9f7669064ed67b960246875c23c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 09:47:28 +00:00
hjk
f5d4b65931 Vcs: Dissolve VcsManager::registerVersionControl
It's a somewhat unusual pattern, spelling it out will help
to move the vcs plugins setup closer to the now-usual pattern.

Change-Id: Ie7b70e52d75e34cd36b6a1d55ca868e3edab44a7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-22 11:32:04 +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