diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp index 9e55ffb1964..f244f233138 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.cpp +++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp @@ -260,15 +260,6 @@ QString QbsFileNode::displayName() const return ProjectExplorer::FileNode::displayName() + QLatin1Char(':') + QString::number(l); } -bool QbsFileNode::update(const qbs::CodeLocation &loc) -{ - const QString oldPath = path(); - const int oldLine = line(); - - setPathAndLine(loc.fileName(), loc.line()); - return (line() != oldLine || path() != oldPath); -} - // --------------------------------------------------------------------------- // QbsBaseProjectNode: // --------------------------------------------------------------------------- @@ -437,8 +428,8 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData *grp, const QString & if (idx) break; } - if (idx->update(grp->location()) || updateExisting) - idx->emitNodeUpdated(); + QTC_ASSERT(idx, return); + idx->setPathAndLine(grp->location().fileName(), grp->location().line()); setupFiles(this, grp->allFilePaths(), productPath, updateExisting); @@ -639,8 +630,8 @@ void QbsProductNode::setQbsProductData(const qbs::ProductData prd) if (idx) break; } - if (idx->update(prd.location()) || updateExisting) - idx->emitNodeUpdated(); + QTC_ASSERT(idx, return); + idx->setPathAndLine(prd.location().fileName(), prd.location().line()); QList toAdd; QList toRemove = subProjectNodes(); diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h index f4d73e8d3d2..bc3bc569625 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.h +++ b/src/plugins/qbsprojectmanager/qbsnodes.h @@ -55,8 +55,6 @@ public: int line); QString displayName() const; - - bool update(const qbs::CodeLocation &loc); }; // ---------------------------------------------------------------------------