Avoid excessive QImage::fill/copy in copyright handler
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Fri, 4 Apr 2014 15:07:02 +0000 (17:07 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 7 Apr 2014 09:28:37 +0000 (11:28 +0200)
commit19d76d5d7799aa3b98a1e3e0e6e569df14886a54
treebce6be1767756c076d2792befe6390f3307b9223
parent6a2bd5f43f1b1a3504b4431e15fc0c0fa216c3bc
Avoid excessive QImage::fill/copy in copyright handler

This fixes two problems. The first is that an empty copyright string
would result in the image being regenerated over and over again.
The second problem is that the code would allocate a fullscreen image
regardless of the size of the copyright watermark and then do
QImage::copy() to crop it to the displayed size. Needless to say,
this took a bit more time than strictly required.

Change-Id: Ia8d76e1cb34793439f92e7bb3ae00a8e99ffdc5e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp