diff options
author | jkobus <jaroslaw.kobus@digia.com> | 2014-07-04 13:55:51 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@digia.com> | 2014-07-07 10:34:11 +0200 |
commit | 91e42710697944375780708b2e8637b2f57608ac (patch) | |
tree | a01f7236821adde8c3d108e2a441fee056e98fdb /src/plugins/diffeditor/diffeditorcontroller.h | |
parent | cb7963bc18297251bd44480ca9392d16e20e17f8 (diff) |
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>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorcontroller.h')
-rw-r--r-- | src/plugins/diffeditor/diffeditorcontroller.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/diffeditor/diffeditorcontroller.h b/src/plugins/diffeditor/diffeditorcontroller.h index 82c150435f..8314e1bda2 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.h +++ b/src/plugins/diffeditor/diffeditorcontroller.h @@ -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 |