summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfontdialog.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-11-03 18:17:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-06 18:43:14 +0100
commit029cc40c2ac2f6f1013020f6af5e63b46a7a8317 (patch)
tree4adf821002592864d57b71d7a1162848ff4a9aa2 /src/widgets/dialogs/qfontdialog.cpp
parent202bfbceda8b22da40810ada0c42ecf37083c9f7 (diff)
Allow connect to functors with less parameters than the signal
Before, the functor slot (or lambda expression) had to have the same amount of arguments as the signal. This shown to be a big problem to be able to connect to signals that had a QPrivateSlot. This implementation use the type of the operator() of the functor to know how many arguments we have. As a bonus, we also can check the arguments in a static assert. The test comes from https://codereview.qt-project.org/#change,38703 But this patch also works without variadic template If the compiler does not support decltype, we workaround the lack of it by using another level of indirection. Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfontdialog.cpp')
0 files changed, 0 insertions, 0 deletions