summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2014-09-24 23:24:18 +0800
committerSze Howe Koh <szehowe.koh@gmail.com>2014-09-25 01:44:03 +0200
commit28618df85874c4bc3091aac5d901d3732eb193fb (patch)
tree96491ef14813d6d2ac9a1504bae6f0c33c238eca
parentdb212af33e4d9dbadf1c859dba8d714ff6f3daab (diff)
Doc: Suggest an alternative to connections with default params
The new signal-slot connection syntax does not support default parameters. Lambda functions are a suitable replacement. Change-Id: I906856104d582c1139c4b78b885566156c7f2f78 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--doc/src/signalslotsyntaxes.qdoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/src/signalslotsyntaxes.qdoc b/doc/src/signalslotsyntaxes.qdoc
index e4009a69f..0ff5ed7c5 100644
--- a/doc/src/signalslotsyntaxes.qdoc
+++ b/doc/src/signalslotsyntaxes.qdoc
@@ -179,6 +179,10 @@ to QApplication::aboutToQuit(), even though the latter has no arguments. The
functor-based connection will produce a compile-time error:
\snippet snippets/signalsandslots/signalslotsyntaxes.cpp defaultparams
+To work around this limitation with the functor-based syntax, connect the signal to
+a lambda function that calls the slot. See the section above, \l{Making Connections
+to Lambda Expressions}.
+
\section1 Selecting Overloaded Signals and Slots