Diffstat (limited to 'noncore/net/mailit/addresslist.cpp') (more/less context) (show 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 @@ -26,6 +26,5 @@ -AddressList::AddressList(QString file) +AddressList::AddressList() { addresses.setAutoDelete(TRUE); - filename = file; read(); @@ -36,3 +35,2 @@ AddressList::~AddressList() { - write(); addresses.clear(); @@ -122,3 +120,2 @@ void AddressList::read() - //QFile f(filename); QString lineEmail, lineName, email, name; @@ -164,18 +161 @@ 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(); -} |