Commit Graph

2483 Commits

Author SHA1 Message Date
Jarek Kobus
33e548d52b GitGrep: Remove unused field
Change-Id: I362f84401ce0bd64a39fc32e5877b9f642c0f616
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-07-17 16:38:36 +00:00
hjk
b5094f7da3 Gerrit: Make sure there's only one GerritParameters object
Later to be renamed to GerritSettings, and possibly using aspects.

Change-Id: Idd3d9d3de4f9827478129fe210abfa7b80cff84d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-07-16 09:36:07 +00:00
hjk
d8ccc0479d Gerrit: Inline two functions that are used just once
Change-Id: Iad49a785353203585342b61016df34105bc3a22e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-07-16 09:32:56 +00:00
hjk
4d9bb822af Git: Make Gerrit settings handling more similar to others
Use a singleton for the main settings, don't pass it around as
shared pointer.

Change-Id: I5c32679452ad631998a688afc9a6e2b154bf3a5d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-07-16 08:25:10 +00:00
Jarek Kobus
779390829c TaskTree: Introduce For element
Improve code readability by requiring iteratable Group
to be named For.

The For's c'tor requires an iterator element as a first arg.

The For's c'tor allows for passing exactly one iterator element.

It's not possible to place iterators inside Group element anymore.

Change-Id: I9dfe2c0da058abac161f66c4e336da2417c383f1
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 13:39:40 +00:00
Jarek Kobus
6c2c287335 GitClient: Call done handlers also in case of an error
This removes the "Precedes: <resolving>" label when
doing git show on a very fresh, local commit.

The same fix applies to "Branches", though not sure if
it's possible that there is no branch.

Change-Id: I08614d47b229bd04256de1a059876d679cc57b99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-07-09 07:03:43 +00:00
Jarek Kobus
faff9bb220 GitClient: Simplify recipe
Use LoopList element instead of constructing large tree.

