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 granularity_;
|
||||||
Doc::Sections section_; // ###
|
Doc::Sections section_; // ###
|
||||||
QList<Atom*> tableOfContents_;
|
QList<Atom*> tableOfContents_;
|
||||||
QList<int> tableOfContentsLevels_;
|
QVector<int> tableOfContentsLevels_;
|
||||||
QList<Atom*> keywords_;
|
QList<Atom*> keywords_;
|
||||||
QList<Atom*> targets_;
|
QList<Atom*> targets_;
|
||||||
QStringMultiMap metaMap_;
|
QStringMultiMap metaMap_;
|
||||||
@ -3087,7 +3087,7 @@ const QList<Atom *> &Doc::tableOfContents() const
|
|||||||
return priv->extra->tableOfContents_;
|
return priv->extra->tableOfContents_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<int> &Doc::tableOfContentsLevels() const
|
const QVector<int> &Doc::tableOfContentsLevels() const
|
||||||
{
|
{
|
||||||
priv->constructExtra();
|
priv->constructExtra();
|
||||||
return priv->extra->tableOfContentsLevels_;
|
return priv->extra->tableOfContentsLevels_;
|
||||||
|
@ -168,7 +168,7 @@ public:
|
|||||||
bool hasKeywords() const;
|
bool hasKeywords() const;
|
||||||
bool hasTargets() const;
|
bool hasTargets() const;
|
||||||
const QList<Atom *> &tableOfContents() const;
|
const QList<Atom *> &tableOfContents() const;
|
||||||
const QList<int> &tableOfContentsLevels() const;
|
const QVector<int> &tableOfContentsLevels() const;
|
||||||
const QList<Atom *> &keywords() const;
|
const QList<Atom *> &keywords() const;
|
||||||
const QList<Atom *> &targets() const;
|
const QList<Atom *> &targets() const;
|
||||||
const QStringMultiMap &metaTagMap() const;
|
const QStringMultiMap &metaTagMap() const;
|
||||||
|
@ -74,8 +74,8 @@ class QDocIndexFiles
|
|||||||
QDocDatabase* qdb_;
|
QDocDatabase* qdb_;
|
||||||
Generator* gen_;
|
Generator* gen_;
|
||||||
QString project_;
|
QString project_;
|
||||||
QList<QPair<ClassNode*,QString> > basesList_;
|
QVector<QPair<ClassNode*,QString> > basesList_;
|
||||||
QList<QPair<FunctionNode*,QString> > relatedList_;
|
QVector<QPair<FunctionNode*,QString> > relatedList_;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -157,7 +157,7 @@ private:
|
|||||||
QString sourceText(QQmlJS::AST::SourceLocation &location);
|
QString sourceText(QQmlJS::AST::SourceLocation &location);
|
||||||
|
|
||||||
QQmlJS::Engine *engine;
|
QQmlJS::Engine *engine;
|
||||||
QList<ExtraType> extraTypes;
|
QVector<ExtraType> extraTypes;
|
||||||
QVector<QQmlJS::AST::SourceLocation> extraLocations;
|
QVector<QQmlJS::AST::SourceLocation> extraLocations;
|
||||||
QString source;
|
QString source;
|
||||||
QString output;
|
QString output;
|
||||||
|
Loading…
Reference in New Issue
Block a user