QFont: Don't invalidate engine unless request has been changed
authorKonstantin Ritt <ritt.ks@gmail.com>
Wed, 17 Oct 2012 11:31:33 +0000 (14:31 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 19 Oct 2012 16:04:36 +0000 (18:04 +0200)
commit9690548113e03614c770cec44a527e6c1edce6ab
tree98f30932311f463468d5095bd9669843fb794476
parentbdc115d9698d4f3cf5ce089dbddca75e425d3eeb
QFont: Don't invalidate engine unless request has been changed

This makes QFont do a "light" detach when the font attributes data has been changed.
The new test clearly shows that the engine is now shared between
two font instances after changing the kerning attribute.

Change-Id: I59db822f459f02d111686dba7101b98e361fada9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/gui/text/qfont.cpp
src/gui/text/qfont_p.h
tests/auto/gui/text/qfont/qfont.pro
tests/auto/gui/text/qfont/tst_qfont.cpp