diff --git a/krunner/view.cpp b/krunner/view.cpp --- a/krunner/view.cpp +++ b/krunner/view.cpp @@ -222,7 +222,7 @@ const bool retval = Dialog::event(event); bool setState = event->type() == QEvent::Show; if (event->type() == QEvent::PlatformSurface) { - if (auto e = dynamic_cast(event)) { + if (auto e = static_cast(event)) { setState = e->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated; } } diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -224,7 +224,7 @@ bool KSMShutdownDlg::event(QEvent *e) { if (e->type() == QEvent::PlatformSurface) { - if (auto pe = dynamic_cast(e)) { + if (auto pe = static_cast(e)) { switch (pe->surfaceEventType()) { case QPlatformSurfaceEvent::SurfaceCreated: setupWaylandIntegration(); diff --git a/ksmserver/switchuserdialog.cpp b/ksmserver/switchuserdialog.cpp --- a/ksmserver/switchuserdialog.cpp +++ b/ksmserver/switchuserdialog.cpp @@ -130,7 +130,7 @@ bool KSMSwitchUserDialog::event(QEvent *e) { if (e->type() == QEvent::PlatformSurface) { - if (auto pe = dynamic_cast(e)) { + if (auto pe = static_cast(e)) { switch (pe->surfaceEventType()) { case QPlatformSurfaceEvent::SurfaceCreated: setupWaylandIntegration(); diff --git a/shell/desktopview.cpp b/shell/desktopview.cpp --- a/shell/desktopview.cpp +++ b/shell/desktopview.cpp @@ -198,7 +198,7 @@ bool DesktopView::event(QEvent *e) { if (e->type() == QEvent::PlatformSurface) { - if (auto pe = dynamic_cast(e)) { + if (auto pe = static_cast(e)) { switch (pe->surfaceEventType()) { case QPlatformSurfaceEvent::SurfaceCreated: setupWaylandIntegration(); diff --git a/shell/panelconfigview.cpp b/shell/panelconfigview.cpp --- a/shell/panelconfigview.cpp +++ b/shell/panelconfigview.cpp @@ -236,7 +236,7 @@ bool PanelConfigView::event(QEvent *e) { if (e->type() == QEvent::PlatformSurface) { - if (auto pe = dynamic_cast(e)) { + if (auto pe = static_cast(e)) { switch (pe->surfaceEventType()) { case QPlatformSurfaceEvent::SurfaceCreated: if (m_shellSurface) { diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -899,7 +899,7 @@ break; } case QEvent::PlatformSurface: - if (auto pe = dynamic_cast(e)) { + if (auto pe = static_cast(e)) { switch (pe->surfaceEventType()) { case QPlatformSurfaceEvent::SurfaceCreated: setupWaylandIntegration();