summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qmlparser/qqmljsengine_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-20 12:58:10 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-21 13:42:49 +0000
commit2422251ee5025a067b14b989153764ab36e43f10 (patch)
tree8758c5b128a38f0aa6266a156385112aa3527e03 /src/tools/qdoc/qmlparser/qqmljsengine_p.h
parent08e0963e0862726feaa10c09b0e3b401c89b9224 (diff)
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<SourceLocation> 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 <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/qmlparser/qqmljsengine_p.h')
-rw-r--r--src/tools/qdoc/qmlparser/qqmljsengine_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/qdoc/qmlparser/qqmljsengine_p.h b/src/tools/qdoc/qmlparser/qqmljsengine_p.h
index fb65d7f028..9ab26f0d0f 100644
--- a/src/tools/qdoc/qmlparser/qqmljsengine_p.h
+++ b/src/tools/qdoc/qmlparser/qqmljsengine_p.h
@@ -50,7 +50,7 @@
#include "qqmljsmemorypool_p.h"
#include <QtCore/qstring.h>
-#include <QtCore/qset.h>
+#include <QtCore/qvector.h>
QT_QML_BEGIN_NAMESPACE
@@ -87,7 +87,7 @@ class QML_PARSER_EXPORT Engine
Lexer *_lexer;
Directives *_directives;
MemoryPool _pool;
- QList<AST::SourceLocation> _comments;
+ QVector<AST::SourceLocation> _comments;
QString _extraCode;
QString _code;
@@ -99,7 +99,7 @@ public:
const QString &code() const { return _code; }
void addComment(int pos, int len, int line, int col);
- QList<AST::SourceLocation> comments() const;
+ QVector<AST::SourceLocation> comments() const;
Lexer *lexer() const;
void setLexer(Lexer *lexer);