Use of QScopedPointer for avoiding crashy dialogs.
Review Request #126383 - Created Dec. 16, 2015 and submitted
I recently found out about QScopedPointer and thought it might be a good thing to use instead of QPointer in many cases.
So I tested it with two crashy dialogs in libkdegames.
Please comment in case I forgot to think about something.
Used the KNS3 dialog in Kigo.
I'm sorry but this is still wrong. Did you read this blog: https://blogs.kde.org/node/3919
You somehow have to notice the the dialog gets deleted during exec(). This is only possible with a QPointer. After exec() when you want to access the pointer, you've to check if the QPointer is null before accesing them:
QPointer<KNS3::DownloadDialog> dialog(new KNS3::DownloadDialog(q));