Replace crashy dialogs by QPointer version (krazy2 analysis)
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
Reviewers: KDevelop, brauch
Reviewed By: KDevelop, brauch
Subscribers: aacid, anthonyfieroni, brauch, kdevelop-devel
Tags: KDevelop
Differential Revision: https://phabricator.kde.org/D6084