diff options
-rw-r--r-- | src/gui/text/qfontengine_qpf2.cpp | 7 | ||||
-rw-r--r-- | src/tools/moc/moc.cpp | 6 |
2 files changed, 6 insertions, 7 deletions
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 <QtCore/QDir> #include <QtCore/QBuffer> #include <QtCore/private/qstringiterator_p.h> +#include <QtCore/private/qduplicatetracker_p.h> #include <QtGui/private/qpaintengine_raster_p.h> #include <QtGui/private/qguiapplication_p.h> @@ -346,7 +347,7 @@ bool QFontEngineQPF2::stringToCMap(const QChar *str, int len, QGlyphLayout *glyp } #if defined(DEBUG_FONTENGINE) - QSet<QChar> seenGlyphs; + QDuplicateTracker<QChar> 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 <private/qmetaobject_moc_p.h> +#include <private/qduplicatetracker_p.h> 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<QByteArray> definedProperties; + QDuplicateTracker<QByteArray> 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) { |