diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-11-24 09:21:53 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-11-30 12:22:21 +0000 |
commit | e808c5fa6096eb4bc84b6d90c9befa9e805fa680 (patch) | |
tree | c3b829ebe16943c7cc6d2cc802d26b4889810d6e /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | ca14600965479dd3d255b734a0fe54bb2ba7892d (diff) |
Don't use QList<QPair>
Change it to use a QVector instead.
Change-Id: Ie1749f326ba1165db48c0eb8763eb738672c7afd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index cfc6b9c4cc..5dd8c05734 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1110,7 +1110,7 @@ void QFileSystemModel::sort(int column, Qt::SortOrder order) emit layoutAboutToBeChanged(); QModelIndexList oldList = persistentIndexList(); - QList<QPair<QFileSystemModelPrivate::QFileSystemNode*, int> > oldNodes; + QVector<QPair<QFileSystemModelPrivate::QFileSystemNode*, int> > oldNodes; const int nodeCount = oldList.count(); oldNodes.reserve(nodeCount); for (int i = 0; i < nodeCount; ++i) { @@ -1756,7 +1756,7 @@ void QFileSystemModelPrivate::removeVisibleFile(QFileSystemNode *parentNode, int The thread has received new information about files, update and emit dataChanged if it has actually changed. */ -void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QList<QPair<QString, QFileInfo> > &updates) +void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QVector<QPair<QString, QFileInfo> > &updates) { #ifndef QT_NO_FILESYSTEMWATCHER Q_Q(QFileSystemModel); @@ -1875,12 +1875,12 @@ void QFileSystemModelPrivate::_q_resolvedName(const QString &fileName, const QSt void QFileSystemModelPrivate::init() { Q_Q(QFileSystemModel); - qRegisterMetaType<QList<QPair<QString,QFileInfo> > >(); + qRegisterMetaType<QVector<QPair<QString,QFileInfo> > >(); #ifndef QT_NO_FILESYSTEMWATCHER q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(QString,QStringList)), q, SLOT(_q_directoryChanged(QString,QStringList))); - q->connect(&fileInfoGatherer, SIGNAL(updates(QString,QList<QPair<QString,QFileInfo> >)), - q, SLOT(_q_fileSystemChanged(QString,QList<QPair<QString,QFileInfo> >))); + q->connect(&fileInfoGatherer, SIGNAL(updates(QString,QVector<QPair<QString,QFileInfo> >)), + q, SLOT(_q_fileSystemChanged(QString,QVector<QPair<QString,QFileInfo> >))); q->connect(&fileInfoGatherer, SIGNAL(nameResolved(QString,QString)), q, SLOT(_q_resolvedName(QString,QString))); q->connect(&fileInfoGatherer, SIGNAL(directoryLoaded(QString)), |