Commit 48108cd3 authored by Nicolas Fella's avatar Nicolas Fella

Fix crashing devicetest

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

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision:
parent f0944081
......@@ -82,7 +82,9 @@ bool MousepadPlugin::receivePacket(const NetworkPacket& np)
void MousepadPlugin::connected() {
np.set<bool>(QStringLiteral("state"), m_impl->hasKeyboardSupport());
if (m_impl) {
np.set<bool>(QStringLiteral("state"), m_impl->hasKeyboardSupport());
......@@ -94,6 +94,9 @@ void DeviceTest::testPairedDevice()
void DeviceTest::testUnpairedDevice()
KdeConnectConfig* kcc = KdeConnectConfig::instance();
LanLinkProvider linkProvider;
QSslSocket socket;
LanDeviceLink* link = new LanDeviceLink(deviceId, &linkProvider, &socket, LanDeviceLink::Locally);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment