summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-24 13:34:00 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-24 13:38:51 (GMT)
commit1ba6875372bbe13b7df90a6cd1d547c628b47cd0 (patch)
treed5b8c3ea368b717472740f1277b69afb6655e475 /src/gui/text/qstatictext.cpp
parentd55c1c4123c493ba5f607b81caaea0c42255bfd3 (diff)
downloadQt-1ba6875372bbe13b7df90a6cd1d547c628b47cd0.zip
Qt-1ba6875372bbe13b7df90a6cd1d547c628b47cd0.tar.gz
Qt-1ba6875372bbe13b7df90a6cd1d547c628b47cd0.tar.bz2
Avoid always detaching QStaticText
As a left over from when the d pointer was a plain pointer and not a QExplicitlySharedPointer, we were setting the reference count to 1 on construction. Since QExplicitlySharedPointer handles the ref count, a newly constructed QStaticText would have a ref count of 2, and thus would always detach upon modification. Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r--src/gui/text/qstatictext.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 952d998..8fe4c47 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -350,7 +350,6 @@ QStaticTextPrivate::QStaticTextPrivate()
: items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false),
useBackendOptimizations(false), textFormat(Qt::AutoText)
{
- ref = 1;
}
QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
@@ -358,7 +357,6 @@ QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false),
useBackendOptimizations(other.useBackendOptimizations), textFormat(other.textFormat)
{
- ref = 1;
}
QStaticTextPrivate::~QStaticTextPrivate()