summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoverload.qdoc
blob: f11e2664838b460c7a86287fb1f2894e292abdf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*! \fn template <typename T> auto qOverload(T functionPointer)
    \relates <QOverload>
    \since 5.7

    Returns a pointer to an overloaded function. The template
    parameter is the list of the argument types of the function.
    \a functionPointer is the pointer to the (member) function:

    \snippet code/src_corelib_global_qglobal.cpp 52

    If a member function is also const-overloaded \l qConstOverload and
    \l qNonConstOverload need to be used.

    \sa qConstOverload(), qNonConstOverload(), {Differences between String-Based
    and Functor-Based Connections}
*/

/*! \fn template <typename T> auto qConstOverload(T memberFunctionPointer)
    \relates <QOverload>
    \since 5.7

    Returns the \a memberFunctionPointer pointer to a constant member function:

    \snippet code/src_corelib_global_qglobal.cpp 54

    \sa qOverload, qNonConstOverload, {Differences between String-Based
    and Functor-Based Connections}
*/

/*! \fn template <typename T> auto qNonConstOverload(T memberFunctionPointer)
    \relates <QOverload>
    \since 5.7

    Returns the \a memberFunctionPointer pointer to a non-constant member function:

    \snippet code/src_corelib_global_qglobal.cpp 54

    \sa qOverload, qNonConstOverload, {Differences between String-Based
    and Functor-Based Connections}
*/