author | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
commit | e16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (unidiff) | |
tree | 9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/unsupported/mail2/addresspicker.cpp | |
parent | 1c58d1407f9584fedcdae390a04e2b37e5853361 (diff) | |
download | opie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/unsupported/mail2/addresspicker.cpp') (more/less context) (ignore 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, | |||
15 | { | 15 | { |
16 | okButton->setIconSet(Resource::loadPixmap("enter")); | 16 | okButton->setIconSet(Resource::loadPixmap("enter")); |
17 | cancelButton->setIconSet(Resource::loadPixmap("editdelete")); | 17 | cancelButton->setIconSet(Resource::loadPixmap("editdelete")); |
18 | 18 | ||
19 | connect(okButton, SIGNAL(clicked()), SLOT(accept())); | 19 | connect(okButton, SIGNAL(clicked()), SLOT(accept())); |
20 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); | 20 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); |
21 | 21 | ||
22 | QFile f((QString) getenv("HOME") + "/Applications/" | 22 | QFile f((QString) getenv("HOME") + "/Applications/" |
23 | + "addressbook/addressbook.xml"); | 23 | + "addressbook/addressbook.xml"); |
24 | 24 | ||
25 | if (f.open(IO_ReadOnly)) { | 25 | if (f.open(IO_ReadOnly)) { |
26 | QTextStream stream(&f); | 26 | QTextStream stream(&f); |
27 | stream.setEncoding( QTextStream::UnicodeUTF8 ); | ||
27 | QString content; | 28 | QString content; |
28 | while (!f.atEnd()) content += stream.readLine() + "\n"; | 29 | while (!f.atEnd()) content += stream.readLine() + "\n"; |
29 | QStringList lines = QStringList::split(QRegExp("\\n"), content); | 30 | QStringList lines = QStringList::split(QRegExp("\\n"), content); |
30 | QStringList::Iterator it; | 31 | QStringList::Iterator it; |
31 | for (it = lines.begin(); it != lines.end(); it++) { | 32 | for (it = lines.begin(); it != lines.end(); it++) { |
32 | if ((*it).find(QRegExp("^<Contact.*")) != -1) { | 33 | if ((*it).find(QRegExp("^<Contact.*")) != -1) { |
33 | int pos = (*it).find("FirstName=\""); | 34 | int pos = (*it).find("FirstName=\""); |
34 | QString fname; | 35 | QString fname; |
35 | if (pos != -1) { | 36 | if (pos != -1) { |
36 | int i = 1; | 37 | int i = 1; |
37 | QChar c; | 38 | QChar c; |
38 | while (c != '"') { | 39 | while (c != '"') { |