summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoverload.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qoverload.qdoc')
-rw-r--r--src/corelib/global/qoverload.qdoc43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/corelib/global/qoverload.qdoc b/src/corelib/global/qoverload.qdoc
new file mode 100644
index 0000000000..f11e266483
--- /dev/null
+++ b/src/corelib/global/qoverload.qdoc
@@ -0,0 +1,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}
+*/