linuxfb plugin: eradicate Q_FOREACH loops

... by replacing them with C++11 range-for loops.

Then mark the plugin as QT_NO_FOREACH.

Change-Id: I80a18334b1e0c5bbd44dfe45eea80591d478a8d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Marc Mutz 2016-08-17 10:11:45 +02:00
parent dd0daa73f5
commit 829c59aa4a
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
TARGET = qlinuxfb
DEFINES += QT_NO_FOREACH
QT += core-private gui-private platformsupport-private
SOURCES = main.cpp qlinuxfbintegration.cpp qlinuxfbscreen.cpp

View File

@ -320,7 +320,7 @@ bool QLinuxFbScreen::initialize()
bool doSwitchToGraphicsMode = true;
// Parse arguments
foreach (const QString &arg, mArgs) {
for (const QString &arg : qAsConst(mArgs)) {
QRegularExpressionMatch match;
if (arg == QLatin1String("nographicsmodeswitch"))
doSwitchToGraphicsMode = false;