[Kde-games-devel] Review Request 113671: KMines: krazy fix: Using QPointers when showing modal dialogs via exec()

Albert Astals Cid aacid at kde.org
Sat Nov 16 12:31:45 UTC 2013



> On Nov. 12, 2013, 10:53 p.m., Albert Astals Cid wrote:
> > Ok, i'm still unconvinced it's a huge win, but it doesn't hurt either, so let's go with it
> 
> Alexander Schuch wrote:
>     I just wonder: if the code crashes neither before nor after the "fix", why does krazy2 still mention it? I mean, if the code is safe before, there should not be any need to "fix" it. So krazy2 should not moan. So if it is not required anymore, wouldn't removing the notice from krazy2 be the right thing to do?

The thing is that the code is not safe, the problem is not happening if you quit it via dbus via /MainApp but still could happen some other way, basically any nested loop like the one .exec() creates is problematic. For the full thing have a look at http://lists.kde.org/?t=138403732000001&r=1&w=2 and http://lists.kde.org/?t=138419717000002&r=1&w=2


- Albert


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


On Nov. 12, 2013, 10:53 p.m., Harsh Kumar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113671/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2013, 10:53 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: kmines
> 
> 
> Description
> -------
> 
> This is to fix a issue flagged by Krazy Code Checker :
> ebn.kde.org/krazy/reports/kde-4.x/kdegames/kmines/index.html
> 
> In the fix, QPointers is used to create an object for modal dialogs which are shown via exec(). As mentioned in blogs.kde.org/node/3919, this fix will prevent crashing of the application when it is exited externally, for example by dbus.
> 
> Patch Changes the file - kmines/mainwindow.cpp
> 
> 
> Diffs
> -----
> 
>   mainwindow.cpp 078dc6e 
> 
> Diff: http://git.reviewboard.kde.org/r/113671/diff/
> 
> 
> Testing
> -------
> 
> Compiles & runs (on Arch Linux)
> 
> 
> Thanks,
> 
> Harsh Kumar
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20131116/86729c92/attachment.html>


More information about the kde-games-devel mailing list