Wizards: Do not crash when adding files to existing project

Do not crash when adding a file to an existing project that finishes
parsing while the wizard is still open.

Make sure the Node that is passed into the wizard is still valid after
parsing. Provide more information to the wizard so that this can be
checked -- and to find the similar node in the new project tree.

Also avoid a crash when adding existing files.

Do not crash when project parsing finishes while the wizard
summary page is open.

Do not crash when the project gets closed while the summary page
is open.

Do not have the ProjectTree send signals about subTreeChanges if
the node that changed is not part of the ProjectTree. This avoids
an infinite loop when updating the combobox on the summary page.

Add a treeChanged signal to ProjectTree.

Task-number: QTCREATORBUG-18651
Change-Id: Iaed3d0d1f079c09e54389821a11bda596139f35c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-08-29 14:32:10 +02:00
parent 1bcde48da9
commit 60b8712a42
8 changed files with 99 additions and 13 deletions

View File

@@ -33,6 +33,7 @@
namespace ProjectExplorer {
class FolderNode;
class Node;
// Documentation inside.
class JsonSummaryPage : public Internal::ProjectWizardPage
@@ -52,6 +53,7 @@ public:
void summarySettingsHaveChanged();
private:
Node *findWizardContextNode(Node *contextNode) const;
void updateFileList();
void updateProjectData(FolderNode *node);