From 17eb1432b02532b8ab62bdf1671cb6d9e4aa13c8 Mon Sep 17 00:00:00 2001 From: Dheerendra Purohit Date: Fri, 6 Jun 2025 12:43:37 +0530 Subject: [PATCH] Doc: Fix QtConcurrent::run member function parameter order documentation Updated the description to match Qt 6 behavior, clarifying that the instance argument now follows the member function pointer. Fixes: QTBUG-113401 Pick-to: 6.9 6.8 Change-Id: I6cb9c63718790eda153bc5202ed4eb1d23f032bc Reviewed-by: Axel Spoerl (cherry picked from commit 60841478d3a5de10f279c77f3c722d666c51656a) Reviewed-by: Qt Cherry-pick Bot --- src/concurrent/qtconcurrentrun.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp index 3ea1692c270..513699cdc5d 100644 --- a/src/concurrent/qtconcurrentrun.cpp +++ b/src/concurrent/qtconcurrentrun.cpp @@ -97,10 +97,11 @@ \section3 Using Member Functions - QtConcurrent::run() also accepts pointers to member functions. The first - argument must be either a const reference or a pointer to an instance of - the class. Passing by const reference is useful when calling const member - functions; passing by pointer is useful for calling non-const member + QtConcurrent::run() also accepts pointers to member functions. + In Qt 6, the first argument must be the pointer to the member function, + followed by either a const reference or a pointer to an instance of the + class. Passing a const reference is useful when calling const member + functions; passing a pointer is useful for calling non-const member functions that modify the instance. For example, calling QByteArray::split() (a const member function) in a