From 4172b33b1222a586d95dbc7e69dad7a19a307ea1 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Tue, 14 May 2019 17:15:11 +0200 Subject: Replace Q_FOREACH (foreach) by C++11 ranged for-loops Q_FOREACH is bad and will be deprecated in the future: https://www.kdab.com/goodbye-q_foreach/ This also disables Q_FOREACH by defining QT_NO_FOREACH. --- src/client/QXmppInvokable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/QXmppInvokable.cpp') diff --git a/src/client/QXmppInvokable.cpp b/src/client/QXmppInvokable.cpp index 91c646db..f315186d 100644 --- a/src/client/QXmppInvokable.cpp +++ b/src/client/QXmppInvokable.cpp @@ -97,7 +97,7 @@ QVariant QXmppInvokable::dispatch( const QByteArray & method, const QList< QVari QList< QByteArray > QXmppInvokable::paramTypes( const QList< QVariant > & params ) { QList types; - foreach( QVariant variant, params) + for (const auto &variant : qAsConst(params)) types << variant.typeName(); return types; } -- cgit v1.2.3