Bug 442459 - Network devices (Samba shares) loose their type when being removed
Summary: Network devices (Samba shares) loose their type when being removed
Status: REPORTED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.85.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-15 04:30 UTC by Alexander Reinholdt
Modified: 2021-09-16 17:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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