Commit aebc90ec authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Simplify code a bit

Change-Id: Ie61f71f143ac1b46e092167abb9b58a1d16c36c6
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent fc36ce7d
......@@ -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<ProjectExplorer::ProjectNode *> toAdd;
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
......
......@@ -55,8 +55,6 @@ public:
int line);
QString displayName() const;
bool update(const qbs::CodeLocation &loc);
};
// ---------------------------------------------------------------------------
......
Markdown is supported
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