Commit Graph

232 Commits

Author SHA1 Message Date
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
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Orgad Shaneh
15b176e30c VCS: Improve dialog on submit prompt
The dialog appears when closing the commit dialog without committing,
or when "prompt to submit" setting is enabled.

Fixes: QTCREATORBUG-18799
Change-Id: I8eb20becbcee7281b9f673a35ec698c6f8e04a40
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-11-12 18:35:44 +00:00
Orgad Shaneh
9cdce2ed52 CVS: Modernize
override, auto, nullptr

Change-Id: I1611ca33b1c3ddd563d9e74f77dbcdc903b65b78
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-09-20 05:28:45 +00:00
Orgad Shaneh
767137157e VCS: Consolidate submit editor actions setup
Change-Id: I36754779b6a9aa35de705b368daf8c2a1de058c6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-28 07:26:14 +00:00
hjk
713b8636ea Vcs/Text search: Remove a few addAutoReleaseObject uses
Using a QObject parent suffices here.

Change-Id: I4dc5448511d55bf14fbd8f810e91336a49e94094
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-02-06 11:58:15 +00:00
David Schulz
0eb7bab20c Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-02 13:15:55 +00:00
Tobias Hunger
21ab4c427c VCS: Offer to save-all before commit
Task-number: QTCREATORBUG-3857
Change-Id: I3ff3d90803eec4134b9da4af5567753ad7bffafb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-12 10:04:20 +00:00
Tobias Hunger
19c9194b11 VcsManager: Register IVersionControls with VcsManager
Get some more objects out of the pool.

Change-Id: Id93021b712307c4777dc39b9d15aa18a46318885
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 08:44:47 +00:00
Eike Ziller
d64e17ad55 Move mimetype definitions to plugin specs
- Avoids the hassle of QRC files and manually registering mime types
- Avoids performance regressions because of mime types that are
  registered after mime database has been used
- Makes it technically possible to detect that a disabled plugin could
  handle a mime type if it was enabled

Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-27 13:54:59 +00:00
Orgad Shaneh
414f49ea19 VCS: Use Qt5 connect for annotate
Connect directly to the editor widget, which has a strong type.

Change-Id: I4d9778bc4a3c8ba1b37c5a5c0286fd72cda135de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-28 09:39:38 +00:00
Orgad Shaneh
5832f52cee VCS: Replace describe slots with lambdas
Change-Id: I05ca25aad8be43fdfa15d3fb5eaaa9bf753ee79f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-28 09:38:12 +00:00
Orgad Shaneh
c844071627 Rename VcsBaseEditorParameterWidget -> VcsBaseEditorConfig
Change-Id: I5626e66ba2b7a760ce55263edce9e716067ea6a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2016-10-24 16:23:59 +00:00
Tobias Hunger
5efd82468b SynchronousProcess: Store raw bytes from stdout/stderr of the process
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>
2016-07-15 14:16:03 +00:00
Tobias Hunger
eb07fd92b2 CVS: Modernize
* Use pragma once
* Use some more overrides
* Tiny clean-ups here and there

Change-Id: I951afa8ed31c5f414d4ae872c79f80db19909ee0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-04 13:16:42 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
cfc89a685e IDocument: Rename defaultPath and suggestedFileName
To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer
what they are for, and that they actually belong to each other.

Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-14 14:40:45 +00:00
Tobias Hunger
96bc63e0e7 CVS: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I8a36528605e5de791ece191e94a0911112b5a237
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 08:35:19 +00:00