Fixes: Make git diff work for staged files, do not launch submit if file list empty, make file model read only, add conveniences

Details: Add a type data field to the git file model
This commit is contained in:
Friedemann Kleint
2009-01-13 10:06:06 +01:00
parent 278ff78040
commit 4741a7282d
14 changed files with 171 additions and 32 deletions

View File

@@ -49,9 +49,16 @@ class VCSBASE_EXPORT SubmitFileModel : public QStandardItemModel
public:
explicit SubmitFileModel(QObject *parent = 0);
// Convenience to add a file plus status text.
// Convenience to create and add rows containing a file plus status text.
static QList<QStandardItem *> createFileRow(const QString &fileName, const QString &status = QString(), bool checked = true);
QList<QStandardItem *> addFile(const QString &fileName, const QString &status = QString(), bool checked = true);
// Find convenience that returns the whole row (as opposed to QStandardItemModel::find).
QList<QStandardItem *> findRow(const QString &text, int column = 0) const;
// Convenience to obtain a row
QList<QStandardItem *> rowAt(int row) const;
// Filter for entries contained in the filter list. Returns the
// number of deleted entries.
unsigned filter(const QStringList &filter, int column);