From 2422251ee5025a067b14b989153764ab36e43f10 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 20 Jun 2015 12:58:10 +0200 Subject: qdoc: don't hold QQmlJS::AST::SourceLocation in QLists QQmlJS::AST::SourceLocation wasn't marked as movable, and it is larger than void*, so QList is horribly inefficient. Fix by marking as movable primitive and holding in QVector instead. The same fix probably is required in QtDeclarative, too. Change-Id: I4e0d2cd32b7e03205d59cbc9900287f77045154a Reviewed-by: Martin Smith --- src/tools/qdoc/qmlmarkupvisitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/qdoc/qmlmarkupvisitor.cpp') diff --git a/src/tools/qdoc/qmlmarkupvisitor.cpp b/src/tools/qdoc/qmlmarkupvisitor.cpp index 735dea548d..3a7635778e 100644 --- a/src/tools/qdoc/qmlmarkupvisitor.cpp +++ b/src/tools/qdoc/qmlmarkupvisitor.cpp @@ -42,7 +42,7 @@ QT_BEGIN_NAMESPACE QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, - const QList &pragmas, + const QVector &pragmas, QQmlJS::Engine *engine) { this->source = source; @@ -54,7 +54,7 @@ QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, // Merge the lists of locations of pragmas and comments in the source code. int i = 0; int j = 0; - const QList comments = engine->comments(); + const QVector comments = engine->comments(); while (i < comments.size() && j < pragmas.length()) { if (comments[i].offset < pragmas[j].offset) { extraTypes.append(Comment); -- cgit v1.2.3