forked from qt-creator/qt-creator
ClassView: Fix a possible crash on session switch
Don't call SessionManager methods in non-main thread. It's not safe to call SessionManger::projects() or any method of Project class in a non-main thread, as in meantime the Project object may get deleted or the Project object may change in main thread in a not thread-safe way. Instead, prepare the data needed for the parser's thread before, when scheduling a call in a main thread, and pass this data in a safe way. This fixes possible crash in class view, e.g. on session switch. Task-number: QTCREATORBUG-25317 Fixes: QTCREATORBUG-25312 Change-Id: I114aae788aec649d1de3b3d3afdd049ed1e9b2c6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -60,7 +60,6 @@ signals:
|
||||
void treeDataUpdate(QSharedPointer<QStandardItem> result);
|
||||
|
||||
private:
|
||||
void onProjectListChanged();
|
||||
void initialize();
|
||||
|
||||
inline bool state() const;
|
||||
|
||||
Reference in New Issue
Block a user