Modernize code. Use nullptr where it's possible
ClosedPublic

Authored by mlaurent on Oct 25 2017, 1:41 PM.

Details

Summary

Remove extra ';'
Use override everywhere as we already use it in some part of code
Fix potential crash when we delete a pointer

Test Plan

build/using :)

Diff Detail

Repository
R119 Plasma Desktop
Branch
modernize_folderplugin
Lint
No Linters Available
Unit
No Unit Test Coverage
mlaurent created this revision.Oct 25 2017, 1:41 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 25 2017, 1:41 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added inline comments.
containments/desktop/plugins/folder/mimetypesmodel.cpp
109 ↗(On Diff #21309)

Isn't the compiler smart ehough?

containments/desktop/plugins/folder/previewpluginsmodel.cpp
112 ↗(On Diff #21309)

Space after =

mlaurent added inline comments.Oct 25 2017, 4:27 PM
containments/desktop/plugins/folder/mimetypesmodel.cpp
109 ↗(On Diff #21309)

Really I don't know if compiler is able to resolve it when it's not a const variable.
If you told me that gcc/clang is able to do it ok :)
I can trust you if you told me it's not a problem

mlaurent updated this revision to Diff 21348.Oct 26 2017, 7:42 AM
  • Perhaps gcc/clang can optimize it.
hein accepted this revision.Oct 26 2017, 8:49 AM
This revision is now accepted and ready to land.Oct 26 2017, 8:49 AM
This revision was automatically updated to reflect the committed changes.