Implement UString operator= to make gcc happy
ClosedPublic

Authored by aacid on Feb 24 2020, 10:46 PM.

Details

Summary

otherwise complains that there's a copy constructor but not an
assignment operator

Diff Detail

Repository
R314 KJs
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.Feb 24 2020, 10:46 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 24 2020, 10:46 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
aacid requested review of this revision.Feb 24 2020, 10:46 PM
aacid added a subscriber: porten.Feb 24 2020, 10:46 PM

On first sight I don't get how the class' memory management works these days. Before commenting on the patch I have to refresh my knowledge.

porten accepted this revision.Apr 11 2020, 9:22 PM

I now see that the member is kept as a RefPtr. Unlike the previously used raw pointer I now understand why the the assignment operator can be implemented that simple.

For completness: the gcc switch that triggers the warning is -Wdeprecated-copy

This revision is now accepted and ready to land.Apr 11 2020, 9:22 PM
This revision was automatically updated to reflect the committed changes.