only add devices to the smb mount model that are network shares
ClosedPublic

Authored by sitter on Mar 25 2020, 11:15 AM.

Details

Summary

previously we'd add all devices which would then cause a crash when
trying to access them ->as<NetworkShare>() because they aren't

Test Plan

have kcm open, plug in usb stick, observe no crash

Diff Detail

Repository
R102 KInfoCenter
Branch
smb-type-check2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24206
Build 24224: arc lint + arc unit
sitter created this revision.Mar 25 2020, 11:15 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 25 2020, 11:15 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Mar 25 2020, 11:15 AM
broulik accepted this revision.Mar 25 2020, 11:19 AM
broulik added a subscriber: broulik.

This is because the device monitor emits all devices, not the query returning unwanted devices?

This revision is now accepted and ready to land.Mar 25 2020, 11:19 AM

This is because the device monitor emits all devices, not the query returning unwanted devices?

Yep

connect(Solid::DeviceNotifier::instance(), &Solid::DeviceNotifier::deviceAdded,
        this, &SmbMountModel::addDevice);
ngraham accepted this revision.Mar 25 2020, 4:07 PM
This revision was automatically updated to reflect the committed changes.