KRatingPainter: Delete copy constructor and assignment operator
ClosedPublic

Authored by aacid on Jan 9 2019, 9:27 PM.

Details

Summary

If someone was using them, it'd crash since it was raw-copying the d pointer
so you would end up with a double delete.

This is SIC, but IMHO it's fine, whoever gets a compiler failure has a bug to fix

Diff Detail

Repository
R236 KWidgetsAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aacid created this revision.Jan 9 2019, 9:27 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 9 2019, 9:27 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
aacid requested review of this revision.Jan 9 2019, 9:27 PM
cfeck accepted this revision.Jan 9 2019, 10:33 PM
cfeck added a subscriber: cfeck.

Right.

If someone would copy the object using the default implementations, they would only get two instances pointing to the same Private.

This revision is now accepted and ready to land.Jan 9 2019, 10:33 PM
This revision was automatically updated to reflect the committed changes.