Replace QVector with QList

Migrated last remnants of QVector to Qlist, reference https://github.com/qbittorrent/qBittorrent/pull/21016#issuecomment-2212403741 onward.

PR #21407.
This commit is contained in:
xavier2k6 2024-09-30 11:20:58 +01:00 committed by GitHub
parent d8e24314ec
commit c30a07702d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 5 deletions

View file

@ -71,8 +71,8 @@
#include <QFile> #include <QFile>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <QList>
#include <QString> #include <QString>
#include <QVector>
#endif #endif
namespace QtLP_Private namespace QtLP_Private
@ -105,7 +105,7 @@ namespace QtLP_Private
Qt::HANDLE m_writeMutex = nullptr; Qt::HANDLE m_writeMutex = nullptr;
Qt::HANDLE m_readMutex = nullptr; Qt::HANDLE m_readMutex = nullptr;
QVector<Qt::HANDLE> m_readMutexes; QList<Qt::HANDLE> m_readMutexes;
QString m_mutexName; QString m_mutexName;
#endif #endif

View file

@ -34,7 +34,6 @@
#include <QPixmap> #include <QPixmap>
#include <QSize> #include <QSize>
#include <QString> #include <QString>
#include <QVector>
#include "base/path.h" #include "base/path.h"

View file

@ -28,9 +28,9 @@
#include <algorithm> #include <algorithm>
#include <QList>
#include <QObject> #include <QObject>
#include <QTest> #include <QTest>
#include <QVector>
#include "base/bittorrent/trackerentry.h" #include "base/bittorrent/trackerentry.h"
#include "base/global.h" #include "base/global.h"
@ -46,7 +46,7 @@ public:
private slots: private slots:
void testParseTrackerEntries() const void testParseTrackerEntries() const
{ {
using Entries = QVector<BitTorrent::TrackerEntry>; using Entries = QList<BitTorrent::TrackerEntry>;
const auto isEqual = [](const Entries &left, const Entries &right) -> bool const auto isEqual = [](const Entries &left, const Entries &right) -> bool
{ {