Hide reload button for diff editor when there is no reloader

Refactor code a bit. Now DiffEditorController has a pointer
to DiffEditorReloader.

Change-Id: I224579127f112923bc665cd59717b0c4d833981b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
jkobus
2014-07-04 13:55:51 +02:00
committed by Jarek Kobus
parent cb7963bc18
commit 91e4271069
8 changed files with 82 additions and 40 deletions

View File

@@ -37,6 +37,8 @@
namespace DiffEditor {
class DiffEditorReloader;
class DIFFEDITOR_EXPORT DiffEditorController : public QObject
{
Q_OBJECT
@@ -55,6 +57,9 @@ public:
QString makePatch(int diffFileIndex, int chunkIndex, bool revert) const;
DiffEditorReloader *reloader() const;
void setReloader(DiffEditorReloader *reloader);
public slots:
void clear();
void clear(const QString &message);
@@ -79,11 +84,11 @@ signals:
void descriptionEnablementChanged(bool on);
void contextLinesNumberChanged(int lines);
void ignoreWhitespaceChanged(bool ignore);
void reloadRequested();
void chunkActionsRequested(QMenu *menu,
int diffFileIndex,
int chunkIndex);
void expandBranchesRequested(const QString &revision);
void reloaderChanged(DiffEditorReloader *reloader);
private:
QString prepareBranchesForCommit(const QString &output);
@@ -95,6 +100,7 @@ private:
bool m_descriptionEnabled;
int m_contextLinesNumber;
bool m_ignoreWhitespace;
DiffEditorReloader *m_reloader;
};
} // namespace DiffEditor