From 216170653f989b97bffe35d5fbf101223430a85b Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sat, 11 Jan 2025 17:12:10 +0100 Subject: [PATCH] Git: InstantBlame: Add more logging for blame setup Change-Id: Ic3b36abe72a04331be09fafbfec114da578a95ff Reviewed-by: Orgad Shaneh --- src/plugins/git/instantblame.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/instantblame.cpp b/src/plugins/git/instantblame.cpp index 41c7d50fe90..d67bd0b2ce6 100644 --- a/src/plugins/git/instantblame.cpp +++ b/src/plugins/git/instantblame.cpp @@ -200,13 +200,16 @@ void InstantBlame::setup() qCDebug(log) << "Setup"; auto setupBlameForEditor = [this] { + qCDebug(log) << "Setting up blame for editor."; Core::IEditor *editor = EditorManager::currentEditor(); if (!editor) { + qCDebug(log) << "No current editor found."; stop(); return; } if (!settings().instantBlame()) { + qCDebug(log) << "Instant blame is disabled."; m_lastVisitedEditorLine = -1; stop(); return; @@ -224,8 +227,11 @@ void InstantBlame::setup() } const FilePath workingDirectory = currentState().currentFileTopLevel(); - if (!refreshWorkingDirectory(workingDirectory)) + if (!refreshWorkingDirectory(workingDirectory)) { + qCDebug(log).nospace().noquote() << "Cannot refresh working directory: '" + << workingDirectory << "'"; return; + } qCInfo(log) << "Adding blame cursor connection"; m_blameCursorPosConn = connect(widget, &QPlainTextEdit::cursorPositionChanged, this,