From: Gunnar Sletta Date: Mon, 13 May 2013 14:02:30 +0000 (+0200) Subject: Fix sorting of QSGTextMaskMaterial (native glyph drawing). X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=e12ebce572ff5dd624477bf5d3dff84242f2e175;p=konrad%2Fqtdeclarative.git Fix sorting of QSGTextMaskMaterial (native glyph drawing). It seems we were hitting the bool operator rather than the pointer values so all text materials, regardless of size or style would return equal. Change-Id: I8773e5aa965035f6737920747c2cf073929ff799 Reviewed-by: Eskil Abrahamsen Blomfeldt --- diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 3df1153..f5a461f 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -521,7 +521,7 @@ int QSGTextMaskMaterial::compare(const QSGMaterial *o) const Q_ASSERT(o && type() == o->type()); const QSGTextMaskMaterial *other = static_cast(o); if (m_glyphCache != other->m_glyphCache) - return m_glyphCache - other->m_glyphCache; + return m_glyphCache.data() < other->m_glyphCache.data() ? -1 : 1; QRgb c1 = m_color.rgba(); QRgb c2 = other->m_color.rgba(); return int(c2 < c1) - int(c1 < c2);