author | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
commit | 8cc217bed9c122a7c7448e2cd59bfde330dfcfad (patch) (unidiff) | |
tree | f802c03bbddf54ecc541ce23bdc43da0fc8b390b /noncore/unsupported/mailit/addresslist.cpp | |
parent | 64d6b3e723b9b2fc3b1f3eea6da6344c5f26ce1e (diff) | |
download | opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.zip opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.gz opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.bz2 |
- Uses mime types for attachment reading
- Addresses are read from ocontactacess
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 | |||
@@ -19,6 +19,8 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qfile.h> | 20 | #include <qfile.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #include <opie/ocontactaccess.h> | ||
23 | #include <opie/ocontact.h> | ||
22 | 24 | ||
23 | #include "addresslist.h" | 25 | #include "addresslist.h" |
24 | 26 | ||
@@ -116,10 +118,22 @@ QList<Contact>* AddressList::getContactList() | |||
116 | 118 | ||
117 | void AddressList::read() | 119 | 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; |
124 | 138 | ||
125 | QTextStream stream(&f); | 139 | QTextStream stream(&f); |
@@ -134,7 +148,7 @@ void AddressList::read() | |||
134 | name = getRightString(lineName); | 148 | name = getRightString(lineName); |
135 | addContact(email, name); | 149 | addContact(email, name); |
136 | } | 150 | } |
137 | f.close(); | 151 | f.close();*/ |
138 | } | 152 | } |
139 | 153 | ||
140 | QString AddressList::getRightString(QString in) | 154 | QString AddressList::getRightString(QString in) |