Fix initial logging errors from KGameRenderer due to too large pixmaps
KMinesScene in the constructor starts off with an empty scene size of 0x0. When the MineFieldItem is added then as first item, the scene is enlarged to fit the item. Due to MineFieldItem having had at that time uninitialized fields which though are used for calculating the boundingRect, this results by chance in extreme sizes like QSize(1941359222, 1217526246). Using some dummy init values which yields small sizes solves that. Better would be to rework when the pixmap for the background brush is actually fetched first, i.e. when we have real window/scene sizes and are shown. The current implementation is consistent though across tkdegames, so that improvement should be done in a follow-up work for all. (cherry picked from commit a2f7be5c)
Please register or sign in to comment