mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-22 11:53:43 +00:00
QObject::connect Error
This commit is contained in:
@@ -1124,9 +1124,12 @@ void GRenderWindow::OnEmulationStopping() {
|
|||||||
void GRenderWindow::showEvent(QShowEvent* event) {
|
void GRenderWindow::showEvent(QShowEvent* event) {
|
||||||
QWidget::showEvent(event);
|
QWidget::showEvent(event);
|
||||||
|
|
||||||
// windowHandle() is not initialized until the Window is shown, so we connect it here.
|
// windowHandle() is not guaranteed to be initialized until after the window is shown.
|
||||||
connect(windowHandle(), &QWindow::screenChanged, this, &GRenderWindow::OnFramebufferSizeChanged,
|
// We connect here, but check for null to prevent a non-fatal error message on some platforms.
|
||||||
Qt::UniqueConnection);
|
if (windowHandle()) {
|
||||||
|
connect(windowHandle(), &QWindow::screenChanged, this, &GRenderWindow::OnFramebufferSizeChanged,
|
||||||
|
Qt::UniqueConnection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GRenderWindow::eventFilter(QObject* object, QEvent* event) {
|
bool GRenderWindow::eventFilter(QObject* object, QEvent* event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user