summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-09-02 11:35:07 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-02 11:35:07 (GMT)
commitf550d219378e5669601de416254b3585fe3f5708 (patch)
treeb33c3873beb26805ddf2c295a3f50950f017c831 /src/gui
parenta556dbe116449f5bb632c102282df7f868efafb4 (diff)
downloadQt-f550d219378e5669601de416254b3585fe3f5708.zip
Qt-f550d219378e5669601de416254b3585fe3f5708.tar.gz
Qt-f550d219378e5669601de416254b3585fe3f5708.tar.bz2
QGlyphRun: don't detach if the decoration wasn't actually changed
Merge-request: 2652 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui')
-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 442f7cc..90790ed 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -294,6 +294,9 @@ bool QGlyphRun::overline() const
*/
void QGlyphRun::setOverline(bool overline)
{
+ if (d->overline == overline)
+ return;
+
detach();
d->overline = overline;
}
@@ -316,6 +319,9 @@ bool QGlyphRun::underline() const
*/
void QGlyphRun::setUnderline(bool underline)
{
+ if (d->underline == underline)
+ return;
+
detach();
d->underline = underline;
}
@@ -338,6 +344,9 @@ bool QGlyphRun::strikeOut() const
*/
void QGlyphRun::setStrikeOut(bool strikeOut)
{
+ if (d->strikeOut == strikeOut)
+ return;
+
detach();
d->strikeOut = strikeOut;
}