Simplify and constrain route API


The route convenience method of QHttpServer was a purely variadic
template function. However, it expected a strict syntax of (QString,
Method, Rule parameters..., Functor). The Rule parameters are
forwarded to the constructor of the Rule that is created. This was
not documented.

The Functor is expected to follow some rules too. This is checked by
QHttpServerRouterViewTraits.

This change expresses the synatax in the function declaration as
(QString, Method, Functor) and removes the possibility to forward
parameters to the constructor of rule. The route method now returns a
pointer to the new rule, which can be used to set parameters instead.

Constraints to the Functor are still checked by QHttp...ViewTraits.

Pick-to: 6.8
Task-Id: QTBUG-128113
Change-Id: Id3d075a46e86169521bafd3ecb4c9c58ba8dff2c
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
commit962d95298f47c189b0f734bbf2f7df314c68e08e
parent8141c506433d4526bea74cf5a2e534472347d06c
authorMatthias Rauter <matthias.rauter@qt.io>
committerMatthias Rauter <matthias.rauter@qt.io>
commit timeTue, 27 Aug 2024 20:18:50 +0200