From 47ca3f78139ad51a5018dcdad27fa5caf817f08d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 5 Jul 2015 22:43:08 +0200 Subject: 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 --- src/plugins/bearer/connman/qconnmanservice_linux_p.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/bearer/connman') diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h index 9a2bf4eb34..e773db9b20 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h +++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h @@ -82,8 +82,9 @@ struct ConnmanMap { QDBusObjectPath objectPath; QVariantMap propertyMap; }; - -typedef QList< ConnmanMap > ConnmanMapList; +Q_DECLARE_TYPEINFO(ConnmanMap, Q_MOVABLE_TYPE); // QDBusObjectPath is movable, but cannot be + // marked as such until Qt 6 +typedef QVector ConnmanMapList; QT_END_NAMESPACE -- cgit v1.2.3