Commit Graph

186 Commits

Author SHA1 Message Date
hjk
2d37a7421f VCS: Simplify VcsEditor setup
Create the editor parameter structures in-place, and also
include the other two parameters in the struct to simplify
the signature of the c'tor.

Change-Id: Iff7d5ddf3096f4a3ed18e53265ae74806823af32
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 14:49:02 +00:00
hjk
ad2230b1e1 Vcs: Move VcsEditorFactory closer to its product
Change-Id: Iaf2e6bdb4f04f0f1314ca7725feb63394a693511
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 09:58:23 +00:00
hjk
a39d38d187 Vcs: Merge basevcssubmiteditorfactory.* into vcsbasesubmiteditor.*
Not worth a separate translation unit anymore.

Change-Id: I579c81c811cd84d89fd39755dca2fbeffae017de
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 08:03:26 +00:00
hjk
980605ecb0 Vcs: Make submit editor setup a bit more compact
Change-Id: I14c4c51a456f7b3b04b79b63b476f89eb58d3ea0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 07:53:48 +00:00
hjk
48d47faa4b Vcs: Rename VcsBasePluginPrivate to VersionControlBase
The classes derived from this had a dual role of implementing the
version control interface (IVersionControl) and as the plugin pimpls.
The name was focusing on the latter, but plugin pimpls are being phased
out in the new 'setupFoo()' world, so only the version control interface
part remains.

Change-Id: I60396f1729c736bc6c9e4fca250a5926e9d60f51
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-06 16:34:44 +00:00
hjk
ce1e565a10 Utils: Also rename parameteraction.{h,cpp} to action.{h,cpp}
Change-Id: I203909d9b2d460012b9347d507ac7a701700c48a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-29 14:23:39 +00:00
hjk
66b50438d8 Utils: Rename ParameterAction into Action
It became the defacto-type for action when ActionBuilder started
creating them as default.

Change-Id: I1008d60b78ea83919ce1c80a7ef828527fe9902c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-29 13:01:29 +00:00
hjk
ba8675d113 Bazaar: Hide plugin class definition in the .cpp
Change-Id: I5afde2006bdd8db0fe0b6b57a2d194db69011700
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-12 10:13:12 +00:00
hjk
b442ca3873 Core: Rename ActionBuilder::setOn* to addOn*
There could be multiple connections.

Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-13 13:00:00 +00:00
hjk
e17f0b6164 Core: Rename ActionBuilder::setContainer to addToContainer
An action/command can be used in several places.

Change-Id: Ifa26f64f7d200d93ada13f272de0fa833f886997
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-13 08:37:10 +00:00
Christian Stenger
8ae0e3dbf8 Bazaar: Make create repository a global action
Also initialize text of parameter actions when defining the parameter action.
Avoids empty items if the setParameter() call is done too late.

Change-Id: I5e3398e5e537fc65f5c9c43cd62345b322f3143d
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 14:11:25 +00:00
hjk
f9e2942a80 Bazaar: Use Core::ActionBuilder to create menu entries
Change-Id: Ibae72a912dee82ef8a0b7865d69f87fd65ee8f43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-15 13:05:04 +00:00
hjk
9a69c78ca5 Vcs: Convert settings pages to latest style
Last change in that area for this year.

Change-Id: Ibae9f1869cb20faf85c0c1669b84751ad022b8fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-07-18 12:15:07 +00:00
Eike Ziller
4f1560666a Don't use uppercase ALT for shortcut strings
It works, but we otherwise consistently use "Alt"

Change-Id: I539a481aae1fb3d7da0a05d732122f3b81abfccb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-30 07:50:24 +00:00
hjk
337497d990 Vcs: Use new FilePathAspect in a few places
Change-Id: Idc23616dd3b7bc21301471cb48e2893116b83f0d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-17 05:51:17 +00:00
hjk
ce7ee677d8 Vcs: Use PagedSettings for all plugin settings
Hopefully the last structural change for a while.

Settings lifetime is again tied to the plugin private.

Change-Id: I221e8b8baa69422306191b48a9f034ef5b1a0dc2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-15 13:11:05 +00:00
hjk
f6c995cdd0 Bazaar: Follow the Fossil settings setup
Change-Id: If711f8a43a6579c72cad1bc98ef24c3fdd83993b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-15 13:09:58 +00:00
hjk
c85b72000f All: Use the shorter access to aspect values in a few places
Change-Id: Ie0ff0e4e1cf4c2750897ea733dfccb743f44fa93
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 16:04:38 +00:00
hjk
8cf500c5bc Utils: Make Layouting a top level namespace
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-25 13:31:25 +00:00
Alessandro Portale
9f2f2f3390 Translations: Change translation context prefix from "::" to "QtC::"
lupdate would be confused by translation contexts starting with ::

Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:55 +00:00
hjk
118b84ffd6 Use simpler Plugin::initialize() when feasible
Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-20 12:13:10 +00:00
hjk
013ad1345e VcsBase: Proliferate use of FilePath
... and update user code.

Change-Id: I52c08e9e07238536d31fc72f97312ac582a1e32f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-20 12:02:32 +00:00
hjk
fa7dd2fd3b VcsBase: Convert to Tr::tr
To reduce the amount of duplicated strings for translators to handle.
The problem is not very prominent in vcsbase, but that's where we
are moving everywhere else.

Change-Id: Icb11fad3bccfea8a1408420e729566a75adccb66
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-18 15:33:59 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
ce161d0b16 VcsBase & dependent: Fix const correctness
And some minor cleanups.

Change-Id: Id0c2df6865ba84c054f0fb97c0ac42a76a128355
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:57:14 +00:00
Jarek Kobus
32e824c762 VcsBase: Don't return editor from annotate()
Take int firstLine as last arg instead. Switch the order of
3rd and 4th args as most callers provide lineNumber
and don't provide revision.

Change-Id: Iab60c1068a4d9829d10219af39bf3dcbf51e37bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-11 11:15:15 +00:00
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