--- 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 <QDataStream> #include <QMessageBox> #include <QProcess> +#include <errno.h> #include <commonlib/misc.h> #include <commonlib/config.h> #include <commonlib/version.h> @@ -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 += "<br />"; - pwadtext += wad; + pwadtext += wads[i]; } QDialog* dlg = new QDialog;