Diffstat (limited to 'noncore/unsupported/mail2/addresspicker.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/addresspicker.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/addresspicker.cpp b/noncore/unsupported/mail2/addresspicker.cpp index 7f32725..a97b33f 100644 --- a/noncore/unsupported/mail2/addresspicker.cpp +++ b/noncore/unsupported/mail2/addresspicker.cpp @@ -15,24 +15,25 @@ AddressPicker::AddressPicker(QWidget *parent, const char *name, bool modal, { okButton->setIconSet(Resource::loadPixmap("enter")); cancelButton->setIconSet(Resource::loadPixmap("editdelete")); connect(okButton, SIGNAL(clicked()), SLOT(accept())); connect(cancelButton, SIGNAL(clicked()), SLOT(close())); QFile f((QString) getenv("HOME") + "/Applications/" + "addressbook/addressbook.xml"); if (f.open(IO_ReadOnly)) { QTextStream stream(&f); + stream.setEncoding( QTextStream::UnicodeUTF8 ); QString content; while (!f.atEnd()) content += stream.readLine() + "\n"; QStringList lines = QStringList::split(QRegExp("\\n"), content); QStringList::Iterator it; for (it = lines.begin(); it != lines.end(); it++) { if ((*it).find(QRegExp("^<Contact.*")) != -1) { int pos = (*it).find("FirstName=\""); QString fname; if (pos != -1) { int i = 1; QChar c; while (c != '"') { |