forked from qt-creator/qt-creator
DiffEditor: Fix editor actions
The text editor widgets all need a TextEditorActionHandler that takes care of the editor actions for them. Each text editor needs its own context, so the editor with focus receives the actions. This does not happen automatically for these text editors, since the diff editor manages these itself. Task-number: QTCREATORBUG-9445 Change-Id: Ib42f095ec23550e401e8ee9b36f3f49517a22877 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -30,7 +30,12 @@
|
||||
#include <QWidget>
|
||||
#include <QTextCharFormat>
|
||||
|
||||
namespace TextEditor { class FontSettings; }
|
||||
namespace Core { class IContext; }
|
||||
|
||||
namespace TextEditor {
|
||||
class FontSettings;
|
||||
class TextEditorWidget;
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QMenu;
|
||||
@@ -52,6 +57,10 @@ class SideBySideDiffEditorWidget : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SideBySideDiffEditorWidget(QWidget *parent = 0);
|
||||
~SideBySideDiffEditorWidget();
|
||||
|
||||
TextEditor::TextEditorWidget *leftEditorWidget() const;
|
||||
TextEditor::TextEditorWidget *rightEditorWidget() const;
|
||||
|
||||
void setDocument(DiffEditorDocument *document);
|
||||
DiffEditorDocument *diffDocument() const;
|
||||
@@ -98,6 +107,8 @@ private:
|
||||
bool m_horizontalSync = false;
|
||||
|
||||
QTextCharFormat m_spanLineFormat;
|
||||
Core::IContext *m_leftContext;
|
||||
Core::IContext *m_rightContext;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user