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

Authored by sitter on Wed, Mar 25, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Wed, Mar 25, 11:15 AM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Mar 25, 11:15 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Wed, Mar 25, 11:15 AM
broulik accepted this revision.Wed, Mar 25, 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.Wed, Mar 25, 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.Wed, Mar 25, 4:07 PM
This revision was automatically updated to reflect the committed changes.