[Device Automounter] Load kded module only if enabled
ClosedPublic

Authored by broulik on Jul 2 2018, 3:09 PM.

Details

Summary

There's no point in loading the entire module when automounting is disabled.
It does Solid device queries which can be quite expensive, albeit it delays initialization.

The AutomounterSettings::shouldAutomountDevice function allows force-mounting even if automounting as a whole is disabled whereas the KCM UI does not. Not sure what the reason for that is.

Test Plan

Enabled setting in KCM, kded module was loaded. Disabled setting in KCM, kded module was unloaded.
Changed the rc file manually, started kded, it unloaded itself and didn't load again next time.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jul 2 2018, 3:09 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 2 2018, 3:09 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jul 2 2018, 3:09 PM
mart accepted this revision.Jul 3 2018, 7:48 AM
This revision is now accepted and ready to land.Jul 3 2018, 7:48 AM
This revision was automatically updated to reflect the committed changes.