Modernize: Use nullptr where possible
ClosedPublic

Authored by kfunk on Oct 15 2017, 12:25 PM.

Diff Detail

Repository
R871 DrKonqi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kfunk created this revision.Oct 15 2017, 12:25 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 15 2017, 12:25 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik accepted this revision.Oct 15 2017, 12:31 PM
broulik added a subscriber: broulik.
broulik added inline comments.
src/backtracegenerator.cpp
69

Q_ASSERT(!m_proc && !m_temp)?
iirc Clang doesn't like comparisons to nullptr very much (at least in QCOMPARE) and I find it cleaner

src/crashedapplication.cpp
98

name ? name : "Unknown"?

src/drkonqi.cpp
83

could be simplified to static DrKonqi *drKonqiInstance = new DrKonqi(); or even created on the stack and return address (just noticed, not what this patch is about obviously)

This revision is now accepted and ready to land.Oct 15 2017, 12:31 PM
sitter accepted this revision.Oct 15 2017, 3:39 PM
kfunk marked an inline comment as done.Oct 15 2017, 4:44 PM
kfunk added inline comments.
src/backtracegenerator.cpp
69

That can't be problem. This code will compile fine.

QCOMPARE(a,nullptr) since this is triggering some template instantiations which might fail to deduce the correct pointer type for the rhs.

Fixed it anyhow :)

This revision was automatically updated to reflect the committed changes.
kfunk marked an inline comment as done.