forked from qt-creator/qt-creator
DiffEditor: Share "failed" state among multiple views
Change-Id: Id049ce8eafcb21d5e60fae17c47df8657c0e5779 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -46,6 +46,12 @@ public:
|
||||
|
||||
DiffEditorController *controller() const;
|
||||
|
||||
enum State {
|
||||
LoadOK,
|
||||
Reloading,
|
||||
LoadFailed
|
||||
};
|
||||
|
||||
QString makePatch(int fileIndex, int chunkIndex,
|
||||
bool revert, bool addPrefix = false,
|
||||
const QString &overriddenFileName = QString()) const;
|
||||
@@ -76,7 +82,7 @@ public:
|
||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
||||
OpenResult open(QString *errorString, const QString &fileName,
|
||||
const QString &realFileName) override;
|
||||
bool isReloading() const { return m_isReloading; }
|
||||
State state() const { return m_state; }
|
||||
void beginReload();
|
||||
void endReload(bool success);
|
||||
|
||||
@@ -100,7 +106,7 @@ private:
|
||||
int m_contextLineCount;
|
||||
bool m_isContextLineCountForced;
|
||||
bool m_ignoreWhitespace;
|
||||
bool m_isReloading = false;
|
||||
State m_state = LoadOK;
|
||||
|
||||
friend class ::DiffEditor::DiffEditorController;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user