diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 9b565bff9d..76664a4ade 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -954,8 +954,7 @@ QTextStreamPrivate::PaddingResult QTextStreamPrivate::padding(int len) const right = padSize - padSize/2; break; } - const PaddingResult result = { left, right }; - return result; + return { left, right }; } /*! diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index d3175fe0e1..b09499d25b 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -160,8 +160,7 @@ static ParsedDate getDateFromJulianDay(qint64 julianDay) if (year <= 0) --year ; - const ParsedDate result = { year, month, day }; - return result; + return { year, month, day }; } /***************************************************************************** diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 65a5c1ba3a..b4bfaca8be 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -311,11 +311,10 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(SSL_CIPHER *ciph // static inline QSslErrorEntry QSslErrorEntry::fromStoreContext(X509_STORE_CTX *ctx) { - QSslErrorEntry result = { + return { q_X509_STORE_CTX_get_error(ctx), q_X509_STORE_CTX_get_error_depth(ctx) }; - return result; } // ### This list is shared between all threads, and protected by a diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index d24456edef..81c188f6f5 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -4420,8 +4420,7 @@ QItemViewPaintPairs QAbstractItemViewPrivate::draggablePaintPairs(const QModelIn for (const auto &index : indexes) { const QRect current = q->visualRect(index); if (current.intersects(viewportRect)) { - QItemViewPaintPair p = { current, index }; - ret += p; + ret.append({current, index}); rect |= current; } } diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index 3ef5b788c6..dd4a070d24 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -663,8 +663,7 @@ QItemViewPaintPairs QListViewPrivate::draggablePaintPairs(const QModelIndexList for (const auto &index : indexes) { if (std::binary_search(visibleIndexes.cbegin(), visibleIndexes.cend(), index)) { const QRect current = q->visualRect(index); - QItemViewPaintPair p = { current, index }; - ret += p; + ret.append({current, index}); rect |= current; } }