diff options
author | Friedemann Kleint <[email protected]> | 2009-01-12 17:44:04 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2009-01-12 17:44:04 +0100 |
commit | 17daca603ab2e16e47da8d0d395dc20d2ad0ce27 (patch) | |
tree | 63eaf2ad0d4bf8b788b111b47e2430f76730d81a /src/plugins/git/commitdata.h | |
parent | 349c055d470d991244bcef8ec1b4c3cfc2359666 (diff) |
Fixes: Use a model for the submit file list (to resolve the git diff mess)
Diffstat (limited to 'src/plugins/git/commitdata.h')
-rw-r--r-- | src/plugins/git/commitdata.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/git/commitdata.h b/src/plugins/git/commitdata.h index a1dc05ef425..6cb5ddb42b9 100644 --- a/src/plugins/git/commitdata.h +++ b/src/plugins/git/commitdata.h @@ -35,6 +35,7 @@ #define COMMITDATA_H #include <QtCore/QStringList> +#include <QtCore/QPair> QT_BEGIN_NAMESPACE class QDebug; @@ -68,11 +69,24 @@ QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &); struct CommitData { + // A pair of state string/file name ('modified', 'file.cpp'). + typedef QPair<QString, QString> StateFilePair; + void clear(); + // Parse the files and the branch of panelInfo + // from a git status output + bool parseFilesFromStatus(const QString &output); + + // Convenience to retrieve the file names from + // the specification list. Optionally filter for a certain state + QStringList stagedFileNames(const QString &stateFilter = QString()) const; + QStringList unstagedFileNames(const QString &stateFilter = QString()) const; + GitSubmitEditorPanelInfo panelInfo; GitSubmitEditorPanelData panelData; - QStringList stagedFiles; - QStringList unstagedFiles; + + QList<StateFilePair> stagedFiles; + QList<StateFilePair> unstagedFiles; QStringList untrackedFiles; }; |