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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user