DiffEditor: Simplify makePatch

Store indices in controller and avoid passing them around.

Change-Id: I49c80cb6cf6734a18f80ad5c7c441973d246708f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
This commit is contained in:
Orgad Shaneh
2014-07-28 23:25:49 +03:00
committed by Orgad Shaneh
parent b01a6a4663
commit 20b836f59c
8 changed files with 51 additions and 89 deletions

View File

@@ -55,7 +55,7 @@ public:
int contextLinesNumber() const;
bool isIgnoreWhitespace() const;
QString makePatch(int diffFileIndex, int chunkIndex, bool revert) const;
QString makePatch(bool revert, bool addPrefix = false) const;
DiffEditorReloader *reloader() const;
void setReloader(DiffEditorReloader *reloader);
@@ -86,9 +86,7 @@ signals:
void descriptionEnablementChanged(bool on);
void contextLinesNumberChanged(int lines);
void ignoreWhitespaceChanged(bool ignore);
void chunkActionsRequested(QMenu *menu,
int diffFileIndex,
int chunkIndex);
void chunkActionsRequested(QMenu *menu, bool isValid);
void saveStateRequested();
void restoreStateRequested();
void expandBranchesRequested(const QString &revision);
@@ -99,6 +97,8 @@ private:
QString m_clearMessage;
QList<FileData> m_diffFiles;
int m_diffFileIndex;
int m_chunkIndex;
QString m_workingDirectory;
QString m_description;
bool m_descriptionEnabled;