forked from qt-creator/qt-creator
ProjectNodes: Move vcsTopic to where it belongs
It's a nonsensical operation on anything but ProjectNodes Change-Id: Id02682e6dde99c5a08362dac0f6286282cfc15b6 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -265,9 +265,10 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole: {
|
case Qt::DisplayRole: {
|
||||||
QString name = node->displayName();
|
QString name = node->displayName();
|
||||||
|
|
||||||
if (node->parentFolderNode()
|
if (node->nodeType() == ProjectNodeType
|
||||||
|
&& node->parentFolderNode()
|
||||||
&& node->parentFolderNode()->nodeType() == SessionNodeType) {
|
&& node->parentFolderNode()->nodeType() == SessionNodeType) {
|
||||||
const QString vcsTopic = node->vcsTopic();
|
const QString vcsTopic = static_cast<ProjectNode *>(node)->vcsTopic();
|
||||||
|
|
||||||
if (!vcsTopic.isEmpty())
|
if (!vcsTopic.isEmpty())
|
||||||
name += QLatin1String(" [") + vcsTopic + QLatin1Char(']');
|
name += QLatin1String(" [") + vcsTopic + QLatin1Char(']');
|
||||||
|
|||||||
@@ -145,11 +145,6 @@ QString Node::displayName() const
|
|||||||
return QFileInfo(path()).fileName();
|
return QFileInfo(path()).fileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Node::vcsTopic() const
|
|
||||||
{
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Node::tooltip() const
|
QString Node::tooltip() const
|
||||||
{
|
{
|
||||||
return QDir::toNativeSeparators(path());
|
return QDir::toNativeSeparators(path());
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ public:
|
|||||||
QString path() const; // file system path
|
QString path() const; // file system path
|
||||||
virtual int line() const;
|
virtual int line() const;
|
||||||
virtual QString displayName() const;
|
virtual QString displayName() const;
|
||||||
virtual QString vcsTopic() const;
|
|
||||||
virtual QString tooltip() const;
|
virtual QString tooltip() const;
|
||||||
virtual bool isEnabled() const;
|
virtual bool isEnabled() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user