mirror of https://github.com/mgba-emu/mgba.git
Qt: Clean up some FrameView technical debt
This commit is contained in:
parent
3565c12d8c
commit
939c8f0487
|
@ -1754,14 +1754,7 @@ void Window::setupMenu(QMenuBar* menubar) {
|
|||
addGameAction(tr("&Frame inspector..."), "frameWindow", [this]() {
|
||||
if (!m_frameView) {
|
||||
m_frameView = new FrameView(m_controller);
|
||||
connect(this, &Window::shutdown, this, [this]() {
|
||||
if (m_frameView) {
|
||||
m_frameView->close();
|
||||
}
|
||||
});
|
||||
connect(m_frameView, &QObject::destroyed, this, [this]() {
|
||||
m_frameView = nullptr;
|
||||
});
|
||||
connect(this, &Window::shutdown, m_frameView, &QWidget::close);
|
||||
m_frameView->setAttribute(Qt::WA_DeleteOnClose);
|
||||
}
|
||||
m_frameView->show();
|
||||
|
|
|
@ -244,7 +244,7 @@ private:
|
|||
std::unique_ptr<OverrideView> m_overrideView;
|
||||
std::unique_ptr<SensorView> m_sensorView;
|
||||
std::unique_ptr<DolphinConnector> m_dolphinView;
|
||||
FrameView* m_frameView = nullptr;
|
||||
QPointer<FrameView> m_frameView;
|
||||
|
||||
#ifdef USE_FFMPEG
|
||||
std::unique_ptr<VideoView> m_videoView;
|
||||
|
|
Loading…
Reference in New Issue