Fix repeting Stage/Unstage actions in unified diff editor

Don't store diff file index, chunk index and diff editor
controller anymore. Pass needed indices by value,
retrieve them when needed as lambda copy.

Change-Id: I3a81f1ab6d131c0b1d9899ac4b061b6e25582f51
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jarek Kobus
2018-02-15 10:29:14 +01:00
parent 9494a9e0c0
commit 64233a4fae
10 changed files with 121 additions and 126 deletions

View File

@@ -329,12 +329,11 @@ public:
private:
void finishSubmoduleUpdate();
void slotChunkActionsRequested(QMenu *menu, bool isValid);
void slotStageChunk();
void slotUnstageChunk();
void chunkActionsRequested(QMenu *menu, int fileIndex, int chunkIndex);
void branchesForCommit(const QString &revision);
void stage(const QString &patch, bool revert);
void stage(DiffEditor::DiffEditorController *diffController,
const QString &patch, bool revert);
enum CodecType { CodecSource, CodecLogOutput, CodecNone };
QTextCodec *codecFor(CodecType codecType, const QString &source = QString()) const;
@@ -378,7 +377,6 @@ private:
QMap<QString, StashInfo> m_stashInfo;
QStringList m_updatedSubmodules;
bool m_disableEditor;
QPointer<DiffEditor::DiffEditorController> m_contextController;
QFutureSynchronizer<void> m_synchronizer; // for commit updates
};