summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qglyphrun.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-09-02 13:35:07 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-02 13:38:38 +0200
commit154f6a2e73c839763cfc52d140f13a2f0e88eff2 (patch)
tree1a59b3ad9dbd440f43ad6283f439bcf4db4d4d60 /src/gui/text/qglyphrun.cpp
parent61fa9ec8a1044a57b21689ee45c2377b0209fc56 (diff)
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>
Diffstat (limited to 'src/gui/text/qglyphrun.cpp')
-rw-r--r--src/gui/text/qglyphrun.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index be9c058693..26e7e97de7 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -295,6 +295,9 @@ bool QGlyphRun::overline() const
*/
void QGlyphRun::setOverline(bool overline)
{
+ if (d->overline == overline)
+ return;
+
detach();
d->overline = overline;
}
@@ -317,6 +320,9 @@ bool QGlyphRun::underline() const
*/
void QGlyphRun::setUnderline(bool underline)
{
+ if (d->underline == underline)
+ return;
+
detach();
d->underline = underline;
}
@@ -339,6 +345,9 @@ bool QGlyphRun::strikeOut() const
*/
void QGlyphRun::setStrikeOut(bool strikeOut)
{
+ if (d->strikeOut == strikeOut)
+ return;
+
detach();
d->strikeOut = strikeOut;
}