Commit 84e8a79c authored by Daniel Teske's avatar Daniel Teske
Browse files

ProjectNodes: Move vcsTopic to where it belongs



It's a nonsensical operation on anything but ProjectNodes

Change-Id: Id02682e6dde99c5a08362dac0f6286282cfc15b6
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 67f793ca
......@@ -265,9 +265,10 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole: {
QString name = node->displayName();
if (node->parentFolderNode()
if (node->nodeType() == ProjectNodeType
&& node->parentFolderNode()
&& node->parentFolderNode()->nodeType() == SessionNodeType) {
const QString vcsTopic = node->vcsTopic();
const QString vcsTopic = static_cast<ProjectNode *>(node)->vcsTopic();
if (!vcsTopic.isEmpty())
name += QLatin1String(" [") + vcsTopic + QLatin1Char(']');
......
......@@ -145,11 +145,6 @@ QString Node::displayName() const
return QFileInfo(path()).fileName();
}
QString Node::vcsTopic() const
{
return QString();
}
QString Node::tooltip() const
{
return QDir::toNativeSeparators(path());
......
......@@ -85,7 +85,6 @@ public:
QString path() const; // file system path
virtual int line() const;
virtual QString displayName() const;
virtual QString vcsTopic() const;
virtual QString tooltip() const;
virtual bool isEnabled() const;
......
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