diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp index d636bca510..7178ef2928 100644 --- a/src/gui/text/qfontengine_qpf2.cpp +++ b/src/gui/text/qfontengine_qpf2.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -346,7 +347,7 @@ bool QFontEngineQPF2::stringToCMap(const QChar *str, int len, QGlyphLayout *glyp } #if defined(DEBUG_FONTENGINE) - QSet seenGlyphs; + QDuplicateTracker seenGlyphs; #endif int glyph_pos = 0; @@ -366,10 +367,8 @@ bool QFontEngineQPF2::stringToCMap(const QChar *str, int len, QGlyphLayout *glyp glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, cmapSize, uc); #if 0 && defined(DEBUG_FONTENGINE) QChar c(uc); - if (!findGlyph(glyphs[glyph_pos].glyph) && !seenGlyphs.contains(c)) + if (!findGlyph(glyphs[glyph_pos].glyph) && !seenGlyphs.hasSeen(c)) qDebug() << "glyph for character" << c << '/' << Qt::hex << uc << "is" << Qt::dec << glyphs[glyph_pos].glyph; - - seenGlyphs.insert(c); #endif ++glyph_pos; } diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 949a2e075a..dbe75ebe51 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -39,6 +39,7 @@ // for normalizeTypeInternal #include +#include QT_BEGIN_NAMESPACE @@ -1868,14 +1869,13 @@ void Moc::checkProperties(ClassDef *cdef) // specify get function, for compatibiliy we accept functions // returning pointers, or const char * for QByteArray. // - QSet definedProperties; + QDuplicateTracker definedProperties; for (int i = 0; i < cdef->propertyList.count(); ++i) { PropertyDef &p = cdef->propertyList[i]; - if (definedProperties.contains(p.name)) { + if (definedProperties.hasSeen(p.name)) { QByteArray msg = "The property '" + p.name + "' is defined multiple times in class " + cdef->classname + "."; warning(msg.constData()); } - definedProperties.insert(p.name); if (p.read.isEmpty() && p.member.isEmpty()) { if (!cdef->qPropertyMembers.contains(p.name) && !p.isQProperty) {