forked from qt-creator/qt-creator
ClassView: Delete Parser object from inside parser's thread
The Parser object is being moved to parser's thread inside Manager constructor. However, when destructor of Manager is being called, we delete the Parser from inside the main thread. According to QThread documentation we should delete object (which have been moved to another thread) from inside the object's current thread. So in case of Parser, we should delete it from the parser's thread. In order to fix it, we create Parser object dynamically and connect finished signal of the parser's thread to the parser's deleteLater(). Since now the parser is being deleted in parser's thread we don't need a special handling for stopping the timer object inside the parser's thread, as its destructor will also be called from inside parser's thread. Task-number: QTCREATORBUG-25317 Change-Id: I28dee2c3db5cf8329a9578e7a85952e8a85850d3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -57,7 +57,6 @@ public:
|
||||
void resetDataToCurrentState();
|
||||
void parseDocument(const CPlusPlus::Document::Ptr &doc);
|
||||
void setFlatMode(bool flat);
|
||||
void aboutToShutdown();
|
||||
|
||||
signals:
|
||||
void treeRegenerated(const ParserTreeItem::ConstPtr &root);
|
||||
|
||||
Reference in New Issue
Block a user