forked from qt-creator/qt-creator
Add DiffEditorManager, refactoring.
GitDiffSwitcher operates now on IDocument. GitDiffHandler operates now on DiffEditorController. "source" property now attached to editor's document (VcsBasePlugin). Change-Id: Ie2570a597b8b992ac1dc33b9179eca459c8a751a Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
This commit is contained in:
@@ -45,9 +45,9 @@ QT_END_NAMESPACE
|
||||
namespace TextEditor { class BaseTextEditorWidget; }
|
||||
|
||||
namespace DiffEditor {
|
||||
class SideBySideDiffEditorWidget;
|
||||
|
||||
namespace Internal { class DiffEditorDocument; }
|
||||
class DiffEditorDocument;
|
||||
class SideBySideDiffEditorWidget;
|
||||
|
||||
class DIFFEDITOR_EXPORT DiffEditor : public Core::IEditor
|
||||
{
|
||||
@@ -58,11 +58,7 @@ public:
|
||||
virtual ~DiffEditor();
|
||||
|
||||
public:
|
||||
void setDiff(const QList<DiffEditorController::DiffFilesContents> &diffFileList,
|
||||
const QString &workingDirectory = QString());
|
||||
void setDescription(const QString &description);
|
||||
void setDescriptionEnabled(bool on);
|
||||
void clear(const QString &message);
|
||||
DiffEditorController *controller() const;
|
||||
|
||||
// Core::IEditor
|
||||
bool duplicateSupported() const { return false; }
|
||||
@@ -71,7 +67,6 @@ public:
|
||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||
Core::IDocument *document();
|
||||
Core::Id id() const;
|
||||
QTextCodec *codec() const;
|
||||
|
||||
QWidget *toolBar();
|
||||
|
||||
@@ -79,6 +74,9 @@ public slots:
|
||||
void activateEntry(int index);
|
||||
|
||||
private slots:
|
||||
void slotCleared(const QString &message);
|
||||
void slotDiffContentsChanged(const QList<DiffEditorController::DiffFilesContents> &diffFileList,
|
||||
const QString &workingDirectory);
|
||||
void entryActivated(int index);
|
||||
void slotDescriptionChanged(const QString &description);
|
||||
void slotDescriptionVisibilityChanged();
|
||||
@@ -87,7 +85,7 @@ private:
|
||||
void ctor();
|
||||
void updateEntryToolTip();
|
||||
|
||||
QSharedPointer<Internal::DiffEditorDocument> m_document;
|
||||
QSharedPointer<DiffEditorDocument> m_document;
|
||||
TextEditor::BaseTextEditorWidget *m_descriptionWidget;
|
||||
SideBySideDiffEditorWidget *m_diffWidget;
|
||||
DiffEditorController *m_diffEditorController;
|
||||
|
||||
Reference in New Issue
Block a user