diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-07-05 22:43:08 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-17 16:52:15 +0000 |
commit | 47ca3f78139ad51a5018dcdad27fa5caf817f08d (patch) | |
tree | e7d3fc3b4aa452e410cc3ec0c40d6e773857e7e1 /src/plugins/bearer/linux_common | |
parent | 24a96e2a3e676e253eac62a2bf50de60751f7d4f (diff) |
bearer plugins: fix uses of inefficient QLists
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 in a QVector instead.
Change-Id: I78774fc78d787241aaadc4f819b6d229e6200f46
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/bearer/linux_common')
-rw-r--r-- | src/plugins/bearer/linux_common/qofonoservice_linux_p.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h index 43b9570c99..35614a20f2 100644 --- a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h +++ b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h @@ -83,7 +83,12 @@ struct ObjectPathProperties QDBusObjectPath path; QVariantMap properties; }; -typedef QList<ObjectPathProperties> PathPropertiesList; +QT_BEGIN_NAMESPACE +Q_DECLARE_TYPEINFO(ObjectPathProperties, Q_MOVABLE_TYPE); // QDBusObjectPath is movable, but cannot be + // marked as such until Qt 6 +QT_END_NAMESPACE + +typedef QVector<ObjectPathProperties> PathPropertiesList; Q_DECLARE_METATYPE(ObjectPathProperties) Q_DECLARE_METATYPE (PathPropertiesList) |