forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user