From 4e8d085f96da8af3c0ef1e0d3c1ec6531a4759ac Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sat, 7 Nov 2015 08:38:43 -0600 Subject: Fix about box. Windows build uncovered a bad assumption about QTextStream supporting atEnd(), and the stream needed to be explicitly set to UTF-8. --- quacker/quacker.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'quacker') 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 += "
  • " + line.mid(pos + 1) + "
  • "; + line = strm.readLine(); } fclose(file); aboutText += ""; -- cgit v1.2.3