[Kde-games-devel] Review Request 127869: Fix warning "item has already been added to this scene"
Martin Walch
walch.martin at web.de
Mon May 9 03:45:11 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127869/
-----------------------------------------------------------
(Updated May 9, 2016, 3:45 a.m.)
Status
------
This change has been marked as submitted.
Review request for KDE Games.
Changes
-------
Submitted with commit 4b83d13101e8fce932d53c5cf4ccaa039085bc4f by Martin Walch to branch frameworks.
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/20160509/8f2f2926/attachment.html>
More information about the kde-games-devel
mailing list