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

@@ -45,26 +45,27 @@ public:
DiffEditorReloader(QObject *parent = 0);
~DiffEditorReloader();
DiffEditorController *diffEditorController() const;
void setDiffEditorController(DiffEditorController *controller);
bool isReloading() const;
public slots:
void requestReload();
protected:
// reloadFinished() should be called
// inside reload() (for synchronous reload)
// or later (for asynchronous reload)
virtual void reload() = 0;
DiffEditorController *diffEditorController() const;
void setDiffEditorController(DiffEditorController *diffEditorController);
protected slots:
void reloadFinished();
private slots:
void requestReload();
private:
DiffEditorController *m_controller;
bool m_reloading;
friend class DiffEditorController;
};
} // namespace DiffEditor