diff --git a/src/plugins/git/instantblame.cpp b/src/plugins/git/instantblame.cpp index c1cff960a59..df9d913c796 100644 --- a/src/plugins/git/instantblame.cpp +++ b/src/plugins/git/instantblame.cpp @@ -104,14 +104,14 @@ QString BlameMark::toolTipText(const CommitInfo &info) const InstantBlame::InstantBlame() { m_codec = gitClient().defaultCommitEncoding(); + m_cursorPositionChangedTimer = new QTimer(this); + m_cursorPositionChangedTimer->setSingleShot(true); + connect(m_cursorPositionChangedTimer, &QTimer::timeout, this, &InstantBlame::perform); } void InstantBlame::setup() { qCDebug(log) << "Setup"; - m_cursorPositionChangedTimer = new QTimer(this); - m_cursorPositionChangedTimer->setSingleShot(true); - connect(m_cursorPositionChangedTimer, &QTimer::timeout, this, &InstantBlame::perform); auto setupBlameForEditor = [this](Core::IEditor *editor) { if (!editor) {