D5627: Remove KDELibs4Support from KSudoku
Johan Ouwerkerk
noreply at phabricator.kde.org
Sat Apr 29 14:25:22 UTC 2017
ouwerkerk added a comment.
In https://phabricator.kde.org/D5627#105881, @ouwerkerk wrote:
> In https://phabricator.kde.org/D5627#105879, @ltoscano wrote:
>
> > Do we really need the auto pointer? (just to check if that would bump some requirement, maybe just for one usage is not needed)
>
>
> Of course not: in each case the appropriate type should be used instead. ;)
>
> For `load()` the specific check is a bit different:
Actually, scratch that: there is a specific constructor for an invalid `Game()` and I had assumed that one would inject a `nullptr` value for the `puzzle`.
Unfortunately it doesn't which means the `Game` class must be altered to either do so (change in behaviour) or extended to have an explicit marker which you can test for (e.g. and `.isNull()` member like `QString` has.).
By the way, this is also probably why you get the crash when attempting to generate a puzzle from an invalid Game variant! (An uninitialised `puzzle` pointer, i.e. a wild pointer.)
REPOSITORY
R417 KSudoku
REVISION DETAIL
https://phabricator.kde.org/D5627
To: stikonas, #kde_games, ltoscano, ouwerkerk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20170429/7c9ef5dc/attachment.html>
More information about the kde-games-devel
mailing list