Change-Id: Ie10af350c7ed15a7d06363414174042b65c7ec53
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-07-09 07:03:34 +00:00
hjk
66853bacf7 Git: Fix two QMultiMap deprecation warnings
#if QT_DEPRECATED_SINCE(6, 0)
    QT_DEPRECATED_VERSION_X_6_0("Use insert() instead")
    iterator insertMulti(const Key &key, const T &value)
    {
      ....

Change-Id: I94c79e16776775b6b2032113e690e73b63a03dc9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-28 07:12:26 +00:00
Eike Ziller
38e005692e Plugin meta data: Add full stop to descriptions
Where they were missing. The text is shown as a paragraph in the
extension manager.

Change-Id: I6e15c89fe4023b222e9c476f4312e13fcb0905c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-28 06:46:52 +00:00
Eike Ziller
f870e7ffdf FindFilter: Move settings saving to Store
This makes it possible to save it for the session instead/in addition.

Task-number: QTCREATORBUG-793
Change-Id: I95bc20f4912a97863cb88849e32699a689ba6f3f
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-03 12:03:44 +00:00
Leena Miettinen
6cd7aed8eb Add long descriptions to some plugins
Edited the short descriptions to answer the question
"What can I do with this extension" to help users decide
whether they need it.

In long descriptions, tell users what else they need to
be able to use the plugin.

Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-31 06:42:53 +00:00
hjk
efae651924 Utils: Introduce a convenience function creatorColor()
... forwarding to creatorTheme()->color(...)

Change-Id: Iefaa043495127b3e500ed225584481d3ec0f8c1f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 13:49:25 +00:00
Alessandro Portale
7bc65cf9f3 PluginSpecs: Change URLs from http:// to https://
Avoid the redirect that is inevitable nowerdays.

Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.

Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 20:13:29 +00:00
hjk
971938421c Use LayoutBuilder V2
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.

The Lua based settings access is disabled for now.

Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-27 12:38:48 +00:00
hjk
917523d7e3 Fix a few {QByteArray,QList}::count related deprecation warnings
Change-Id: I493e557a2ec976560c9e37312d8ae860490a2831
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:06:47 +00:00
Jarek Kobus
982ad24243 CommandLine: Reuse new c'tor
Change-Id: Id154881b4f5d8c488e5c1f5e0f843d36bf838759
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-22 09:13:41 +00:00
Eike Ziller
eb45240649 Remove PluginManager::futureSynchronizer()
Use the global synchronizer from Utils::futureSynchronizer() directly

Change-Id: Ic8843bc1ff7951c041529a258f36117f08ec4b35
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-21 13:02:46 +00:00
Eike Ziller
90b3068ecf Merge remote-tracking branch 'origin/13.0'
Conflicts:
	doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc

Change-Id: If93df2592a66679eeff9c8a337372e3aad65f1f1
2024-05-21 09:40:46 +02:00
Christian Stenger
85617f1369 Git: Avoid crash when reloading files
Explicitly reset the document when the document gets closed.

Task-number: QTCREATORBUG-30824
Change-Id: I4fb3d6fd6041990e5b8b4f6b7c4fd9ebc62f5a4a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-05-21 05:34:34 +00:00
Jarek Kobus
53de9701f4 CommandLine: Use more 1-arg c'tor
Change-Id: If52c4094f94859d51e31862d913b1756e333e512
Reviewed-by: hjk <hjk@qt.io>
2024-05-16 12:45:42 +00:00
Eike Ziller
90e1d96019 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc
	qbs/modules/qtc/qtc.qbs
	src/plugins/remotelinux/linuxdevicetester.cpp

Change-Id: I8434e41dcfbb50f6ed032a3e0af1591eb19b79eb
2024-03-20 15:05:58 +01:00
Jarek Kobus
d5e8f70192 VcsBaseClientImpl: Don't leak VcsCommand instances
The running VcsCommand may leak on shutdown. Make them always
a child of a guard object.

Change-Id: Ie2d07d15cd13f1c08636bb1e9c5face09c6a782d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-03-18 21:56:08 +00:00
Marcus Tillmanns
685f452d91 SettingsDialog: Call Aspect::cancel on cancel
Previously the SettingsDialog did not call Aspect::cancel().

Without this, the volatile value is not reset if the user did some
changes before pressing cancel.

This "should" mean that re-opening the settings dialog should present
the changed values again. But since not all aspects are implemented
correctly, they reinitialize from their value instead of their
volatileValue.

When the Settings Dialog is reopened and applied, a warning is triggered
as the container thinks its dirty, but the Aspect::apply returns false.

Change-Id: I8fac66fc95f9118d69c789ced22481d121769f0b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-03-14 09:22:01 +00:00
Eike Ziller
5af531cd39 Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-28 08:09:05 +00:00
Eike Ziller
a8414effd8 Merge remote-tracking branch 'origin/13.0'
Change-Id: If752e3383b35873b696e8beca27d8838a4096c8a
2024-02-27 09:04:51 +01:00
Eike Ziller
d2cec31f08 Git: Fix a label
Settings labels are lower case and end with ":"

Change-Id: I729d25569790899a8d26966914ee8b872a48bcb0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-26 09:06:49 +00:00
Andre Hartmann
1117954950 Git: Respect author and mail mapping
Git allows mapping authors and mail addresses:
https://git-scm.com/docs/gitmailmap

While using this file already worked for (instant)
blame, log and show still used the original values
from the repo. This patch makes the display within
Creator consistent.

Change-Id: I3c0e764c435a505e285941f4fdc91131f85af590
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-22 13:15:43 +00:00
Christian Kandeler
4a722bfa9d Utils: Add async variant of DataFromProcess
... and make use of it in PathChooser.

Change-Id: I0e81afec2caf38f488a8ab98b55016535c187fc2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-20 11:59:43 +00:00
Marcus Tillmanns
291a893f5f VCS: Allow remote vcs operations
Both VcsBaseClient::vcsBinary() and VcsBaseClient::processEnvironment()
get an additional parameter "FilePath target" to allow selecting binaries
and environment based on where the repository is located.

This allows to select e.g. a git binary on a remote device, and the
environment of the remote device for each VCS operation.

A bunch of file path operations are either fixed or ported to actually use
FilePath correctly.

Change-Id: I6afc645772fde3dff3ec19c13efe538e5888e952
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-12 11:25:06 +00:00
Andre Hartmann
c22471d316 Git: Disable upstream status for Detached HEAD
It was always zero as Detached HEAD is a special
branch that is not actively queried. It can be
enabled later, but the quick fix is to disable it.

Change-Id: Ib191e1b5551a13bc4911184e12e06a0b4dc28ddf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-11 19:26:18 +00:00
Andre Hartmann
d9eeddfad1 Git: Fix upstream status for untracked branches
Using HEAD is wrong as soon as the branch is not
checked out. Instead the branch name must be used.

Amends 960ac1adf4

Change-Id: Id10b4012455ccb9b393404413a369f241edc098e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-11 11:27:58 +00:00
hjk
0b44cc5589 Vcs: Hide topic cache in new IVersionControl pimpl
Potentially more stable api long-term. Also simplifies the
user side code a bit.

Change-Id: I6913e27e2a5dc14907e72f252081cdbed34842a3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 16:00:56 +00:00
hjk
4e5692d628 Vcs: Use QString and Id in editor parameters instead of char *
... and use it to simplify the translation setup.

Change-Id: Ibd386ede3ecfc351316bed53bc184954adbcaa74
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 10:27:01 +00:00
Marcus Tillmanns
70e013fd25 Git: Cleanup gitExecutable()
Using expected removes a bunch of handling code.

Change-Id: Id524912d82aa693fbb39c7e7fa34abd77153f92e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-08 13:24:38 +00:00
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
Jarek Kobus
8bcc78a044 Various plugins: Fix some more C++20 warnings about [=] captures
Change-Id: If20aac4320c84096a07d67cc137886638286acf8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-06 08:34:44 +00:00
Andre Hartmann
97e582c3c0 Git: BranchView: No "Add..." action for remote branches
It has been wrong forever, but it just doesn't make
sense to have an add action for remote branches.

Change-Id: Ia9a96d85f95821f27215e0a172435f38abcd685f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-05 17:27:14 +00:00
Andre Hartmann
d3385ebb65 Git: Branchmodel: Fix fetching all remotes at once
We want to return an empty string when "Remote Branches"
is selected, instead of an empty optional.

Broken by 224e4eeb59

Change-Id: I5af06fafec48910226fdedf4a15079444cc54b6e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-05 16:37:59 +00:00
hjk
324d0f7271 Git: Also show binary path in the settings
More similar to svn, cc, bzr, and Gives the user a chance to specify
something different. Plan is to make this also work with remote setups
[and possibly a per-device option, or automatism]

Change-Id: I18c1a90642c9cbe2ef9419103f3919c4a19122e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-05 14:19:08 +00:00
Jarek Kobus
243d063cb9 Gerrit: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews
QSharedPointer impl is poor and it's going to be removed from Qt 7.

Change-Id: I2954186d7e1df0f6e07fa840204f2a4b00fed73e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-01 15:20:24 +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
Jarek Kobus
f6be85b1d2 Process: Refactor timeout handling
Rename ProcessResult::Hang into Canceled.

Change the behavior of the Process:
Whenever the terminate() or kill() is called, including
indirect calls through stop() or runBlocking()'s timeout,
mark the process result as Canceled.
In this way the Process running by a call to start()
may also finish with Canceled state. Before it was only
happening for processes started via runBlocking().

Adapt the runBlockingStdOut_data() test accordingly.

Get rid of ProcessInterface::m_canceledByUser field.
Use ProcessResult::Canceled state instead.

Fix existing 3 usages of m_canceledByUser field.
Use standarized exitMessage() method for them.

Add automatic measurement of process execution.
Introduce processDuration() getter.
Use it for reporting exitMessage() instead of timeoutS().

Change-Id: I1a68559ce844caef863a97a6b0577b0238011f70
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:38 +00:00
Andre Hartmann
c3d7b4de3e Git: InstantBlame: Lower logging category for non-error
`TextEditorWidget::fromEditor(editor)` fails in the
DiffEditor, so this message is no warning but rather
an info.

Change-Id: I1635b77910e609bda470d2f657916bbc98860af4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 07:00:51 +00:00
Jarek Kobus
7fc991ac8e Process: Remove no-op calls to setTimeoutS()
The timeout is only used with runBlocking(), otherwise it's no-op.

Change-Id: I7d81e4a73c7182bd19c435c112a2d64c3f40ba2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:14:07 +00:00
Andre Hartmann
95aa370b69 Git: Remove now outdated function comment
Amends 98c0e9764a

Change-Id: I9f7bf520bb5ead83d883a554c97400d183f6fcee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:41:50 +00:00