Doc: Streamline overload documentation

The signals and slots syntax documentation previously contained detailed
examples for connecting to overloaded functions, but comprehensive
overload connection guidance has now been moved to the main signals and
slots documentation in qtbase. This created content duplication and
potential maintenance issues across the documentation set.

This change removes the duplicate detailed examples and replaces them
with a clear reference to the comprehensive documentation. The existing
snippet demonstrating basic overload syntax remains, but the extensive
explanatory content now defers to the authoritative source in qtbase.
This eliminates redundancy while maintaining the document's focus on
syntax differences between connection approaches.

The change also removes references to older C++ standards since Qt 6
requires C++17, ensuring the documentation reflects current requirements.

Task-number: QTBUG-89600
Pick-to: 6.8
Change-Id: I35c25f6969086cd872343ab13a7577e3ba460115
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
(cherry picked from commit 66fc052754)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fe365cedcc)
This commit is contained in:
Paul Wicking 2025-08-11 21:33:48 +02:00 committed by Qt Cherry-pick Bot
parent 441604c7be
commit 4c74b2ee69
1 changed files with 8 additions and 4 deletions

View File

@ -76,10 +76,9 @@ types are not part of the connection.
\snippet snippets/signalsandslots/signalslotsyntaxes.cpp typeresolution
\section1 Making Connections to Lambda Expressions
The functor-based connection syntax can connect signals to C++11 lambda expressions,
The functor-based connection syntax can connect signals to lambda expressions,
which are effectively inline slots. This feature is not available with the
string-based syntax.
@ -162,8 +161,8 @@ to Lambda Expressions}.
With the string-based syntax, parameter types are explicitly specified. As a
result, the desired instance of an overloaded signal or slot is unambiguous.
In contrast, with the functor-based syntax, an overloaded signal or slot must
be cast to tell the compiler which instance to use.
In contrast, with the functor-based syntax, you must explicitly specify which
version of an overloaded signal or slot you want to connect to.
For example, \l QLCDNumber has three versions of the \c display() slot:
\list 1
@ -176,6 +175,11 @@ To connect the \c int version to QSlider::valueChanged(), the two syntaxes are:
\snippet snippets/signalsandslots/signalslotsyntaxes.cpp overload
For comprehensive examples of connecting to overloaded signals and slots
using qOverload(), static_cast, and lambdas,
see \l{Connecting to Overloaded Signals and Slots}.
\sa qOverload()
*/