[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/groupphoto
From: André Wöbbeking <woebbeking () kde ! org>
Date: 2007-10-06 22:26:23
Message-ID: 1191709583.911860.12278.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 722211 by woebbe:
fixed readNames(): the html files are utf-8 encoded
M +5 -6 groupphoto.cpp
--- trunk/playground/base/plasma/applets/groupphoto/groupphoto.cpp #722210:722211
@@ -141,14 +141,13 @@
return;
}
- QTextStream in(&file);
- while (!in.atEnd()) {
- QString line = in.readLine();
+ while (!file.atEnd()) {
+ const QByteArray line = file.readLine();
if (line.startsWith(" <area shape=\"circle\" title=\"")) {
- QStringList parts = line.split("\"");
- QStringList coords = parts[5].split(",");
+ const QList<QByteArray> parts = line.split('"');
+ const QList<QByteArray> coords = parts[5].split(',');
_person* person = new _person;
- person->name = parts[3];
+ person->name = QString::fromUtf8(parts[3]);
person->x = coords[0].toInt();
person->y = coords[1].toInt();
person->width = coords[2].toInt();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic