D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes. Closed by commit R119:b95bdf216b8f: Modernize code. Use nullptr where its possible (authored by mlaurent). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D8473?vs=21348=21356#toc REPOSITORY R119 Plasma Desktop

D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Eike Hein
hein accepted this revision. This revision is now accepted and ready to land. REPOSITORY R119 Plasma Desktop BRANCH modernize_folderplugin REVISION DETAIL https://phabricator.kde.org/D8473 To: mlaurent, hein Cc: broulik, ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai,

D8473: Modernize code. Use nullptr where it's possible

2017-10-26 Thread Laurent Montel
mlaurent updated this revision to Diff 21348. mlaurent added a comment. - Perhaps gcc/clang can optimize it. REPOSITORY R119 Plasma Desktop CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D8473?vs=21309=21348 BRANCH modernize_folderplugin REVISION DETAIL

D8473: Modernize code. Use nullptr where it's possible

2017-10-25 Thread Laurent Montel
mlaurent added inline comments. INLINE COMMENTS > broulik wrote in mimetypesmodel.cpp:109 > Isn't the compiler smart ehough? 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

D8473: Modernize code. Use nullptr where it's possible

2017-10-25 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > mimetypesmodel.cpp:109 > { > -for (int i = 0; i < m_mimeTypesList.size(); i++) { > +for (int i = 0, total = m_mimeTypesList.size(); i < total; ++i) { > if (m_mimeTypesList.at(i).name() == name) { Isn't the compiler smart ehough?

D8473: Modernize code. Use nullptr where it's possible

2017-10-25 Thread Laurent Montel
mlaurent created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION 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

D8473: Modernize code. Use nullptr where it's possible

2017-10-25 Thread Laurent Montel
mlaurent added a reviewer: hein. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D8473 To: mlaurent, hein Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart