diff -r 4a0ad0a08ea1 -r e121ea9dba93 launcher/demo.cpp --- a/launcher/demo.cpp Sat Jun 06 23:13:41 2015 +0300 +++ b/launcher/demo.cpp Sat Jun 06 23:17:33 2015 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -37,18 +38,20 @@ QString out; int skip = 0; - for (QChar c : in) + for (int i = 0; i < in.length(); ++i) { if (skip-- > 0) continue; - if (c == QChar ('\034')) + QChar ch = in[i]; + + if (ch == QChar ('\034')) { skip = 1; continue; } - out += c; + out += ch; } return out; @@ -305,8 +308,9 @@ QStringList pwadpaths; // Find the WADs - for (const QString& wad : wads) + for (int i = 0; i < wads.size(); ++i) { + const QString& wad = wads[i]; QString path = findWAD (wad); // WAD names are case-sensitive under non-Windows and they can appear in uppercase @@ -330,15 +334,15 @@ { QString pwadtext; - for (const QString& wad : wads) + for (int i = 0; i < wads.size(); ++i) { - if (&wad == &wads.first()) + if (i == 0) continue; // skip the IWAD if (not pwadtext.isEmpty()) pwadtext += "
"; - pwadtext += wad; + pwadtext += wads[i]; } QDialog* dlg = new QDialog;