diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-24 02:04:09 +0200 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2016-02-10 16:00:46 +0000 |
commit | cc2938b5b6aa07210b04bd48ad8a2830701a06e5 (patch) | |
tree | 5e9719c9eace2947e542f2ee34c0f23589e3e7e6 /src/tools/qdbuscpp2xml | |
parent | 3e63a58a96bc9d7fc6004f3a8eacc062bae953f9 (diff) |
moc: replace inefficient QLists with QVectors
These types are larger than a void*, so holding them in QLists
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.
Fix by marking them movable, and holding them in a QVector instead.
Change-Id: I42f494ed87854eadc33d78db4479203ff5e0370f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/qdbuscpp2xml')
-rw-r--r-- | src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp index 1b06845c46..6fb42ee758 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp @@ -127,7 +127,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) { return QString(); // wasn't a valid type } } - QList<ArgumentDef> names = mm.arguments; + QVector<ArgumentDef> names = mm.arguments; QVector<int> types; QString errorMsg; int inputCount = qDBusParametersForMethod(mm, types, errorMsg); @@ -396,7 +396,7 @@ int main(int argc, char **argv) args.append(QString::fromLocal8Bit(argv[n])); parseCmdLine(args); - QList<ClassDef> classes; + QVector<ClassDef> classes; for (int i = 0; i < args.count(); ++i) { const QString arg = args.at(i); |