D8005: static_cast QPlatformSurfaceEvent instead of dynamic_cast

Aleix Pol Gonzalez noreply at phabricator.kde.org
Wed Sep 27 13:04:56 UTC 2017


apol requested changes to this revision.
apol added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> view.cpp:225
>      if (event->type() == QEvent::PlatformSurface) {
> -        if (auto e = dynamic_cast<QPlatformSurfaceEvent*>(event)) {
> +        if (auto e = static_cast<QPlatformSurfaceEvent*>(event)) {
>              setState = e->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated;

Then the if should be removed.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D8005

To: broulik, #plasma, apol
Cc: apol, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170927/d61382d5/attachment.html>


More information about the Plasma-devel mailing list