Qbs: Display line numbers for virtual files

Display line numbers as part of the displayName of nodes in the
Projects view. These are shown for the virtual files we use to
enable navigation to Qbs groups and products and it more clear
that these are actually locations in the build system and not
real files.

Change-Id: If32354ad5ceb79c865cae2951fe470c51718728f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Tobias Hunger
2013-06-05 15:50:24 +02:00
committed by Eike Ziller
parent 3bf7650d1f
commit 834a2687da
2 changed files with 7 additions and 0 deletions

View File

@@ -230,6 +230,11 @@ void QbsFileNode::setLine(int l)
m_line = l;
}
QString QbsFileNode::displayName() const
{
return ProjectExplorer::FileNode::displayName() + QLatin1Char(':') + QString::number(m_line);
}
bool QbsFileNode::update(const qbs::CodeLocation &loc)
{
const QString oldPath = path();