forked from qt-creator/qt-creator
TaskTree: Introduce DoneWith enum
This makes it possible to recognize the cancel state when the task was automatically stopped because of task's parent group workflow policy or when the user called TaskTree::stop(). This addresses the 2nd point in the master task below. Task-number: QTCREATORBUG-28741 Task-number: QTCREATORBUG-29834 Change-Id: I2798b9ec1d2f1d667aff51ee0271a5a15a525dc1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -423,10 +423,10 @@ ShowController::ShowController(IDocument *document, const QString &id)
|
||||
setupCommand(process, {"branch", noColorOption, "-a", "--contains", storage->m_commit});
|
||||
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
|
||||
};
|
||||
const auto onBranchesDone = [storage, updateDescription](const Process &process, bool success) {
|
||||
const auto onBranchesDone = [storage, updateDescription](const Process &process, DoneWith result) {
|
||||
ReloadStorage *data = storage.activeStorage();
|
||||
data->m_branches.clear();
|
||||
if (success) {
|
||||
if (result == DoneWith::Success) {
|
||||
const QString remotePrefix = "remotes/";
|
||||
const QString localPrefix = "<Local>";
|
||||
const int prefixLength = remotePrefix.length();
|
||||
@@ -469,10 +469,10 @@ ShowController::ShowController(IDocument *document, const QString &id)
|
||||
storage->m_precedes = busyMessage;
|
||||
setupCommand(process, {"describe", "--contains", storage->m_commit});
|
||||
};
|
||||
const auto onPrecedesDone = [storage, updateDescription](const Process &process, bool success) {
|
||||
const auto onPrecedesDone = [storage, updateDescription](const Process &process, DoneWith result) {
|
||||
ReloadStorage *data = storage.activeStorage();
|
||||
data->m_precedes.clear();
|
||||
if (success) {
|
||||
if (result == DoneWith::Success) {
|
||||
data->m_precedes = process.cleanedStdOut().trimmed();
|
||||
const int tilde = data->m_precedes.indexOf('~');
|
||||
if (tilde != -1)
|
||||
|
||||
Reference in New Issue
Block a user