summaryrefslogtreecommitdiff
path: root/noncore/net/mailit/addresslist.h
authorzecke <zecke>2003-05-24 08:45:50 (UTC)
committer zecke <zecke>2003-05-24 08:45:50 (UTC)
commit3fb06f85a52b6fcbece50ed30c196efc2a91e8ce (patch) (unidiff)
tree618d3b21756a07fad10e1e1359bd12a0e7e15089 /noncore/net/mailit/addresslist.h
parent694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9 (diff)
downloadopie-3fb06f85a52b6fcbece50ed30c196efc2a91e8ce.zip
opie-3fb06f85a52b6fcbece50ed30c196efc2a91e8ce.tar.gz
opie-3fb06f85a52b6fcbece50ed30c196efc2a91e8ce.tar.bz2
don't crash when compiled with gcc3
one Contact in libqpe one Contact in addresslist.h a nice game of russian roulette gcc3 lost...
Diffstat (limited to 'noncore/net/mailit/addresslist.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/addresslist.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/mailit/addresslist.h b/noncore/net/mailit/addresslist.h
index b46d467..763b6d4 100644
--- a/noncore/net/mailit/addresslist.h
+++ b/noncore/net/mailit/addresslist.h
@@ -2,57 +2,57 @@
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2001 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qt Palmtop Environment. 4** This file is part of Qt Palmtop Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef ADDRESSLIST_H 20#ifndef ADDRESSLIST_H
21#define ADDRESSLIST_H 21#define ADDRESSLIST_H
22 22
23#include <qobject.h> 23#include <qobject.h>
24#include <qlist.h> 24#include <qlist.h>
25 25
26struct Contact 26struct AContact
27{ 27{
28 QString email; 28 QString email;
29 QString name; 29 QString name;
30}; 30};
31 31
32class AddressList : public QObject 32class AddressList : public QObject
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36public: 36public:
37 AddressList(); 37 AddressList();
38 ~AddressList(); 38 ~AddressList();
39 void addContact(const QString &email, const QString &name); 39 void addContact(const QString &email, const QString &name);
40 bool containsEmail(const QString &email); 40 bool containsEmail(const QString &email);
41 bool containsName(const QString &name); 41 bool containsName(const QString &name);
42 QString getNameByEmail(const QString &email); 42 QString getNameByEmail(const QString &email);
43 QString getEmailByName(const QString &name); 43 QString getEmailByName(const QString &name);
44 QList<Contact>* getContactList(); 44 QList<AContact>* getContactList();
45 45
46private: 46private:
47 int getEmailRef(const QString &email); 47 int getEmailRef(const QString &email);
48 int getNameRef(const QString &name); 48 int getNameRef(const QString &name);
49 QString getRightString(const QString &in); 49 QString getRightString(const QString &in);
50 void read(); 50 void read();
51 51
52private: 52private:
53 QList<Contact> addresses; 53 QList<AContact> addresses;
54 QString filename; 54 QString filename;
55 bool dirty; 55 bool dirty;
56}; 56};
57 57
58#endif 58#endif