Diffstat (limited to 'noncore/net/mailit/addresslist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/addresslist.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp index 43e3830..9fe558a 100644 --- a/noncore/net/mailit/addresslist.cpp +++ b/noncore/net/mailit/addresslist.cpp @@ -25,8 +25,7 @@ #include "addresslist.h" -AddressList::AddressList(QString file) +AddressList::AddressList() { addresses.setAutoDelete(TRUE); - filename = file; read(); dirty = FALSE; @@ -35,5 +34,4 @@ AddressList::AddressList(QString file) AddressList::~AddressList() { - write(); addresses.clear(); } @@ -121,5 +119,4 @@ void AddressList::read() OContactAccess::List::Iterator it; - //QFile f(filename); QString lineEmail, lineName, email, name; OContactAccess m_contactdb("mailit"); @@ -163,19 +160,2 @@ QString AddressList::getRightString(QString in) } -void AddressList::write() -{ - if ( (addresses.count() == 0) || (!dirty) ) - return; - - QFile f(filename); - if (! f.open(IO_WriteOnly) ) - return; - - QTextStream stream(&f); - Contact *ptr; - for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) { - stream << "email = " + ptr->email + "\n"; - stream << "name = " + ptr->name + "\n"; - } - f.close(); -} |