Commit cc97609e authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ProjectTree: Remove "external file" warning when node is found

If a new file is added, it is connected to the updateExternalFileWarning
slot before the project tree is refreshed, and is not disconnected until
closing and re-opening it.

Task-number: QTCREATORBUG-17743
Change-Id: Icc7e3fe547a698d6f63116ca148cf1f4f8b60777
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent 0115cc31
......@@ -225,10 +225,16 @@ void ProjectTree::update(Node *node, Project *project)
if (!node && Core::EditorManager::currentDocument()) {
connect(Core::EditorManager::currentDocument(), &Core::IDocument::changed,
this, &ProjectTree::updateExternalFileWarning,
if (Core::IDocument *document = Core::EditorManager::currentDocument()) {
if (node) {
disconnect(document, &Core::IDocument::changed,
this, &ProjectTree::updateExternalFileWarning);
} else {
connect(document, &Core::IDocument::changed,
this, &ProjectTree::updateExternalFileWarning,
if (changedNode) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment