kdeconnect-kde/core
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
..
backends Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
CMakeLists.txt Make Bluetooth optional 2017-05-24 23:54:59 +02:00
core_debug.cpp Define the debug category in core_debug.cpp 2016-11-28 15:57:58 +01:00
core_debug.h Added debug function to print a stack trace 2016-06-01 12:43:34 +02:00
daemon.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
daemon.h Added an option to the cli to return your own device id 2017-02-24 22:37:22 +01:00
dbushelper.cpp Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
dbushelper.h Fix various krazy2 warnings 2015-08-21 22:38:54 +06:00
device.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
device.h Expose pair requests on the KCM 2017-02-20 21:00:26 +01:00
filetransferjob.cpp Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
filetransferjob.h Fixed filetransferjob broken after adding icons. 2017-05-07 20:16:19 +02:00
kdeconnectconfig.cpp Trust the name stored in the certificate 2017-07-14 00:19:26 +02:00
kdeconnectconfig.h Fixed QStrings not being passed by ref 2016-11-26 16:36:34 +01:00
kdeconnectplugin.cpp Reduce API exposed through dbus 2017-01-10 18:15:01 +01:00
kdeconnectplugin.h Reduce API exposed through dbus 2017-01-10 18:15:01 +01:00
kdeconnectpluginconfig.cpp Do not use a location under home as mount point 2017-02-18 16:14:51 +01:00
kdeconnectpluginconfig.h Do not use a location under home as mount point 2017-02-18 16:14:51 +01:00
Messages.sh Figure out Messages.sh after code refactoring 2014-06-17 18:45:47 +02:00
networkpackage.cpp Coding style 2017-07-14 00:19:56 +02:00
networkpackage.h Remove commented code 2016-07-06 00:59:37 +02:00
networkpackagetypes.h Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
pluginloader.cpp Replace Q_FOREACH with C++11 range-for 2017-07-21 09:57:19 +02:00
pluginloader.h Make capabilities static 2016-07-06 17:37:22 +02:00