Fix crashing devicetest
ClosedPublic

Authored by nicolasfella on Jun 20 2018, 12:25 PM.

Details

Summary

When running the test m_impl will be nullptr leading to a crash. This is because when running as a test no platform is loaded.
The fancy way to solve this would be to have a TestImpl, but I think this is enough.

Test Plan

Test passes now

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Jun 20 2018, 12:25 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptJun 20 2018, 12:25 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
nicolasfella requested review of this revision.Jun 20 2018, 12:25 PM
nicolasfella edited the test plan for this revision. (Show Details)Jun 20 2018, 12:39 PM
nicolasfella edited the test plan for this revision. (Show Details)
  • Make test pass
  • Make test pass

The device might be trusted from a previous test run

  • Whitespace
nicolasfella edited the test plan for this revision. (Show Details)Jun 20 2018, 1:26 PM
apol accepted this revision.Jul 12 2018, 2:09 PM
This revision is now accepted and ready to land.Jul 12 2018, 2:09 PM
apol added inline comments.Jul 12 2018, 2:10 PM
plugins/mousepad/mousepadplugin.cpp
85–87

in which cases m_impl is null?

nicolasfella added inline comments.Jul 12 2018, 2:14 PM
plugins/mousepad/mousepadplugin.cpp
85–87

For tests neither HAVE_X11, HAVE_WAYLAND or HAVE_WINDOWS is true

This revision was automatically updated to reflect the committed changes.