tests: Remove another usage of deprecated asQWidget()
This commit is contained in:
@@ -304,3 +304,8 @@ DropArea *ViewWrapper_qtwidgets::asDropArea() const
|
||||
{
|
||||
return qobject_cast<DropArea *>(m_widget);
|
||||
}
|
||||
|
||||
QWidget *ViewWrapper_qtwidgets::widget() const
|
||||
{
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
|
||||
DropArea *asDropArea() const override;
|
||||
|
||||
QWidget *widget() const;
|
||||
|
||||
private:
|
||||
QPointer<QWidget> m_widget;
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "controllers/DockWidget.h"
|
||||
#include "controllers/MainWindow.h"
|
||||
#include "qtwidgets/views/MainWindow_qtwidgets.h"
|
||||
#include "qtwidgets/views/ViewWrapper_qtwidgets.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
@@ -929,7 +930,8 @@ void TestQtWidgets::tst_negativeAnchorPositionWhenEmbedded()
|
||||
|
||||
layout->checkSanity();
|
||||
|
||||
delete m->window()->asQWidget();
|
||||
auto wrapper = static_cast<Views::ViewWrapper_qtwidgets *>(m->window().get());
|
||||
delete wrapper->widget();
|
||||
}
|
||||
|
||||
void TestQtWidgets::tst_restoreResizesLayout()
|
||||
|
||||
Reference in New Issue
Block a user