Commit Graph

160 Commits

Author SHA1 Message Date
hjk
30312cc74a Vcs: Proliferate FilePath a bit further
Change-Id: I8490917bf0bde59b1cef2509ec14c3ca985fa43d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-11-09 15:08:19 +00:00
Orgad Shaneh
d63bfa4a29 VCS: Simplify submit editor accept/close flow
* Replace message box with an error on the output pane.
* Separate logic for accept and close.

Change-Id: Ib9fa201a1a67ee195086f7a22bc6678a9642452a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-25 19:19:40 +00:00
Orgad Shaneh
9b61e484be VCS: Deduplicate some submit editor closing logic
Change-Id: I622f5703c222a48606fcca3b99e87f9398e6a815
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-17 16:37:26 +00:00
Orgad Shaneh
eaad78547c VCS: Remove "Prompt to submit" settings
Task-number: QTCREATORBUG-22233
Change-Id: Ifbfd738281066af7913357ff9e2466a6c983452c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-17 16:37:17 +00:00
Orgad Shaneh
82b2b2cae9 VCS: Fix misuses of parentDir().absolutePath()
absolutePath() *is* the parent directory.

Change-Id: I59f2c4ae65b265270d432f381258b95c65e53581
Reviewed-by: hjk <hjk@qt.io>
2022-10-11 13:49:50 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
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>
2022-10-07 13:47:53 +00:00
Jarek Kobus
55efe40a58 Vcs plugins: Replace foreach with ranged for loop
Change-Id: I9be29ef128f49f62a6e1f450d8c5277b467310e9
Reviewed-by: hjk <hjk@qt.io>
2022-09-30 15:09:42 +00:00
hjk
ded6500922 Bazaar: Convert to Tr::tr
Change-Id: If49e9ccf9426f049bff842b1facbd408d1d54d4e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-26 06:00:44 +00:00
hjk
ffff3080e2 Bazaar: Inline uncommitdialog.ui
Change-Id: I92eb7a1128394f680b473fc7cb8cb9e5e4f63f67
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-23 11:28:27 +00:00
hjk
9f71f8b933 Bazaar: Inline revertdialog.ui
Change-Id: I6cff0f874076b498f07d11ede5d4e099ba179be7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-23 09:39:00 +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
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
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
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
a9f5a9c6a4 Bazaar: Simplify BazaarPluginPrivate::isConfigured() check
Change-Id: If3e940c38149f5ae75d99582593918f4847c8c3e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-20 15:09:00 +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
ecbd9f4558 VCS: Partially use FilePath in VcsBaseClient
Change-Id: I024b051ab98ece42ec011bd1c92887a946925c1a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-30 13:10:59 +00:00
hjk
56520c770c Vcs: Replace findRepositoryForDirectory
By some function findRepositoryForFile operating on any file and
using FilePath.

Change-Id: I91b8aa38b1c6b33993b9b790fbc2ff4d378ad8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-30 06:24:41 +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
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
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
ff46422b3e Bazaar: Use the new AspectContainer::applied signal
Also, remove unused BazaarSettings::sameUserId()

Change-Id: Ie3e39f2dff506932a2b6ef0a3dbffae9e40db64c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-04-07 14:16:08 +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
fb9796ae8a Bazaar: Aspectify settings
Change-Id: I0354698cf3473dd096e57481a945f0f59afc75b3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-19 14:08:42 +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
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +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
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
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
d506a005ac Vcs: Remove some unneded indirections
Change-Id: Ie9d976c06ff424fb106cb344bedb789c9b99e657
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-31 12:43:06 +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
ea23628c1c Bazaar: Move plugin pimpl into .cpp
Change-Id: If355d4dc34febcda7da24d85370f3ab607f5cd82
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-29 06:31:02 +00:00
hjk
60f0e06942 Bazaar: Remove direct accesses to singletons
Change-Id: Ie736597dcc17256fc1ef912689ef86e706acbd99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 14:34:10 +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
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +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
7fdf1b84b7 Bazaar: Modernize
override, auto, nullptr

Change-Id: I052bc2759f61129c0185e3ae196de73bf22024c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-09-20 05:28:28 +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
Nikolai Kosjar
bfa07e3ccc VCS: Fix build
Change-Id: Ie18986306317b72558b3c59021bfa921fd2fcd5b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-12 10:41:17 +00:00