Commit 834a2687 authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

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: default avatarEike Ziller <eike.ziller@digia.com>
parent 3bf7650d
......@@ -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();
......
......@@ -59,6 +59,8 @@ public:
void setLine(int l);
QString displayName() const;
bool update(const qbs::CodeLocation &loc);
private:
......
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