summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-11-19 09:58:03 +0100
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-11-19 09:58:03 +0100
commit879e2ea7d15510ec5f94d6d7a005b157b115f69f (patch)
tree73aedd0bffe7ab39387229a9417aa50cecbbf0aa /src/gui/text/qfont.cpp
parent8fc2eec5b3282665f76f1e0313a03608bf4e7bc1 (diff)
parent80cd617b05ad3e647c87dc063d40cde0617344ca (diff)
Merge remote branch 'origin/4.6' into lighthouse
Conflicts: configure src/plugins/graphicssystems/graphicssystems.pro
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 838fcaa83b..606390327e 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1617,7 +1617,8 @@ bool QFont::operator==(const QFont &f) const
&& f.d->underline == d->underline
&& f.d->overline == d->overline
&& f.d->strikeOut == d->strikeOut
- && f.d->kerning == d->kerning));
+ && f.d->kerning == d->kerning
+ && f.d->capital == d->capital));
}
@@ -1649,6 +1650,7 @@ bool QFont::operator<(const QFont &f) const
#ifdef Q_WS_X11
if (r1.addStyle != r2.addStyle) return r1.addStyle < r2.addStyle;
#endif // Q_WS_X11
+ if (f.d->capital != d->capital) return f.d->capital < d->capital;
int f1attrs = (f.d->underline << 3) + (f.d->overline << 2) + (f.d->strikeOut<<1) + f.d->kerning;
int f2attrs = (d->underline << 3) + (d->overline << 2) + (d->strikeOut<<1) + d->kerning;
@@ -2328,22 +2330,22 @@ QDataStream &operator>>(QDataStream &s, QFont &font)
*/
QFontInfo::QFontInfo(const QFont &font)
: d(font.d.data())
-{ d->ref.ref(); }
+{
+}
/*!
Constructs a copy of \a fi.
*/
QFontInfo::QFontInfo(const QFontInfo &fi)
- : d(fi.d)
-{ d->ref.ref(); }
+ : d(fi.d.data())
+{
+}
/*!
Destroys the font info object.
*/
QFontInfo::~QFontInfo()
{
- if (!d->ref.deref())
- delete d;
}
/*!
@@ -2351,7 +2353,7 @@ QFontInfo::~QFontInfo()
*/
QFontInfo &QFontInfo::operator=(const QFontInfo &fi)
{
- qAtomicAssign(d, fi.d);
+ d = fi.d.data();
return *this;
}
@@ -2636,7 +2638,7 @@ QFontCache::~QFontCache()
while (it != end) {
if (--it.value().data->cache_count == 0) {
if (it.value().data->ref == 0) {
- FC_DEBUG("QFontCache::~QFontCache: deleting engine %p key=(%d / %g %d %d %d %d)",
+ FC_DEBUG("QFontCache::~QFontCache: deleting engine %p key=(%d / %g %g %d %d %d)",
it.value().data, it.key().script, it.key().def.pointSize,
it.key().def.pixelSize, it.key().def.weight, it.key().def.style,
it.key().def.fixedPitch);