summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libjpeg/COPYRIGHT.txt2
-rw-r--r--src/3rdparty/libjpeg/ChangeLog.md43
-rw-r--r--src/3rdparty/libjpeg/qt_attribution.json4
-rw-r--r--src/3rdparty/libjpeg/src/jconfig.h4
-rw-r--r--src/3rdparty/libjpeg/src/jconfigint.h2
-rw-r--r--src/corelib/configure.cmake8
-rw-r--r--src/corelib/doc/src/cmake/cmake-configure-variables.qdoc2
-rw-r--r--src/corelib/doc/src/cmake/cmake-properties.qdoc2
-rw-r--r--src/corelib/doc/src/cmake/qt_deploy_translations.qdoc1
-rw-r--r--src/corelib/doc/src/cmake/qt_extract_metatypes.qdoc1
-rw-r--r--src/corelib/doc/src/cmake/qt_finalize_project.qdoc1
-rw-r--r--src/corelib/io/qioring_p.h6
-rw-r--r--src/corelib/io/qioring_win.cpp104
-rw-r--r--src/corelib/kernel/qmetacontainer.h9
-rw-r--r--src/corelib/kernel/qmetasequence.cpp40
-rw-r--r--src/corelib/kernel/qmetasequence.h21
-rw-r--r--src/network/access/qnetworkaccesscache.cpp12
-rw-r--r--src/network/access/qnetworkaccesscache_p.h4
-rw-r--r--src/testlib/qtestlog.cpp6
19 files changed, 149 insertions, 123 deletions
diff --git a/src/3rdparty/libjpeg/COPYRIGHT.txt b/src/3rdparty/libjpeg/COPYRIGHT.txt
index f5eae868466..ce9d95bfebc 100644
--- a/src/3rdparty/libjpeg/COPYRIGHT.txt
+++ b/src/3rdparty/libjpeg/COPYRIGHT.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2009-2025 D. R. Commander
+Copyright (C) 2009-2024 D. R. Commander
Copyright (C) 2015, 2020 Google, Inc.
Copyright (C) 2019-2020 Arm Limited
Copyright (C) 2015-2016, 2018 Matthieu Darbois
diff --git a/src/3rdparty/libjpeg/ChangeLog.md b/src/3rdparty/libjpeg/ChangeLog.md
index 4bdbf53dd34..17390d80bd0 100644
--- a/src/3rdparty/libjpeg/ChangeLog.md
+++ b/src/3rdparty/libjpeg/ChangeLog.md
@@ -1,3 +1,34 @@
+3.1.3
+=====
+
+### Significant changes relative to 3.1.2:
+
+1. Hardened the TurboJPEG API against hypothetical applications that may
+erroneously call `tj*Compress*()` or `tj*Transform()` with a reused JPEG
+destination buffer pointer while specifying a destination buffer size of 0.
+
+2. Hardened the TurboJPEG API against hypothetical applications that may
+erroneously set `TJPARAM_LOSSLESS` or `TJPARAM_COLORSPACE` prior to calling
+`tj3EncodeYUV*8()` or `tj3CompressFromYUV*8()`. `tj3EncodeYUV*8()` and
+`tj3CompressFromYUV*8()` now ignore `TJPARAM_LOSSLESS` and
+`TJPARAM_COLORSPACE`.
+
+3. Hardened the TurboJPEG Java API against hypothetical applications that may
+erroneously pass huge X or Y offsets to one of the compression, YUV encoding,
+decompression, or YUV decoding methods, leading to signed integer overflow in
+the JNI wrapper's buffer size checks that rendered those checks ineffective.
+
+4. Fixed an issue in the TurboJPEG Java API whereby
+`TJCompressor.getSourceBuf()` sometimes returned the buffer from a previous
+invocation of `TJCompressor.loadSourceImage()` if the target data precision was
+changed before the most recent invocation.
+
+5. Fixed an issue in the PPM reader that caused incorrect pixels to be
+generated when using `tj3LoadImage*()` or `TJCompressor.loadSourceImage()` to
+load a PBMPLUS (PPM/PGM) file into a CMYK buffer with a different data
+precision than that of the file.
+
+
3.1.2
=====
@@ -962,9 +993,9 @@ storage.
64-bit libjpeg-turbo SDK for Visual C++ were installed on the same system, only
one of them could be uninstalled.
-2. Fixed a signed integer overflow and subsequent segfault that occurred when
-attempting to decompress images with more than 715827882 pixels using the
-64-bit C version of TJBench.
+2. Fixed a signed integer overflow and subsequent segfault (CVE-2019-2201) that
+occurred when attempting to decompress images with more than 715827882 pixels
+using the 64-bit C version of TJBench.
3. Fixed out-of-bounds write in `tjDecompressToYUV2()` and
`tjDecompressToYUVPlanes()` (sometimes manifesting as a double free) that
@@ -1016,9 +1047,9 @@ regardless of whether a 4:2:2 JPEG image is rotated or transposed prior to
decompression (in the frequency domain) or after decompression (in the spatial
domain), the final image will be similar.
-4. Fixed an integer overflow and subsequent segfault that occurred when
-attempting to compress or decompress images with more than 1 billion pixels
-using the TurboJPEG API.
+4. Fixed an integer overflow and subsequent segfault (CVE-2019-2201) that
+occurred when attempting to compress or decompress images with more than 1
+billion pixels using the TurboJPEG API.
5. Fixed a regression introduced by 2.0 beta1[15] whereby attempting to
generate a progressive JPEG image on an SSE2-capable CPU using a scan script
diff --git a/src/3rdparty/libjpeg/qt_attribution.json b/src/3rdparty/libjpeg/qt_attribution.json
index fe38aec1f68..5ac811a12b4 100644
--- a/src/3rdparty/libjpeg/qt_attribution.json
+++ b/src/3rdparty/libjpeg/qt_attribution.json
@@ -7,8 +7,8 @@
"Description": "The Independent JPEG Group's JPEG software",
"Homepage": "http://libjpeg-turbo.virtualgl.org/",
- "Version": "3.1.2",
- "DownloadLocation": "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.2/libjpeg-turbo-3.1.2.tar.gz",
+ "Version": "3.1.3",
+ "DownloadLocation": "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.3/libjpeg-turbo-3.1.3.tar.gz",
"PURL": "pkg:github/libjpeg-turbo/libjpeg-turbo@$<VERSION>",
"CPE": "cpe:2.3:a:libjpeg-turbo:libjpeg-turbo:$<VERSION>:*:*:*:*:*:*:*",
diff --git a/src/3rdparty/libjpeg/src/jconfig.h b/src/3rdparty/libjpeg/src/jconfig.h
index e81574b9a48..85a1509fb68 100644
--- a/src/3rdparty/libjpeg/src/jconfig.h
+++ b/src/3rdparty/libjpeg/src/jconfig.h
@@ -2,9 +2,9 @@
#define JPEG_LIB_VERSION 80
-#define LIBJPEG_TURBO_VERSION 3.0.3
+#define LIBJPEG_TURBO_VERSION 3.1.3
-#define LIBJPEG_TURBO_VERSION_NUMBER 3000003
+#define LIBJPEG_TURBO_VERSION_NUMBER 3001003
#define C_ARITH_CODING_SUPPORTED 1
diff --git a/src/3rdparty/libjpeg/src/jconfigint.h b/src/3rdparty/libjpeg/src/jconfigint.h
index 6e7dbd75a1e..6d5f9633928 100644
--- a/src/3rdparty/libjpeg/src/jconfigint.h
+++ b/src/3rdparty/libjpeg/src/jconfigint.h
@@ -10,7 +10,7 @@
#define PACKAGE_NAME "libjpeg-turbo"
-#define VERSION "3.0.3"
+#define VERSION "3.1.3"
#if SIZE_MAX == 0xffffffff
#define SIZEOF_SIZE_T 4
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index a186b65f24f..7274b51cc0a 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -620,6 +620,10 @@ int main(void)
HRESULT hr = CreateIoRing(IORING_VERSION_3, flags, 1, 1, &ioRingHandle);
if (hr == IORING_E_SUBMISSION_QUEUE_FULL) // not valid, but test that this #define exists
return 0;
+ IORING_HANDLE_REF ref(HANDLE(nullptr));
+ IORING_BUFFER_REF bufRef(nullptr);
+ // The newest API addition that we require:
+ BuildIoRingWriteFile(ioRingHandle, ref, bufRef, -1, 0, FILE_WRITE_FLAGS_NONE, 0, IOSQE_FLAGS_NONE);
/* END TEST: */
return 0;
}
@@ -806,7 +810,7 @@ qt_feature("winsdkicu" PRIVATE
CONDITION TEST_winsdkicu
DISABLE QT_FEATURE_icu
)
-qt_feature("windows_ioring" PRIVATE
+qt_feature("windows-ioring" PRIVATE
LABEL "Windows I/O Ring"
AUTODETECT WIN32 AND CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 10.0.22000
CONDITION TEST_windows_ioring
@@ -1297,7 +1301,7 @@ qt_configure_add_summary_entry(ARGS "glib")
qt_configure_add_summary_entry(ARGS "icu")
qt_configure_add_summary_entry(ARGS "jemalloc")
qt_configure_add_summary_entry(ARGS "liburing")
-qt_configure_add_summary_entry(ARGS "windows_ioring")
+qt_configure_add_summary_entry(ARGS "windows-ioring")
qt_configure_add_summary_entry(ARGS "timezone_tzdb")
qt_configure_add_summary_entry(ARGS "system-libb2")
qt_configure_add_summary_entry(ARGS "mimetype-database")
diff --git a/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc b/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc
index b8e5e038a33..7cd3f91b901 100644
--- a/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc
+++ b/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc
@@ -525,7 +525,6 @@ To prevent this, set \c QT_NO_SET_XCODE_BUNDLE_IDENTIFIER to \c TRUE.
\summary {Enables verbose mode of deployment tools.}
\cmakevariablesince 6.3
-\preliminarycmakevariable
Enables verbose mode of the \l androiddeployqt deployment tool when it is called
internally at build time, usually during target finalization.
@@ -545,7 +544,6 @@ must be set before the first \c{find_package(Qt6)} call to have that effect.
\summary {Name of the file to include for setting up deployment support.}
\cmakevariablesince 6.3
-\preliminarycmakevariable
\note The value of this variable should never be modified by project code.
This configure-phase variable is set by the Core package. It is intended to be
diff --git a/src/corelib/doc/src/cmake/cmake-properties.qdoc b/src/corelib/doc/src/cmake/cmake-properties.qdoc
index 821862494a2..c7b1a27a4b4 100644
--- a/src/corelib/doc/src/cmake/cmake-properties.qdoc
+++ b/src/corelib/doc/src/cmake/cmake-properties.qdoc
@@ -665,7 +665,6 @@ UTF-8 input). Use the \l QT_NO_CAST_FROM_ASCII and
\summary {Specifies the default Qt resource prefix.}
\cmakepropertysince 6.0
-\preliminarycmakeproperty
When using \l{qt6_add_resources}{qt_add_resources} without a \c PREFIX
argument, then the value of this target property will be used as
@@ -773,7 +772,6 @@ CMake properties:
\brief Sets the FOLDER property for Qt-internal targets.
\cmakepropertysince 6.5
-\preliminarycmakeproperty
Name of the \l FOLDER for internal targets that are added by Qt's CMake
commands.
diff --git a/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc b/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc
index 43ff23a35a1..e6d3edbbdc4 100644
--- a/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc
+++ b/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc
@@ -17,7 +17,6 @@ can only be called from a deployment script. It cannot be called directly by the
project during the configure stage.
\cmakecommandsince 6.5
-\preliminarycmakecommand
\note This command does not usually need to be called directly. It is used
internally by other higher level commands, but projects wishing to
implement more customized deployment logic may find it useful.
diff --git a/src/corelib/doc/src/cmake/qt_extract_metatypes.qdoc b/src/corelib/doc/src/cmake/qt_extract_metatypes.qdoc
index 7ec8d90f9b1..24112b1cf87 100644
--- a/src/corelib/doc/src/cmake/qt_extract_metatypes.qdoc
+++ b/src/corelib/doc/src/cmake/qt_extract_metatypes.qdoc
@@ -11,7 +11,6 @@
\summary {Extracts metatypes from a Qt target and generates an associated metatypes.json file.}
\cmakecommandsince 6.0
-\preliminarycmakecommand
\section1 Synopsis
diff --git a/src/corelib/doc/src/cmake/qt_finalize_project.qdoc b/src/corelib/doc/src/cmake/qt_finalize_project.qdoc
index 5506712691e..f60b850fcdb 100644
--- a/src/corelib/doc/src/cmake/qt_finalize_project.qdoc
+++ b/src/corelib/doc/src/cmake/qt_finalize_project.qdoc
@@ -9,7 +9,6 @@
\keyword qt6_finalize_project
\summary {Handles various common platform-specific tasks associated with a Qt project.}
-\preliminarycmakecommand
\include cmake-find-package-core.qdocinc
diff --git a/src/corelib/io/qioring_p.h b/src/corelib/io/qioring_p.h
index 0db832bc6bf..8fdaf48f8f6 100644
--- a/src/corelib/io/qioring_p.h
+++ b/src/corelib/io/qioring_p.h
@@ -91,6 +91,10 @@ enum class Operation : quint8 {
// clang-format on
Q_ENUM_NS(Operation);
#undef DEFINE_ENTRY
+
+#ifdef Q_OS_WIN
+struct IORingApiTable;
+#endif
}; // namespace QtPrivate
template <QtPrivate::Operation Op>
@@ -221,9 +225,11 @@ private:
std::optional<QWinEventNotifier> notifier;
HIORING ioRingHandle = nullptr;
HANDLE eventHandle = INVALID_HANDLE_VALUE;
+ const QtPrivate::IORingApiTable *apiTable;
bool initialized = false;
bool queueWasFull = false;
+
[[nodiscard]]
RequestPrepResult prepareRequest(GenericRequestType &request);
QIORing::ReadWriteStatus handleReadCompletion(
diff --git a/src/corelib/io/qioring_win.cpp b/src/corelib/io/qioring_win.cpp
index 42c51f428d6..b2f188486d0 100644
--- a/src/corelib/io/qioring_win.cpp
+++ b/src/corelib/io/qioring_win.cpp
@@ -24,6 +24,59 @@ static_assert(sizeof(qsizetype) > sizeof(UINT32),
using namespace Qt::StringLiterals;
+namespace QtPrivate {
+#define FOREACH_WIN_IORING_FUNCTION(Fn) \
+ Fn(BuildIoRingReadFile) \
+ Fn(BuildIoRingWriteFile) \
+ Fn(BuildIoRingFlushFile) \
+ Fn(BuildIoRingCancelRequest) \
+ Fn(QueryIoRingCapabilities) \
+ Fn(CreateIoRing) \
+ Fn(GetIoRingInfo) \
+ Fn(SubmitIoRing) \
+ Fn(CloseIoRing) \
+ Fn(PopIoRingCompletion) \
+ Fn(SetIoRingCompletionEvent) \
+ /**/
+struct IORingApiTable
+{
+#define DefineIORingFunction(Name) \
+ using Name##Fn = decltype(&::Name); \
+ Name##Fn Name = nullptr;
+
+ FOREACH_WIN_IORING_FUNCTION(DefineIORingFunction)
+
+#undef DefineIORingFunction
+};
+
+static const IORingApiTable *getApiTable()
+{
+ static const IORingApiTable apiTable = []() {
+ IORingApiTable apiTable;
+ const HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
+ if (Q_UNLIKELY(!kernel32)) // how would this happen
+ return apiTable;
+
+#define ResolveFunction(Name) \
+ apiTable.Name = IORingApiTable::Name##Fn(QFunctionPointer(GetProcAddress(kernel32, #Name)));
+
+ FOREACH_WIN_IORING_FUNCTION(ResolveFunction)
+
+#undef ResolveFunction
+ return apiTable;
+ }();
+
+#define TEST_TABLE_OK(X) \
+ apiTable.X && /* chain */
+#define BOOL_CHAIN(...) (__VA_ARGS__ true)
+ const bool success = BOOL_CHAIN(FOREACH_WIN_IORING_FUNCTION(TEST_TABLE_OK));
+#undef BOOL_CHAIN
+#undef TEST_TABLE_OK
+
+ return success ? std::addressof(apiTable) : nullptr;
+}
+} // namespace QtPrivate
+
static HRESULT buildReadOperation(HIORING ioRingHandle, qintptr fd, QSpan<std::byte> destination,
quint64 offset, quintptr userData)
{
@@ -32,8 +85,10 @@ static HRESULT buildReadOperation(HIORING ioRingHandle, qintptr fd, QSpan<std::b
const IORING_BUFFER_REF bufferRef(destination.data());
const auto maxSize = q26::saturate_cast<UINT32>(destination.size());
Q_ASSERT(maxSize == destination.size());
- return BuildIoRingReadFile(ioRingHandle, fileRef, bufferRef, maxSize, offset, userData,
- IOSQE_FLAGS_NONE);
+ const auto *apiTable = QtPrivate::getApiTable();
+ Q_ASSERT(apiTable); // If we got this far it needs to be here
+ return apiTable->BuildIoRingReadFile(ioRingHandle, fileRef, bufferRef, maxSize, offset,
+ userData, IOSQE_FLAGS_NONE);
}
static HRESULT buildWriteOperation(HIORING ioRingHandle, qintptr fd, QSpan<const std::byte> source,
@@ -44,16 +99,18 @@ static HRESULT buildWriteOperation(HIORING ioRingHandle, qintptr fd, QSpan<const
const IORING_BUFFER_REF bufferRef(const_cast<std::byte *>(source.data()));
const auto maxSize = q26::saturate_cast<UINT32>(source.size());
Q_ASSERT(maxSize == source.size());
+ const auto *apiTable = QtPrivate::getApiTable();
+ Q_ASSERT(apiTable); // If we got this far it needs to be here
// @todo: FILE_WRITE_FLAGS can be set to write-through, could be used for Unbuffered mode.
- return BuildIoRingWriteFile(ioRingHandle, fileRef, bufferRef, maxSize, offset,
- FILE_WRITE_FLAGS_NONE, userData, IOSQE_FLAGS_NONE);
+ return apiTable->BuildIoRingWriteFile(ioRingHandle, fileRef, bufferRef, maxSize, offset,
+ FILE_WRITE_FLAGS_NONE, userData, IOSQE_FLAGS_NONE);
}
QIORing::~QIORing()
{
if (initialized) {
CloseHandle(eventHandle);
- CloseIoRing(ioRingHandle);
+ apiTable->CloseIoRing(ioRingHandle);
}
}
@@ -62,8 +119,13 @@ bool QIORing::initializeIORing()
if (initialized)
return true;
+ if (apiTable = QtPrivate::getApiTable(); !apiTable) {
+ qCWarning(lcQIORing, "Failed to retrieve API table");
+ return false;
+ }
+
IORING_CAPABILITIES capabilities;
- QueryIoRingCapabilities(&capabilities);
+ apiTable->QueryIoRingCapabilities(&capabilities);
if (capabilities.MaxVersion < IORING_VERSION_3) // 3 adds write, flush and drain
return false;
if ((capabilities.FeatureFlags & IORING_FEATURE_SET_COMPLETION_EVENT) == 0)
@@ -75,7 +137,8 @@ bool QIORing::initializeIORing()
IORING_CREATE_FLAGS flags;
memset(&flags, 0, sizeof(flags));
- HRESULT hr = CreateIoRing(IORING_VERSION_3, flags, sqEntries, cqEntries, &ioRingHandle);
+ HRESULT hr = apiTable->CreateIoRing(IORING_VERSION_3, flags, sqEntries, cqEntries,
+ &ioRingHandle);
if (FAILED(hr)) {
qErrnoWarning(hr, "failed to initialize QIORing");
return false;
@@ -83,7 +146,7 @@ bool QIORing::initializeIORing()
auto earlyExitCleanup = qScopeGuard([this]() {
if (eventHandle != INVALID_HANDLE_VALUE)
CloseHandle(eventHandle);
- CloseIoRing(ioRingHandle);
+ apiTable->CloseIoRing(ioRingHandle);
});
eventHandle = CreateEvent(nullptr, TRUE, FALSE, nullptr);
if (eventHandle == INVALID_HANDLE_VALUE) {
@@ -91,13 +154,13 @@ bool QIORing::initializeIORing()
return false;
}
notifier.emplace(eventHandle);
- hr = SetIoRingCompletionEvent(ioRingHandle, eventHandle);
+ hr = apiTable->SetIoRingCompletionEvent(ioRingHandle, eventHandle);
if (FAILED(hr)) {
qErrnoWarning(hr, "Failed to assign the event handle to QIORing");
return false;
}
IORING_INFO info;
- if (SUCCEEDED(GetIoRingInfo(ioRingHandle, &info))) {
+ if (SUCCEEDED(apiTable->GetIoRingInfo(ioRingHandle, &info))) {
sqEntries = info.SubmissionQueueSize;
cqEntries = info.CompletionQueueSize;
qCDebug(lcQIORing) << "QIORing configured with capacity for" << sqEntries
@@ -274,7 +337,7 @@ void QIORing::completionReady()
{
ResetEvent(eventHandle);
IORING_CQE entry;
- while (PopIoRingCompletion(ioRingHandle, &entry) == S_OK) {
+ while (apiTable->PopIoRingCompletion(ioRingHandle, &entry) == S_OK) {
// NOLINTNEXTLINE(performance-no-int-to-ptr)
auto *request = reinterpret_cast<GenericRequestType *>(entry.UserData);
if (!addrItMap.contains(request)) {
@@ -458,7 +521,8 @@ void QIORing::submitRequests()
const bool shouldTryWait = std::exchange(queueWasFull, false);
const auto submitToRing = [this, &shouldTryWait] {
quint32 submittedEntries = 0;
- HRESULT hr = SubmitIoRing(ioRingHandle, shouldTryWait ? 1 : 0, 1, &submittedEntries);
+ HRESULT hr = apiTable->SubmitIoRing(ioRingHandle, shouldTryWait ? 1 : 0, 1,
+ &submittedEntries);
qCDebug(lcQIORing) << "Submitted" << submittedEntries << "requests";
unstagedRequests -= submittedEntries;
if (FAILED(hr)) {
@@ -558,9 +622,9 @@ auto QIORing::prepareRequest(GenericRequestType &request) -> RequestPrepResult
auto *closeRequest = request.requestData<Operation::Close>();
// NOLINTNEXTLINE(performance-no-int-to-ptr)
const IORING_HANDLE_REF fileRef(HANDLE(closeRequest->fd));
- hr = BuildIoRingFlushFile(ioRingHandle, fileRef, FILE_FLUSH_MIN_METADATA,
- quintptr(std::addressof(request)),
- IOSQE_FLAGS_DRAIN_PRECEDING_OPS);
+ hr = apiTable->BuildIoRingFlushFile(ioRingHandle, fileRef, FILE_FLUSH_MIN_METADATA,
+ quintptr(std::addressof(request)),
+ IOSQE_FLAGS_DRAIN_PRECEDING_OPS);
break;
}
case Operation::Read: {
@@ -645,9 +709,9 @@ auto QIORing::prepareRequest(GenericRequestType &request) -> RequestPrepResult
auto *flushRequest = request.requestData<Operation::Flush>();
// NOLINTNEXTLINE(performance-no-int-to-ptr)
const IORING_HANDLE_REF fileRef(HANDLE(flushRequest->fd));
- hr = BuildIoRingFlushFile(ioRingHandle, fileRef, FILE_FLUSH_DEFAULT,
- quintptr(std::addressof(request)),
- IOSQE_FLAGS_DRAIN_PRECEDING_OPS);
+ hr = apiTable->BuildIoRingFlushFile(ioRingHandle, fileRef, FILE_FLUSH_DEFAULT,
+ quintptr(std::addressof(request)),
+ IOSQE_FLAGS_DRAIN_PRECEDING_OPS);
break;
}
case QtPrivate::Operation::Stat: {
@@ -703,8 +767,8 @@ auto QIORing::prepareRequest(GenericRequestType &request) -> RequestPrepResult
}
// NOLINTNEXTLINE(performance-no-int-to-ptr)
const IORING_HANDLE_REF fileRef((HANDLE(fd)));
- hr = BuildIoRingCancelRequest(ioRingHandle, fileRef, quintptr(otherOperation),
- quintptr(std::addressof(request)));
+ hr = apiTable->BuildIoRingCancelRequest(ioRingHandle, fileRef, quintptr(otherOperation),
+ quintptr(std::addressof(request)));
break;
}
case Operation::NumOperations:
diff --git a/src/corelib/kernel/qmetacontainer.h b/src/corelib/kernel/qmetacontainer.h
index c9d3a6bf9c6..66047afefd4 100644
--- a/src/corelib/kernel/qmetacontainer.h
+++ b/src/corelib/kernel/qmetacontainer.h
@@ -971,18 +971,11 @@ public:
Iterator mutableEnd();
QVariant at(qsizetype idx) const;
- void set(qsizetype idx, const QVariant &value);
+ void setAt(qsizetype idx, const QVariant &value);
void append(const QVariant &value);
void prepend(const QVariant &value);
void removeLast();
void removeFirst();
-
-#if QT_DEPRECATED_SINCE(6, 11)
- enum Position: quint8 { Unspecified, AtBegin, AtEnd };
- void addValue(const QVariant &value, Position position = Unspecified);
- void removeValue(Position position = Unspecified);
- QMetaType valueMetaType() const;
-#endif // QT_DEPRECATED_SINCE(6, 11)
};
#else
using Iterable = QtMetaContainerPrivate::Sequence;
diff --git a/src/corelib/kernel/qmetasequence.cpp b/src/corelib/kernel/qmetasequence.cpp
index 2a3a923d5ca..018dd610146 100644
--- a/src/corelib/kernel/qmetasequence.cpp
+++ b/src/corelib/kernel/qmetasequence.cpp
@@ -531,39 +531,6 @@ void QMetaSequence::valueAtConstIterator(const void *iterator, void *result) con
*/
/*!
- \enum QMetaSequence::Iterable::Position
- \deprecated [6.11] Use append(), prepend(), removeFirst(), or removeLast()
-
- Specifies the position at which an element shall be added to or removed from
- the iterable.
-
- \value AtBegin
- Add or remove at the beginning of the iterable.
- \value AtEnd
- Add or remove at the end of the iterable.
- \value Unspecified
- Add or remove at an unspecified position in the iterable.
- */
-
-/*!
- \fn void QMetaSequence::Iterable::addValue(const QVariant &value, Position position)
- \deprecated [6.11] Use append() or prepend()
- Adds \a value to the container, at \a position, if possible.
- */
-
-/*!
- \deprecated [6.11] Use removeFirst() or removeLast()
- \fn void QMetaSequence::Iterable::removeValue(Position position)
- Removes a value from the container, at \a position, if possible.
- */
-
-/*!
- \deprecated [6.11] Use QMetaSequence::valueMetaType()
- \fn QMetaType QMetaSequence::Iterable::valueMetaType() const
- Returns the meta type for values stored in the underlying container.
- */
-
-/*!
\fn QVariant QMetaSequence::Iterable::at(qsizetype idx) const
Returns the value at position \a idx in the container.
@@ -574,13 +541,8 @@ void QMetaSequence::valueAtConstIterator(const void *iterator, void *result) con
*/
/*!
- \fn void QMetaSequence::Iterable::set(qsizetype idx, const QVariant &value)
+ \fn void QMetaSequence::Iterable::setAt(qsizetype idx, const QVariant &value)
Sets the element at position \a idx in the container to \a value.
-
- \note If the underlying container does not provide a native way to assign
- an element at an index, this method will synthesize the assignment
- using iterators. This behavior is deprecated and will be removed in a
- future version of Qt.
*/
/*!
diff --git a/src/corelib/kernel/qmetasequence.h b/src/corelib/kernel/qmetasequence.h
index 26156e7924f..f8052476d79 100644
--- a/src/corelib/kernel/qmetasequence.h
+++ b/src/corelib/kernel/qmetasequence.h
@@ -196,25 +196,11 @@ public:
});
}
- void set(qsizetype idx, const QVariant &value)
+ void setAt(qsizetype idx, const QVariant &value)
{
const QMetaSequence meta = metaContainer();
QtPrivate::QVariantTypeCoercer coercer;
- const void *dataPtr = coercer.coerce(value, meta.valueMetaType());
- if (meta.canSetValueAtIndex()) {
- meta.setValueAtIndex(mutableIterable(), idx, dataPtr);
- return;
- }
-
-#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
- // We shouldn't second-guess the underlying container
- QtPrivate::warnSynthesizedAccess(
- "set() called on an iterable without native indexed accessors. This is slow");
- void *it = meta.begin(m_iterable.mutablePointer());
- meta.advanceIterator(it, idx);
- meta.setValueAtIterator(it, dataPtr);
- meta.destroyIterator(it);
-#endif
+ meta.setValueAtIndex(mutableIterable(), idx, coercer.coerce(value, meta.valueMetaType()));
}
void append(const QVariant &value)
@@ -261,6 +247,9 @@ public:
QMetaType valueMetaType() const
Q_DECL_EQ_DELETE_X("Use QMetaSequence::valueMetaType() instead.");
+ void set(qsizetype idx, const QVariant &value)
+ Q_DECL_EQ_DELETE_X("Use setAt() instead.");
+
QT_WARNING_POP
#endif // QT_DEPRECATED_SINCE(6, 11)
};
diff --git a/src/network/access/qnetworkaccesscache.cpp b/src/network/access/qnetworkaccesscache.cpp
index 6ff70cd546d..1f2bbd321cf 100644
--- a/src/network/access/qnetworkaccesscache.cpp
+++ b/src/network/access/qnetworkaccesscache.cpp
@@ -176,18 +176,6 @@ void QNetworkAccessCache::updateTimer()
timer.start(interval + 10, this);
}
-bool QNetworkAccessCache::emitEntryReady(Node *node, QObject *target, const char *member)
-{
- if (!connect(this, SIGNAL(entryReady(QNetworkAccessCache::CacheableObject*)),
- target, member, Qt::QueuedConnection))
- return false;
-
- emit entryReady(node->object);
- disconnect(SIGNAL(entryReady(QNetworkAccessCache::CacheableObject*)));
-
- return true;
-}
-
void QNetworkAccessCache::timerEvent(QTimerEvent *)
{
while (firstExpiringNode && firstExpiringNode->timer.hasExpired()) {
diff --git a/src/network/access/qnetworkaccesscache_p.h b/src/network/access/qnetworkaccesscache_p.h
index 4d4ff325f98..5d7dc819461 100644
--- a/src/network/access/qnetworkaccesscache_p.h
+++ b/src/network/access/qnetworkaccesscache_p.h
@@ -69,9 +69,6 @@ public:
void releaseEntry(const QByteArray &key);
void removeEntry(const QByteArray &key);
-signals:
- void entryReady(QNetworkAccessCache::CacheableObject *);
-
protected:
void timerEvent(QTimerEvent *) override;
@@ -86,7 +83,6 @@ private:
void linkEntry(const QByteArray &key);
bool unlinkEntry(const QByteArray &key);
void updateTimer();
- bool emitEntryReady(Node *node, QObject *target, const char *member);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkAccessCache::CacheableObject::Options)
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 29cafe9aea4..f3db4ece49e 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -305,9 +305,7 @@ namespace QTest {
{
static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(QTest::maxWarnings);
- auto loggerCapture = loggers->allLoggers();
-
- if (loggerCapture.isEmpty()) {
+ if (loggers.isDestroyed() || loggers->allLoggers().isEmpty()) {
// the message handler may be called from a worker thread, after the main thread stopped
// logging. Forwarding to original message handler to avoid swallowing the message
Q_ASSERT(oldMessageHandler);
@@ -326,6 +324,8 @@ namespace QTest {
return;
}
+ auto loggerCapture = loggers->allLoggers();
+
if (type != QtFatalMsg) {
if (counter.loadRelaxed() <= 0)
return;