From ea76ab2b2ded0197ddf9e33e8d6a8af909fce31c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 6 Oct 2013 22:50:12 +0200 Subject: QtWidgets: replace uses of inefficient QLists with QVectors These QPairs 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 holding them in QVector instead. Change-Id: I3c205f5326cfd96482563078bdca1747d718457f Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/dialogs/qsidebar_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/dialogs/qsidebar_p.h') diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h index f3e20986f0..210c86be01 100644 --- a/src/widgets/dialogs/qsidebar_p.h +++ b/src/widgets/dialogs/qsidebar_p.h @@ -55,6 +55,7 @@ #include #include #include +#include #ifndef QT_NO_FILEDIALOG @@ -106,7 +107,7 @@ private: void changed(const QString &path); void addIndexToWatch(const QString &path, const QModelIndex &index); QFileSystemModel *fileSystemModel; - QList > watching; + QVector > watching; QList invalidUrls; }; -- cgit v1.2.3