diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2017-01-07 21:58:01 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-24 17:31:25 +0200 |
| commit | fd42589b14041d620c51fd7d23877c2749767fb3 (patch) | |
| tree | 3e3c5342c73d418687ddd137108ba5f18e2b24d4 /examples/opengl/qopenglwindow/background_renderer.h | |
| parent | ca5fc087bdc94fad14f8edce89cfe171858260dc (diff) | |
Extend QString::arg(QString, ..., QString) to more than 9 arguments
Now that we have QStringView::arg(), we can use it to implement a
similarly flexible QString::arg(). It's not as straight-forward as in
QStringView, though: QString has existing arg() overloads that all
become worse matches with the introduction of the new,
perfectly-forwarding overload.
So in order to allow calling of the other arg() functions, first
constrain the new arg() function to arguments that are convertible to
QString, QStringView, or QLatin1String, and then delegate to the
QStringView version. To stay compatible with the previous overloads,
which accepted anything that implicitly converts to QString (in
particular, QStringBuilder expressions), add a new overload of
qStringLikeToView, taking const QString &. This benefits the existing
QStringView and QLatin1View versions, too.
[ChangeLog][QtCore][QString] QString::arg(QString, ..., QString) can
now be called with more than nine arguments, as well as with
QStringViews.
Change-Id: I1e717a1bc696346808bcae45dc47762a492c8714
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/opengl/qopenglwindow/background_renderer.h')
0 files changed, 0 insertions, 0 deletions
