QGlyphRun: don't detach if the decoration wasn't actually changed
Merge-request: 2652 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> (cherry picked from commit f550d219378e5669601de416254b3585fe3f5708) Change-Id: Ib74ae82fbeaf2b0f5eabad9568cfa9fcea09053b Reviewed-on: http://codereview.qt.nokia.com/4138 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
parent
61fa9ec8a1
commit
154f6a2e73
@ -295,6 +295,9 @@ bool QGlyphRun::overline() const
|
|||||||
*/
|
*/
|
||||||
void QGlyphRun::setOverline(bool overline)
|
void QGlyphRun::setOverline(bool overline)
|
||||||
{
|
{
|
||||||
|
if (d->overline == overline)
|
||||||
|
return;
|
||||||
|
|
||||||
detach();
|
detach();
|
||||||
d->overline = overline;
|
d->overline = overline;
|
||||||
}
|
}
|
||||||
@ -317,6 +320,9 @@ bool QGlyphRun::underline() const
|
|||||||
*/
|
*/
|
||||||
void QGlyphRun::setUnderline(bool underline)
|
void QGlyphRun::setUnderline(bool underline)
|
||||||
{
|
{
|
||||||
|
if (d->underline == underline)
|
||||||
|
return;
|
||||||
|
|
||||||
detach();
|
detach();
|
||||||
d->underline = underline;
|
d->underline = underline;
|
||||||
}
|
}
|
||||||
@ -339,6 +345,9 @@ bool QGlyphRun::strikeOut() const
|
|||||||
*/
|
*/
|
||||||
void QGlyphRun::setStrikeOut(bool strikeOut)
|
void QGlyphRun::setStrikeOut(bool strikeOut)
|
||||||
{
|
{
|
||||||
|
if (d->strikeOut == strikeOut)
|
||||||
|
return;
|
||||||
|
|
||||||
detach();
|
detach();
|
||||||
d->strikeOut = strikeOut;
|
d->strikeOut = strikeOut;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user