Avoid leaking a QObject in ExternalExtractor
ClosedPublic

Authored by bruns on Sun, Feb 10, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Sun, Feb 10, 12:36 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptSun, Feb 10, 12:36 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Sun, Feb 10, 12:36 AM
dhaumann added a subscriber: dhaumann.EditedSun, Feb 10, 8:30 AM

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

bruns added a comment.Sun, Feb 10, 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.Sun, Feb 10, 2:47 PM
This revision is now accepted and ready to land.Sun, Feb 10, 2:47 PM
This revision was automatically updated to reflect the committed changes.