forked from qt-creator/qt-creator
Qbs: Simplify code a bit
Change-Id: Ie61f71f143ac1b46e092167abb9b58a1d16c36c6 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -260,15 +260,6 @@ QString QbsFileNode::displayName() const
|
|||||||
return ProjectExplorer::FileNode::displayName() + QLatin1Char(':') + QString::number(l);
|
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:
|
// QbsBaseProjectNode:
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -437,8 +428,8 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData *grp, const QString &
|
|||||||
if (idx)
|
if (idx)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (idx->update(grp->location()) || updateExisting)
|
QTC_ASSERT(idx, return);
|
||||||
idx->emitNodeUpdated();
|
idx->setPathAndLine(grp->location().fileName(), grp->location().line());
|
||||||
|
|
||||||
setupFiles(this, grp->allFilePaths(), productPath, updateExisting);
|
setupFiles(this, grp->allFilePaths(), productPath, updateExisting);
|
||||||
|
|
||||||
@@ -639,8 +630,8 @@ void QbsProductNode::setQbsProductData(const qbs::ProductData prd)
|
|||||||
if (idx)
|
if (idx)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (idx->update(prd.location()) || updateExisting)
|
QTC_ASSERT(idx, return);
|
||||||
idx->emitNodeUpdated();
|
idx->setPathAndLine(prd.location().fileName(), prd.location().line());
|
||||||
|
|
||||||
QList<ProjectExplorer::ProjectNode *> toAdd;
|
QList<ProjectExplorer::ProjectNode *> toAdd;
|
||||||
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
|
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
|
||||||
|
@@ -55,8 +55,6 @@ public:
|
|||||||
int line);
|
int line);
|
||||||
|
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
|
|
||||||
bool update(const qbs::CodeLocation &loc);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user