Bug 442459

Summary: Network devices (Samba shares) loose their type when being removed
Product: [Frameworks and Libraries] frameworks-solid Reporter: Alexander Reinholdt <alexander.reinholdt>
Component: generalAssignee: Lukáš Tinkl <lukas>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs-null, nate, sitter
Priority: NOR    
Version First Reported In: 5.85.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alexander Reinholdt 2021-09-15 04:30:58 UTC
SUMMARY

When Samba shares are unmounted (removed), Solid::Device::isDeviceInterface() won't return Solid::DeviceInterface::NetworkShare as type.

STEPS TO REPRODUCE
1. Connect a slot to the signal deviceAdded() and deviceRemoved() of Solid::DeviceNotifier::instance(), respectively.

2. Implement the following code in both slots:

    Solid::Device device(udi);

    if (device.isDeviceInterface(Solid::DeviceInterface::NetworkShare)) {
        qDebug() << "Success";
    } else {
        qDebug() << "Failure";
    }

3. Run the application.

OBSERVED RESULT

When mounting a Samba share, the output will be "Success". When unmounting that share afterwards, the output will always be "Failure".

EXPECTED RESULT

On both occasions "Success" is returned.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.13-1-MANJARO (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION