From 17daca603ab2e16e47da8d0d395dc20d2ad0ce27 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 12 Jan 2009 17:44:04 +0100 Subject: Fixes: Use a model for the submit file list (to resolve the git diff mess) --- src/plugins/git/commitdata.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/plugins/git/commitdata.h') diff --git a/src/plugins/git/commitdata.h b/src/plugins/git/commitdata.h index a1dc05ef42..6cb5ddb42b 100644 --- a/src/plugins/git/commitdata.h +++ b/src/plugins/git/commitdata.h @@ -35,6 +35,7 @@ #define COMMITDATA_H #include +#include 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 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 stagedFiles; + QList unstagedFiles; QStringList untrackedFiles; }; -- cgit v1.2.1