forked from qt-creator/qt-creator
BinEditor: Drop the widget() from the EditorInterface
It's accessible via editor(), which we now have also for the detached memory views. Change-Id: Ibce6a0e3b753b3beb5c5a8eac67b11b352dcc250 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2220,10 +2220,7 @@ public:
|
||||
codecChooser->setAssignedCodec(QTextCodec::codecForName(setting.toByteArray()));
|
||||
}
|
||||
|
||||
~BinEditorImpl() final
|
||||
{
|
||||
delete m_widget;
|
||||
}
|
||||
~BinEditorImpl() final { delete m_widget; }
|
||||
|
||||
IDocument *document() const final { return m_document.get(); }
|
||||
|
||||
@@ -2238,8 +2235,7 @@ public:
|
||||
}
|
||||
|
||||
// Service interface
|
||||
QWidget *widget() { return m_widget; }
|
||||
Core::IEditor *editor() { return this; }
|
||||
IEditor *editor() { return this; }
|
||||
|
||||
// "Slots"
|
||||
void setSizes(quint64 address, qint64 range, int blockSize)
|
||||
|
@@ -20,7 +20,6 @@ class EditorService
|
||||
public:
|
||||
virtual ~EditorService() = default;
|
||||
|
||||
virtual QWidget *widget() = 0;
|
||||
virtual Core::IEditor *editor() = 0;
|
||||
|
||||
// "Slots"
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->addWidget(service->widget());
|
||||
layout->addWidget(service->editor()->widget());
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
setMinimumWidth(400);
|
||||
resize(800, 200);
|
||||
|
Reference in New Issue
Block a user