Avoid leaking a QObject in ExternalExtractor
ClosedPublic

Authored by bruns on Feb 10 2019, 12:36 AM.

Details

Summary

Passing a nullptr as a parent is fine, passing an untracked object
definitely is not.

Diff Detail

Repository
R286 KFileMetaData
Branch
submit
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8096
Build 8114: arc lint + arc unit
bruns created this revision.Feb 10 2019, 12:36 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptFeb 10 2019, 12:36 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Feb 10 2019, 12:36 AM
dhaumann added a subscriber: dhaumann.EditedFeb 10 2019, 8:30 AM

That looks reasonable, if ExtractorPlugin even has QObject * parent = nullptr I'd even remove nullptr as well.

bruns added a comment.Feb 10 2019, 2:29 PM

That looks reasonable, if ExtractorPlugin even has QObject * parent = nullptr I'd even remove nullptr as well.

No, no default value ...

ngraham accepted this revision.Feb 10 2019, 2:47 PM
This revision is now accepted and ready to land.Feb 10 2019, 2:47 PM
This revision was automatically updated to reflect the committed changes.