Use QVector instead of QList for sizeof(T) > sizeof(void*)
caught with static analyzer which only warns for trivial cases: - Container must be local - Container isn't passed to any function, assigned to another container or assigned to. Change-Id: I3f3aa73c128a56f067fa8745990977445a495ac4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
6139fbeb5f
commit
e41e034669
@ -476,7 +476,7 @@ QByteArray QSpdyProtocolHandler::composeHeader(const QHttpNetworkRequest &reques
|
||||
// calculate additional headers first, because we need to know the size
|
||||
// ### do not partially copy the list, but restrict the set header fields
|
||||
// in QHttpNetworkConnection
|
||||
QList<QPair<QByteArray, QByteArray> > additionalHeaders;
|
||||
QVector<QPair<QByteArray, QByteArray> > additionalHeaders;
|
||||
for (int a = 0; a < request.header().count(); ++a) {
|
||||
QByteArray key = request.header().at(a).first;
|
||||
if (key == "Connection" || key == "Host" || key == "Keep-Alive"
|
||||
|
@ -3452,7 +3452,7 @@ void QFileDialogPrivate::_q_autoCompleteFileName(const QString &text)
|
||||
const QStringList multipleFiles = typedFiles();
|
||||
if (multipleFiles.count() > 0) {
|
||||
QModelIndexList oldFiles = qFileDialogUi->listView->selectionModel()->selectedRows();
|
||||
QModelIndexList newFiles;
|
||||
QVector<QModelIndex> newFiles;
|
||||
for (const auto &file : multipleFiles) {
|
||||
QModelIndex idx = model->index(file);
|
||||
if (oldFiles.removeAll(idx) == 0)
|
||||
|
@ -568,7 +568,7 @@ void QColumnViewPrivate::closeColumns(const QModelIndex &parent, bool build)
|
||||
bool clearAll = !parent.isValid();
|
||||
bool passThroughRoot = false;
|
||||
|
||||
QList<QModelIndex> dirsToAppend;
|
||||
QVector<QModelIndex> dirsToAppend;
|
||||
|
||||
// Find the last column that matches the parent's tree
|
||||
int currentColumn = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user