Review Request: Mitigate potential crashes associated with the use of QDialog::exec in kdelibs

David Edmundson kde at davidedmundson.co.uk
Wed May 2 05:00:17 BST 2012



> On May 1, 2012, 6:15 p.m., Lamarque Vieira Souza wrote:
> > kio/kfile/kurlrequesterdialog.cpp, line 133
> > <http://git.reviewboard.kde.org/r/104802/diff/1/?file=61695#file61695line133>
> >
> >     replace tab to spaces.
> 
> Dawit Alemayehu wrote:
>     For whomever wants to review these patches. Please review on the merit of the code. I do not care about styling issues that already existed in the document that was modified. It is a pointless waste of time and effort to review those unless they are completely outrageous. Thank you.

Actually you added that tab. It's where you indented it having wrapped it in an "if (dlg)"

It's worth telling you now whilst it's only one tab, as it implies you should check your editor settings before writing much more code that needs to follow KDE standards where it would be a lot harder to change.

Even if it wasn't your code, it's worth pointing out existing mistakes even if we don't make them block the patch just so that they're pointed out and someone can remember to fix them.

You're acting like we're telling you off. That's really not the case, you've done a really excellent job in sorting out a very important task, we're just trying to make it even better.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104802/#review13236
-----------------------------------------------------------


On May 1, 2012, 4:37 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104802/
> -----------------------------------------------------------
> 
> (Updated May 1, 2012, 4:37 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> This patch attempts to mitigate the unintended crashes that might result from using QDialog::exec in kdelibs. Since nested event loops are potential sources of inadvertent crashes, this patch attempts to prevent that by changing how dialogs are created in kdelibs. All blocking dialog calls, i.e. those that invoke QDialog.exec(), are wrapped with QPointer and the QPointer is checked once QDialog.exec returns. See http://www.kdedevelopers.org/node/3919 for more details.
> 
> Note that I am aware of other classes that create nested event loops (e.g. QProcess), but this fix is only applicable to QDialog usage.
> 
> 
> Diffs
> -----
> 
>   kdeui/colors/kcolordialog.cpp 95bb7f5 
>   kdeui/dialogs/kedittoolbar.cpp bb80952 
>   kdeui/dialogs/kinputdialog.cpp 2801c00 
>   kdeui/dialogs/kpixmapregionselectordialog.cpp 11d964b 
>   kdeui/dialogs/kshortcutsdialog.cpp a73f8f2 
>   kdeui/dialogs/kshortcutseditor.cpp 5984a9d 
>   kdeui/findreplace/kfinddialog.cpp de2dd90 
>   kdeui/fonts/kfontdialog.cpp 9bea490 
>   kdeui/widgets/ktextedit.cpp 1e58706 
>   kdeui/xmlgui/kmenumenuhandler_p.cpp d8c82b6 
>   kfile/kdiroperator.cpp 18ffc34 
>   kfile/kdirselectdialog.cpp e0dcafa 
>   kfile/kfileplaceeditdialog.cpp 5537551 
>   kio/kfile/kacleditwidget.cpp d89429f 
>   kio/kfile/kencodingfiledialog.cpp 4686065 
>   kio/kfile/kfiledialog.cpp d121e4d 
>   kio/kfile/kicondialog.cpp b7d646f 
>   kio/kfile/kpropertiesdialog.cpp feb0c9e 
>   kio/kfile/kurlrequesterdialog.cpp 8ee29e1 
>   kio/kio/jobuidelegate.cpp 85679c2 
>   kio/kio/kbuildsycocaprogressdialog.cpp fba30ec 
>   kio/kio/passworddialog.cpp faf0c77 
>   kio/kio/paste.cpp ca451fb 
>   kio/kssl/kcm/cacertificatespage.cpp 0a269a3 
>   knewstuff/knewstuff2/ui/downloaddialog.cpp b4d2dcd 
>   knewstuff/knewstuff2/ui/kdxsbutton.cpp e8f8c83 
>   knewstuff/knewstuff3/knewstuffbutton.cpp 9c14e99 
>   kparts/browserrun.cpp c89829d 
>   kutils/kpluginselector.cpp 505e53f 
>   nepomuk/ui/tagwidget.cpp 7c59922 
>   nepomuk/utils/searchwidget.cpp f46e72a 
> 
> Diff: http://git.reviewboard.kde.org/r/104802/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120502/b39f6a7b/attachment.htm>


More information about the kde-core-devel mailing list