Skip to content

Commit

Permalink
winmain: port the last remaining Q_FOREACH loop and add QT_NO_FOREACH
Browse files Browse the repository at this point in the history
Port the last remaining Q_FOREACH (over a QVarLengthArray,
no less) in winmain to C++11 range-for and mark the library
as Q_FOREACH-free, using QT_NO_FOREACH.

Change-Id: Ic561080f7dd61d1d853ceb9e211c9b8a23bf05a5
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Maurice Kalinowski <[email protected]>
  • Loading branch information
marc-kdab committed May 12, 2016
1 parent d70205c commit 99ca471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/winmain/qtmain_winrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class AppContainer : public RuntimeClass<Xaml::IApplicationOverrides>

bool develMode = false;
bool debugWait = false;
foreach (const char *arg, args) {
for (const char *arg : args) {
if (strcmp(arg, "-qdevel") == 0)
develMode = true;
if (strcmp(arg, "-qdebug") == 0)
Expand Down
2 changes: 2 additions & 0 deletions src/winmain/winmain.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ DESTDIR = $$QT.core.libs
CONFIG += static
QT = core

DEFINES += QT_NO_FOREACH

contains(QT_CONFIG, build_all):CONFIG += build_all

win32-msvc*:QMAKE_CFLAGS_DEBUG -= -Zi
Expand Down

0 comments on commit 99ca471

Please sign in to comment.