diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index b058600d0b2..b371c8b2f64 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -197,6 +197,7 @@ class StateListener : public QObject public: explicit StateListener(QObject *parent); + ~StateListener(); static QString windowTitleVcsTopic(const QString &filePath); @@ -221,10 +222,14 @@ StateListener::StateListener(QObject *parent) : QObject(parent) connect(SessionManager::instance(), &SessionManager::startupProjectChanged, this, &StateListener::slotStateChanged); - EditorManager::setWindowTitleVcsTopicHandler(&StateListener::windowTitleVcsTopic); } +StateListener::~StateListener() +{ + EditorManager::setWindowTitleVcsTopicHandler({}); +} + QString StateListener::windowTitleVcsTopic(const QString &filePath) { FilePath searchPath;