Therefore, merge the code of codecFor() and encoding()
to avoid further mis-usage.
Change-Id: I086e4ace6c791d16f43f14c423b6529ad199c456
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Don't define 2 separate group setup items. Make OnGroupSetup
be able to handle also dynamic setup - like it's done with
CustomTask's setup handler.
Change-Id: I43e135f268ea96419b44ef5a4325707a124b4921
Reviewed-by: hjk <hjk@qt.io>
Use TaskAction for dynamic group setup. Get rid of possibility
of selecting group's children to be started inside group setup.
Use dynamic children's setup instead, so that each individual child
may decide itself whether it wants to be started or not.
Change-Id: Ie31f707791db0dc26be92663ca6238b8e49c3b98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
Move creating the post process task into vcs base class
and reuse it in subclasses.
Change-Id: Ibd81d1640524980c0554a5d0ddc41b96ecd7f73f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Don't pass startupFile arg on every setDiffFiles.
Provide a setStartupFile() separate setter inside
DiffEditorDocument and call it directly from
DiffEditorController::setStartupFile().
Correct updateDescription() implementation.
Change-Id: Ie489431632bdabc61e2c692d09caf7b2e3990764
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
We didn't do that before. We did it only for ShowController.
Amends cbcfc0242e
Change-Id: I6ba68bdb6b16204bcc66bdfd63bf7457c713ac28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Remove initialize() method and do it inside reloader method.
When reloader is being executed the workingDirectory is already
set.
Amends bfcd1149eb
Change-Id: I600daaff8d15f3bdb822789623947b31df0b7edd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This makes it possible that staged and unstaged
tasks are run in parallel, so the result is to be
expected earlier.
Change-Id: I0b99d17a55e39f2178d6ebed208e29fbaaa8aa5e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Instead of reloader function. Use task tree for ShowController.
Make diff processing a part of task tree.
Change-Id: I732d0a14eaf8de7ce0d1be891fb4700b22ea24b7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
Remove ConflictHandler::attachToCommand().
Rename handleResponse() into handleConflictResponse() and
move it out of ConflictHandler class.
Change-Id: I0a64bd19f288d9377a93cdb5eea2c44b65bf6fdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Simplify createCommand() implementation. All callers
passed either non-null editor (in this case the
bindMode was always NoBind) or passed a null editor and one
of two values for bindMode (in this case the only
effect was to add (or not) a RunFlags::ShowStdOut flag).
Drop CommandOutputBindMode enum completely and pass
directly RunFlags::ShowStdOut when needed (i.e. in cases
we were passing CommandOutputBindMode::ToVcsWindow).
Change-Id: Ic3af05818933a03f615ba02267403b9f0bd326ba
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Get rid of editor arg.
Reorder last two args (to conform to vcsExecWithHandler).
Change-Id: Ia32757ac8b766640b76bef81f1b2e0f5efe4d48c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Before, vcsExec() returned already started VcsCommand.
Later, callers of vcsExec() were establishing connections
to the retured VcsCommand::done() signal. However, when
process fails to start (e.g. because of non-existing
executable), the done() signal may be emitted synchonously
from inside VcsCommand::start(). In this scenario
callers of VcsCommand could miss the emission of done()
signal and connect to already finished command.
Instead, provide a vcsExecWithHandler() function which
takes a handler to be called when command finished.
In addition it takes the context object, too.
Don't return VcsCommand from vcsExec() anymore.
Change-Id: I2fb5fbe5d27632ea039c650d37e5d7d1b60cebc0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Otherwise, the destructor of VcsCommand could have been
executed in meantime (since it's invoked automatically
after done()) and we might access invalid pointer to the
command inside the done handler.
Change-Id: I031e2281952451d4e01c47f437097a1e7bf8899f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Inspired by the Visual Studio Code plugin GitLens.
Add an annotation to the editor line the cursor
is currently in. A tooltip contains the commit
data and allows to invoke git show for the commit.
When the automatic annotation is turned off, it can
still be forced for the current line with an action.
The default shortcut for this action is: Alt+G,Alt+I
Task-number: QTCREATORBUG-23299
Change-Id: I58eef9efcf531afb11470e5f5456e19f282b18d0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Add -- before file list on add/remove.
* Run in the correct directory.
Fixes: QTCREATORBUG-27405
Change-Id: Ie04cd19981dac465cf70dba8b089fd18a4ecdf8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Get rid of abstract base ProgressParser and replace
it with ProgressParser function. The only one former
subclass GitProgressParser is now functor object.
Pass future interface directly to the ProgressParser
function, along with input text to be parsed.
Change-Id: Icbcf0b6e55097f8b38eb8a32ceaa4414723116d0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
It is going to be used outside of VcsCommand, too.
Use RunFlags enum as an argument to several functions
instead of unsigned.
Change-Id: I355c80a845a9b5982108fbde3412754392dce702
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Remove VcsCommand::FullySynchronous flag.
Rename VcsCommand::NoFullySync into UseEventLoop.
By default the command will run fully synchronous
(i.e. without nested event loop). Only when
UseEventLoop is specified, and the command runs in
main thread, the nested event loop will be used.
This change should preserve the current behavior
on all code paths.
Change-Id: Id4bbaf68402ceed5e3fcc6f294521e87eb0b8d4d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Conform to QtcProcess interface. Use result() when needed.
Change-Id: Idd4c71d9a103e8649b08ec7787c2f286423a31ec
Reviewed-by: Orgad Shaneh <orgads@gmail.com>