Replace crashy dialogs by QPointer version (krazy2 analysis)
ClosedPublic

Authored by croick on Jun 3 2017, 7:58 PM.

Details

Summary

The krazy2 analysis reports crashy code in 10 cases, the patch changes the code according to http://blogs.kde.org/node/3919.

Test Plan

no tests performed

Diff Detail

Repository
R32 KDevelop
Lint
Lint Skipped
Unit
Unit Tests Skipped
croick created this revision.Jun 3 2017, 7:58 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJun 3 2017, 7:58 PM
brauch accepted this revision.Jun 3 2017, 9:27 PM
brauch added a subscriber: brauch.

LGTM, I have actually seen crashes a few times which I would account to something related.

This revision is now accepted and ready to land.Jun 3 2017, 9:27 PM
anthonyfieroni added inline comments.
languages/plugins/custom-definesandincludes/kcm_widget/projectpathswidget.cpp
182 ↗(On Diff #15123)

Not checked.

croick updated this revision to Diff 15229.Jun 6 2017, 8:45 PM

I included the check for the return value of dlg->exec() in addProjectPath

croick marked an inline comment as done.Jun 6 2017, 8:47 PM
aacid added a subscriber: aacid.Jun 18 2017, 5:05 PM

@anthonyfieroni does this look good to you?

@brauch Should i commit? (Since @croick doesn't have commit access)

Now looks good to me. Sven knows better, but sometimes exec() is checked against QDialog::Rejected other time against *not*.

I was asking this myself, so I checked the Qt documentation and in one of the examples of QFileDialog they do it like I proposed.

This revision was automatically updated to reflect the committed changes.