forked from qt-creator/qt-creator
VcsBase: show icons for the files in the submit editor
Change-Id: I0c7704a20a4b9a2ceef814f78d5d52297b8cc4f6 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
920ed1140e
commit
a63fa620b8
@@ -33,7 +33,10 @@
|
||||
#include "submitfilemodel.h"
|
||||
#include "vcsbaseconstants.h"
|
||||
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
|
||||
#include <QtGui/QStandardItem>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
namespace VCSBase {
|
||||
@@ -52,6 +55,7 @@ static QList<QStandardItem *> createFileRow(const QString &fileName, const QStri
|
||||
statusItem->setData(v);
|
||||
QStandardItem *fileItem = new QStandardItem(fileName);
|
||||
fileItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled);
|
||||
fileItem->setIcon(Core::FileIconProvider::instance()->icon(QFileInfo(fileName)));
|
||||
QList<QStandardItem *> row;
|
||||
row << statusItem << fileItem;
|
||||
return row;
|
||||
@@ -154,4 +158,5 @@ unsigned SubmitFileModel::filter(const QStringList &filter, int column)
|
||||
qDebug() << Q_FUNC_INFO << " deleted " << rc << " items using " << filter << " , remaining " << rowCount();
|
||||
return rc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user