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:
@@ -28,6 +28,8 @@
|
||||
#include "selectabletexteditorwidget.h"
|
||||
#include "diffeditorwidgetcontroller.h"
|
||||
|
||||
namespace Core { class IContext; }
|
||||
|
||||
namespace TextEditor {
|
||||
class DisplaySettings;
|
||||
class FontSettings;
|
||||
@@ -52,6 +54,7 @@ class UnifiedDiffEditorWidget : public SelectableTextEditorWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
UnifiedDiffEditorWidget(QWidget *parent = 0);
|
||||
~UnifiedDiffEditorWidget();
|
||||
|
||||
void setDocument(DiffEditorDocument *document);
|
||||
DiffEditorDocument *diffDocument() const;
|
||||
@@ -114,6 +117,7 @@ private:
|
||||
QMap<int, QPair<int, int> > m_chunkInfo;
|
||||
|
||||
QByteArray m_state;
|
||||
Core::IContext *m_context;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user