Diffstat (limited to 'noncore/unsupported/mailit/addresslist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/addresslist.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp index 1cf2562..43e3830 100644 --- a/noncore/unsupported/mailit/addresslist.cpp +++ b/noncore/unsupported/mailit/addresslist.cpp | |||
@@ -21,2 +21,4 @@ | |||
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #include <opie/ocontactaccess.h> | ||
23 | #include <opie/ocontact.h> | ||
22 | 24 | ||
@@ -118,6 +120,18 @@ void AddressList::read() | |||
118 | { | 120 | { |
119 | QFile f(filename); | 121 | OContactAccess::List::Iterator it; |
122 | |||
123 | //QFile f(filename); | ||
120 | QString lineEmail, lineName, email, name; | 124 | QString lineEmail, lineName, email, name; |
125 | OContactAccess m_contactdb("mailit"); | ||
126 | OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); | ||
127 | //OContact* oc; | ||
121 | 128 | ||
122 | if (! f.open(IO_ReadOnly) ) | 129 | for ( it = m_list.begin(); it != m_list.end(); ++it ) |
130 | { | ||
131 | //oc=(OContact*) it; | ||
132 | if ((*it).defaultEmail().length()!=0) | ||
133 | addContact((*it).defaultEmail(),(*it).fullName()); | ||
134 | } | ||
135 | |||
136 | /*if (! f.open(IO_ReadOnly) ) | ||
123 | return; | 137 | return; |
@@ -136,3 +150,3 @@ void AddressList::read() | |||
136 | } | 150 | } |
137 | f.close(); | 151 | f.close();*/ |
138 | } | 152 | } |