qdoc: replace some inefficient QLists with QVector
The types are either too large or too small for QList, which only has acceptable performance with movable types of size = sizeof(void*). Change-Id: I5a2354e9400baad44095f1eac18d76ef915f6545 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
14dde164dc
commit
b1b3083dec
@ -308,7 +308,7 @@ public:
|
||||
Doc::Sections granularity_;
|
||||
Doc::Sections section_; // ###
|
||||
QList<Atom*> tableOfContents_;
|
||||
QList<int> tableOfContentsLevels_;
|
||||
QVector<int> tableOfContentsLevels_;
|
||||
QList<Atom*> keywords_;
|
||||
QList<Atom*> targets_;
|
||||
QStringMultiMap metaMap_;
|
||||
@ -3087,7 +3087,7 @@ const QList<Atom *> &Doc::tableOfContents() const
|
||||
return priv->extra->tableOfContents_;
|
||||
}
|
||||
|
||||
const QList<int> &Doc::tableOfContentsLevels() const
|
||||
const QVector<int> &Doc::tableOfContentsLevels() const
|
||||
{
|
||||
priv->constructExtra();
|
||||
return priv->extra->tableOfContentsLevels_;
|
||||
|
@ -168,7 +168,7 @@ public:
|
||||
bool hasKeywords() const;
|
||||
bool hasTargets() const;
|
||||
const QList<Atom *> &tableOfContents() const;
|
||||
const QList<int> &tableOfContentsLevels() const;
|
||||
const QVector<int> &tableOfContentsLevels() const;
|
||||
const QList<Atom *> &keywords() const;
|
||||
const QList<Atom *> &targets() const;
|
||||
const QStringMultiMap &metaTagMap() const;
|
||||
|
@ -74,8 +74,8 @@ class QDocIndexFiles
|
||||
QDocDatabase* qdb_;
|
||||
Generator* gen_;
|
||||
QString project_;
|
||||
QList<QPair<ClassNode*,QString> > basesList_;
|
||||
QList<QPair<FunctionNode*,QString> > relatedList_;
|
||||
QVector<QPair<ClassNode*,QString> > basesList_;
|
||||
QVector<QPair<FunctionNode*,QString> > relatedList_;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -157,7 +157,7 @@ private:
|
||||
QString sourceText(QQmlJS::AST::SourceLocation &location);
|
||||
|
||||
QQmlJS::Engine *engine;
|
||||
QList<ExtraType> extraTypes;
|
||||
QVector<ExtraType> extraTypes;
|
||||
QVector<QQmlJS::AST::SourceLocation> extraLocations;
|
||||
QString source;
|
||||
QString output;
|
||||
|
Loading…
Reference in New Issue
Block a user