From 718fdcc6079cc1749c9cfeb3e00af345d394dacc Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 27 Mar 2024 08:53:49 +0100 Subject: [PATCH] Axivion: Fix crash on close Fixes disconnecting the correct connection. Amends 99aed851ef8abdccb3c13686db61f644a51fe44c. Change-Id: I3175291086b08ad5434c4211aba51bd5eb439e24 Reviewed-by: David Schulz --- src/plugins/axivion/axivionplugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/axivion/axivionplugin.cpp b/src/plugins/axivion/axivionplugin.cpp index 0f4686e403c..cd27cbbcb0c 100644 --- a/src/plugins/axivion/axivionplugin.cpp +++ b/src/plugins/axivion/axivionplugin.cpp @@ -238,6 +238,7 @@ public: std::unordered_map> m_docMarksTrees; TaskTreeRunner m_issueInfoRunner; FileInProjectFinder m_fileFinder; // FIXME maybe obsolete when path mapping is implemented + QMetaObject::Connection m_fileFinderConnection; }; static AxivionPluginPrivate *dd = nullptr; @@ -332,7 +333,7 @@ void AxivionPluginPrivate::onStartupProjectChanged(Project *project) return; if (m_project) - disconnect(m_project, &Project::fileListChanged, this, &AxivionPluginPrivate::handleOpenedDocs); + disconnect(m_fileFinderConnection); m_project = project; clearAllMarks(); @@ -346,7 +347,7 @@ void AxivionPluginPrivate::onStartupProjectChanged(Project *project) } m_fileFinder.setProjectDirectory(m_project->projectDirectory()); - connect(m_project, &Project::fileListChanged, this, [this]{ + m_fileFinderConnection = connect(m_project, &Project::fileListChanged, this, [this] { m_fileFinder.setProjectFiles(m_project->files(Project::AllFiles)); handleOpenedDocs(); });