forked from qt-creator/qt-creator
Axivion: Fix crash on close
Fixes disconnecting the correct connection.
Amends 99aed851ef
.
Change-Id: I3175291086b08ad5434c4211aba51bd5eb439e24
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -238,6 +238,7 @@ public:
|
|||||||
std::unordered_map<IDocument *, std::unique_ptr<TaskTree>> m_docMarksTrees;
|
std::unordered_map<IDocument *, std::unique_ptr<TaskTree>> m_docMarksTrees;
|
||||||
TaskTreeRunner m_issueInfoRunner;
|
TaskTreeRunner m_issueInfoRunner;
|
||||||
FileInProjectFinder m_fileFinder; // FIXME maybe obsolete when path mapping is implemented
|
FileInProjectFinder m_fileFinder; // FIXME maybe obsolete when path mapping is implemented
|
||||||
|
QMetaObject::Connection m_fileFinderConnection;
|
||||||
};
|
};
|
||||||
|
|
||||||
static AxivionPluginPrivate *dd = nullptr;
|
static AxivionPluginPrivate *dd = nullptr;
|
||||||
@@ -332,7 +333,7 @@ void AxivionPluginPrivate::onStartupProjectChanged(Project *project)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_project)
|
if (m_project)
|
||||||
disconnect(m_project, &Project::fileListChanged, this, &AxivionPluginPrivate::handleOpenedDocs);
|
disconnect(m_fileFinderConnection);
|
||||||
|
|
||||||
m_project = project;
|
m_project = project;
|
||||||
clearAllMarks();
|
clearAllMarks();
|
||||||
@@ -346,7 +347,7 @@ void AxivionPluginPrivate::onStartupProjectChanged(Project *project)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_fileFinder.setProjectDirectory(m_project->projectDirectory());
|
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));
|
m_fileFinder.setProjectFiles(m_project->files(Project::AllFiles));
|
||||||
handleOpenedDocs();
|
handleOpenedDocs();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user