[Kde-games-devel] Review Request 127869: Fix warning "item has already been added to this scene"

Albert Astals Cid aacid at kde.org
Sun May 8 22:13:11 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127869/#review95289
-----------------------------------------------------------


Ship it!




Ship It!

- Albert Astals Cid


On May 8, 2016, 2:27 p.m., Martin Walch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127869/
> -----------------------------------------------------------
> 
> (Updated May 8, 2016, 2:27 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: lskat
> 
> 
> Description
> -------
> 
> When starting the game, exactly 8 identical warnings appear:
> 
> > QGraphicsScene::addItem: item has already been added to this scene
> 
> Their origin lies in the ScoreSprite constructor which instantiates several QGraphicsTextItems, passing itself as parent. Afterwards each of them is explicitely added to the same scene as the ScoreSprite using scene->addItem. However, this is redundant because passing the ScoreSprite as parent already makes the new QGraphicsTextItems part of the same scene. Hence the warning.
> 
> 
> Diffs
> -----
> 
>   src/scoresprite.cpp 4d051da 
> 
> Diff: https://git.reviewboard.kde.org/r/127869/diff/
> 
> 
> Testing
> -------
> 
> Compiles fine.
> Warnings do not appear any more at runtime.
> Layout of UI looks unchanged.
> 
> 
> Thanks,
> 
> Martin Walch
> 
>

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


More information about the kde-games-devel mailing list