kdeconnect-kde/tests
Jean Vincent c864267f04 Replace Q_FOREACH with C++11 range-for
Summary:
The use of Q_FOREACH is advised against (https://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH) since Qt 5.7 and will eventually be removed from Qt.

I replaced all occurrences with the range-for loop introduced in C++11 (except for the one in daemon.cpp in deviceIdByName which might have a bug / typo in it).

I added const to the container or casted it with qAsConst when appropriate to avoid unnecessary copies.

(This is my first submission. I did all the unit tests, and they all passed but I don't know how to show it here.)

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: albertvaka, apol, nicolasfella

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6724
2017-07-21 09:57:19 +02:00
..
CMakeLists.txt Fixed build on windows 2016-06-09 02:36:02 +02:00
devicetest.cpp Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
downloadjobtest.cpp fix compilation with gcc 4.8 2017-01-15 22:12:49 +01:00
kdeconnectconfigtest.cpp Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
lanlinkprovidertest.cpp Now a 100% more compiling 2017-02-14 23:03:59 +01:00
networkpackagetests.cpp Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
networkpackagetests.h Merge branch 'master' into sslrefactor 2016-06-01 12:20:07 +02:00
pluginloadtest.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
sendfiletest.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
testdaemon.h Expose pairing state for devices 2017-01-25 00:22:22 +01:00
testnotificationlistener.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
testsocketlinereader.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
testsslsocketlinereader.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00