@@ -70,7 +70,7 @@ ManagedDisplayWidget::ManagedDisplayWidget(QWidget *parent) :
|
||||
|
||||
ManagedDisplayWidget::~ManagedDisplayWidget()
|
||||
{
|
||||
OnDestroy();
|
||||
MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR_INNER;
|
||||
|
||||
if (RenderManager::instance()->backend() == RenderManager::kOpenGL) {
|
||||
disconnect(static_cast<ManagedDisplayWidgetOpenGL*>(inner_widget_),
|
||||
|
||||
@@ -82,6 +82,11 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
#define MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR_INNER \
|
||||
makeCurrent();OnDestroy();doneCurrent()
|
||||
#define MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR(x) \
|
||||
virtual ~x() override{MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR_INNER;}
|
||||
|
||||
class ManagedDisplayWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user