From ce9826ae6e727e344c13762eb92e1882768f4a2d Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 20 Oct 2024 13:03:11 +0200 Subject: [PATCH] VcsBase: Fix enabling git actions after rebase Delay the state changed signal for proper evaluation (a file check for `rebase-apply` is run when the signal is emitted) This fixes that Git "Rebasing" stayed in the title bar when rebasing was long finished and therefore the rebase actions stayed disabled. TODO: The [REBASING] message in the projects view is not fixed, it disappears when clicking the title bar. Fixes: QTCREATORBUG-31815 Change-Id: Ic83949dfdaf26df3af8149457e3f282ff1bcefe5 Reviewed-by: Orgad Shaneh --- src/plugins/vcsbase/vcsbaseplugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 100c230be43..ad4b1dde3be 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -30,6 +30,7 @@ #include #include #include +#include using namespace Core; using namespace Utils; @@ -308,8 +309,10 @@ void StateListener::slotStateChanged() state.clearPatchFile(); // Need a repository to patch qCDebug(stateLog).noquote() << "VC:" << (vc ? vc->displayName() : QString("None")) << state; - EditorManager::updateWindowTitles(); - emit stateChanged(state, vc); + QTimer::singleShot(500, this, [this, state, vc] { + EditorManager::updateWindowTitles(); + emit stateChanged(state, vc); + }); } } // namespace Internal