diff options
author | John Fultz <jfultz@wolfram.com> | 2015-11-07 08:38:43 -0600 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2015-11-07 08:38:43 -0600 |
commit | 4e8d085f96da8af3c0ef1e0d3c1ec6531a4759ac (patch) | |
tree | e402ca3ee7b0be5052e9b7d2af8276adfe324160 /quacker/quacker.cpp | |
parent | fd68f76c1311aa40612d8502b83df84c931812be (diff) |
Fix about box.
Windows build uncovered a bad assumption about QTextStream
supporting atEnd(), and the stream needed to be explicitly set to
UTF-8.
Diffstat (limited to 'quacker/quacker.cpp')
-rw-r--r-- | quacker/quacker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/quacker/quacker.cpp b/quacker/quacker.cpp index 2f407fa..e42ebc0 100644 --- a/quacker/quacker.cpp +++ b/quacker/quacker.cpp @@ -2134,12 +2134,14 @@ void TopLevel::about() if (file) { QTextStream strm(file); - while (!strm.atEnd()) + strm.setCodec("UTF-8"); + QString line = strm.readLine(); + while (!line.isNull()) { - QString line = strm.readLine(); int pos = line.indexOf(':'); if (pos != -1 && pos + 1 < line.size()) aboutText += "<li>" + line.mid(pos + 1) + "</li>"; + line = strm.readLine(); } fclose(file); aboutText += "</ul>"; |