Commit Graph

18 Commits

Author SHA1 Message Date
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
Orgad Shaneh
92a4c0d38a VCS: Pass links to the correct VCS
Current implementation requires each VCS to connect to the referenceClicked
signal. Only Git does it, but this is conceptually wrong. If other VCSs
would connect to the same signal, all of them will act upon clicking a
link, which can result in multiple editors, most of them are likely to be
invalid anyway.

By default executes vcsDescribe. Can be extended or modified by subclasses.

Change-Id: Ib953009efd77446a4b2963f0aa8a2f3f3d26509f
Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-21 06:47:20 +00:00
Orgad Shaneh
6cfd240285 OutputWindow: Do not activate links for empty reference
Change-Id: I1d4fc0f25f1882a34058c66c51376982cc70238e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-18 16:52:03 +00:00
Christian Kandeler
c0c2df203d Utils: Split up OutputFormatter class
An OutputFormatter takes some string and prints it into a text edit.
In addition, it can ask any number of registered OutputLineParsers
whether they think any special formatting should be applied to the
current line.
This mechanism is now properly modeled by our class design, rather than
being hidden in a monolithic class where everything had the same type,
no matter what its purpose was.
Prospective contributors can now simply be pointed to the
OutputLineParser class and will see at one glance what they have to do.

Change-Id: I9844499f062c94fb038ce73fd6f26576910148c2
Reviewed-by: hjk <hjk@qt.io>
2020-04-14 14:15:26 +00:00
Christian Kandeler
0f16378188 OutputFormatter: Do all formatting centrally
Instead of working directly on the text edit, the specialized
OutputFormatter classes now simply ask the base class to do it for them.
In practice, the request currently always is "turn this part of the text
into a link", but the interface can be extended to other types of
formatting, should that ever be required.
This is a win/win situation: Derived classes no longer have to fiddle
with QTextCursor & friends (nor do they have to call any base class
functions), while the base class can make strong assumptions about what
the derived class does to the text edit (i.e.: nothing).

Change-Id: Icc4bc52d4001b0359247563e39a206fa274833d7
Reviewed-by: hjk <hjk@qt.io>
2020-04-14 09:46:34 +00:00
Eike Ziller
10114dc036 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidmanifesteditorwidget.cpp

Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
2020-04-07 11:13:58 +02:00
Andre Hartmann
93e788fd19 VcsOutputFormatter: Allow ranges with three dots also
This can, for example happen after a forced push to Gitlab.
The VCS output looks like this in that case:

  + 7c145ae...c301cc6 master -> master (forced update)

Change-Id: I84bec1a6cf2bf875732461f767ebbf4703cdbadb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-06 10:28:09 +00:00
Eike Ziller
ee2840d5b8 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ic741fdedc168430e5be6cb1645d9329dbc7a6b08
2020-03-23 09:35:54 +01:00
Andre Hartmann
59f6c6282c VCS: Capture more hashes with suffixes
Recognize multiple trailing carets and
tilde/number combinations too.

Amends 098ee51a9b

Change-Id: I91ea33f7e2dae61f18c2899c949034ebedca0157
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-03-21 18:50:48 +00:00
Christian Kandeler
04a99c1de1 Remove the limitation that output formatters have to be exclusive
Introduce an aggregating output formatter that forwards its input to a
sub-formatter that feels responsible for it, or otherwise lets the base
class handle it.
Our output panes now use such an aggregating formatter.
In particular, this means that in the future, we won't have to stuff all
run control output formatting into the Qt output formatter anymore.

Change-Id: I5498f200a61db10ccff3ec8974c6825da7f7072d
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 13:48:15 +00:00
Eike Ziller
d80f3972a4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ia8254720b2ba6e3e7b859017e1c2b6e289bed771
2020-03-20 08:16:19 +01:00
Andre Hartmann
098ee51a9b VCS: Capture hashes with trailing caret
The Push-to-Gerrit dialog calls

  git branch -r --contains 3fa72ff^

for example.

Change-Id: I6c0bd792dd5bf85dec61fa576fbd8bba3aa9f06d
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-03-20 06:08:30 +00:00
Christian Kandeler
0ff5bf75e1 Move some code from OutputWindow to OutputFormatter
That's where it belongs: The logic there is applicable to all output
formatters, not just those used via an output window.

Change-Id: Idf4ca8d22631ca96feb97553f28724c0275e0bf8
Reviewed-by: hjk <hjk@qt.io>
2020-03-17 09:39:12 +00:00
Orgad Shaneh
ba87fb2083 Git: Add actions for changes in output window context menu
Change-Id: I5aa46f87b82670286ac225d71a3a045133976e86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-28 09:53:51 +00:00
Andre Hartmann
937e2b56e7 VcsOutputFormatter: Fix multiple regexp matches
Fixes: QTCREATORBUG-23614
Change-Id: I86e548a1f727113782afbc6b934d6dddc92c92ea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-18 19:19:26 +00:00
Andre Hartmann
4cbb24906f Git: Allow clicking references in VcsOutputWindow
Fixes: QTCREATORBUG-16477
Change-Id: If1f36bec0826a3116e5261a270cd63a1536e13f5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-16 19:13:53 +00:00
Christian Kandeler
67f66a39be VcsBase: Fix memory leak
Change-Id: Icb0c2a86ee0d5a1e22dc17fbc2a5d155b928e459
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 12:14:03 +00:00
Miklos Marton
8f88b89d81 Make http(s) urls clickable in the VCS output pane
Fixes: QTCREATORBUG-23536
Fixes: QTCREATORBUG-19171
Change-Id: Ibf6d632031068c7f52cb15f534960e8238bdb21d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-05 22:02:39 +00:00