aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/diffeditor/diffeditorcontroller.h
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-07-28 23:25:49 +0300
committerOrgad Shaneh <orgads@gmail.com>2014-09-09 08:40:05 +0200
commit20b836f59cc7346be8ef821d397955c6455b0d12 (patch)
treec0253f34adc6083d69cc221248987fe502042880 /src/plugins/diffeditor/diffeditorcontroller.h
parentb01a6a4663489bf7f4fe0842a492e452204de564 (diff)
DiffEditor: Simplify makePatch
Store indices in controller and avoid passing them around. Change-Id: I49c80cb6cf6734a18f80ad5c7c441973d246708f Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorcontroller.h')
-rw-r--r--src/plugins/diffeditor/diffeditorcontroller.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/diffeditor/diffeditorcontroller.h b/src/plugins/diffeditor/diffeditorcontroller.h
index 4505d5f5b9..abf4cd53eb 100644
--- a/src/plugins/diffeditor/diffeditorcontroller.h
+++ b/src/plugins/diffeditor/diffeditorcontroller.h
@@ -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;