summaryrefslogtreecommitdiff
authoralwin <alwin>2003-12-12 09:11:26 (UTC)
committer alwin <alwin>2003-12-12 09:11:26 (UTC)
commitf6ff7965fe62f42fcb0fb1cdb93585e0c6ed80fe (patch) (unidiff)
treea749f4f32cd7b956b59dc4299431539c6b95657f
parentdb6704ee16bb6983f4fd8d6853a28f59d533f637 (diff)
downloadopie-f6ff7965fe62f42fcb0fb1cdb93585e0c6ed80fe.zip
opie-f6ff7965fe62f42fcb0fb1cdb93585e0c6ed80fe.tar.gz
opie-f6ff7965fe62f42fcb0fb1cdb93585e0c6ed80fe.tar.bz2
body text will initialized with 0 not "" so we can check if
ever a body text is set.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp2
-rw-r--r--noncore/net/mail/mailtypes.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp
index 0e3174d..6a66113 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.cpp
+++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp
@@ -1,189 +1,189 @@
1#include "mailtypes.h" 1#include "mailtypes.h"
2 2
3 3
4RecMail::RecMail() 4RecMail::RecMail()
5 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) 5 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7)
6{ 6{
7 init(); 7 init();
8} 8}
9 9
10RecMail::RecMail(const RecMail&old) 10RecMail::RecMail(const RecMail&old)
11 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) 11 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7)
12{ 12{
13 init(); 13 init();
14 copy_old(old); 14 copy_old(old);
15 qDebug("Copy constructor RecMail"); 15 qDebug("Copy constructor RecMail");
16} 16}
17 17
18void RecMail::copy_old(const RecMail&old) 18void RecMail::copy_old(const RecMail&old)
19{ 19{
20 subject = old.subject; 20 subject = old.subject;
21 date = old.date; 21 date = old.date;
22 mbox = old.mbox; 22 mbox = old.mbox;
23 msg_id = old.msg_id; 23 msg_id = old.msg_id;
24 msg_size = old.msg_size; 24 msg_size = old.msg_size;
25 msg_number = old.msg_number; 25 msg_number = old.msg_number;
26 from = old.from; 26 from = old.from;
27 msg_flags = old.msg_flags; 27 msg_flags = old.msg_flags;
28 to = old.to; 28 to = old.to;
29 cc = old.cc; 29 cc = old.cc;
30 bcc = old.bcc; 30 bcc = old.bcc;
31} 31}
32 32
33void RecMail::init() 33void RecMail::init()
34{ 34{
35 to.clear(); 35 to.clear();
36 cc.clear(); 36 cc.clear();
37 bcc.clear(); 37 bcc.clear();
38} 38}
39 39
40void RecMail::setTo(const QStringList&list) 40void RecMail::setTo(const QStringList&list)
41{ 41{
42 to = list; 42 to = list;
43} 43}
44 44
45const QStringList&RecMail::To()const 45const QStringList&RecMail::To()const
46{ 46{
47 return to; 47 return to;
48} 48}
49 49
50void RecMail::setCC(const QStringList&list) 50void RecMail::setCC(const QStringList&list)
51{ 51{
52 cc = list; 52 cc = list;
53} 53}
54 54
55const QStringList&RecMail::CC()const 55const QStringList&RecMail::CC()const
56{ 56{
57 return cc; 57 return cc;
58} 58}
59 59
60void RecMail::setBcc(const QStringList&list) 60void RecMail::setBcc(const QStringList&list)
61{ 61{
62 bcc = list; 62 bcc = list;
63} 63}
64 64
65const QStringList& RecMail::Bcc()const 65const QStringList& RecMail::Bcc()const
66{ 66{
67 return bcc; 67 return bcc;
68} 68}
69 69
70RecPart::RecPart() 70RecPart::RecPart()
71 : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0) 71 : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0)
72{ 72{
73} 73}
74 74
75RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines) 75RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines)
76 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines) 76 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines)
77{ 77{
78} 78}
79 79
80RecPart::~RecPart() 80RecPart::~RecPart()
81{ 81{
82} 82}
83 83
84void RecPart::setLines(unsigned int lines) 84void RecPart::setLines(unsigned int lines)
85{ 85{
86 m_lines = lines; 86 m_lines = lines;
87} 87}
88 88
89const unsigned int RecPart::Lines()const 89const unsigned int RecPart::Lines()const
90{ 90{
91 return m_lines; 91 return m_lines;
92} 92}
93 93
94const QString& RecPart::Type()const 94const QString& RecPart::Type()const
95{ 95{
96 return m_type; 96 return m_type;
97} 97}
98 98
99void RecPart::setType(const QString&type) 99void RecPart::setType(const QString&type)
100{ 100{
101 m_type = type; 101 m_type = type;
102} 102}
103 103
104const QString& RecPart::Subtype()const 104const QString& RecPart::Subtype()const
105{ 105{
106 return m_subtype; 106 return m_subtype;
107} 107}
108 108
109void RecPart::setSubtype(const QString&subtype) 109void RecPart::setSubtype(const QString&subtype)
110{ 110{
111 m_subtype = subtype; 111 m_subtype = subtype;
112} 112}
113 113
114const QString& RecPart::Identifier()const 114const QString& RecPart::Identifier()const
115{ 115{
116 return m_identifier; 116 return m_identifier;
117} 117}
118 118
119void RecPart::setIdentifier(const QString&identifier) 119void RecPart::setIdentifier(const QString&identifier)
120{ 120{
121 m_identifier = identifier; 121 m_identifier = identifier;
122} 122}
123 123
124const QString& RecPart::Encoding()const 124const QString& RecPart::Encoding()const
125{ 125{
126 return m_encoding; 126 return m_encoding;
127} 127}
128 128
129void RecPart::setEncoding(const QString&encoding) 129void RecPart::setEncoding(const QString&encoding)
130{ 130{
131 m_encoding = encoding; 131 m_encoding = encoding;
132} 132}
133 133
134RecBody::RecBody() 134RecBody::RecBody()
135 : m_BodyText(""),m_PartsList() 135 : m_BodyText(),m_PartsList()
136{ 136{
137 m_PartsList.setAutoDelete(true); 137 m_PartsList.setAutoDelete(true);
138} 138}
139 139
140RecBody::~RecBody() 140RecBody::~RecBody()
141{ 141{
142} 142}
143 143
144void RecBody::setBodytext(const QString&bodyText) 144void RecBody::setBodytext(const QString&bodyText)
145{ 145{
146 m_BodyText = bodyText; 146 m_BodyText = bodyText;
147} 147}
148 148
149const QString& RecBody::Bodytext()const 149const QString& RecBody::Bodytext()const
150{ 150{
151 return m_BodyText; 151 return m_BodyText;
152} 152}
153 153
154void RecBody::setParts(const QList<RecPart>&parts) 154void RecBody::setParts(const QList<RecPart>&parts)
155{ 155{
156 m_PartsList = parts; 156 m_PartsList = parts;
157 m_PartsList.setAutoDelete(true); 157 m_PartsList.setAutoDelete(true);
158} 158}
159 159
160const QList<RecPart>& RecBody::Parts()const 160const QList<RecPart>& RecBody::Parts()const
161{ 161{
162 return m_PartsList; 162 return m_PartsList;
163} 163}
164 164
165void RecBody::addPart(const RecPart& part) 165void RecBody::addPart(const RecPart& part)
166{ 166{
167 RecPart*p = new RecPart(part); 167 RecPart*p = new RecPart(part);
168 m_PartsList.append(p); 168 m_PartsList.append(p);
169} 169}
170 170
171void RecBody::setType(const QString&type) 171void RecBody::setType(const QString&type)
172{ 172{
173 m_type = type; 173 m_type = type;
174} 174}
175 175
176const QString& RecBody::Type()const 176const QString& RecBody::Type()const
177{ 177{
178 return m_type; 178 return m_type;
179} 179}
180 180
181void RecBody::setSubtype(const QString&type) 181void RecBody::setSubtype(const QString&type)
182{ 182{
183 m_subtype = type; 183 m_subtype = type;
184} 184}
185 185
186const QString& RecBody::Subtype()const 186const QString& RecBody::Subtype()const
187{ 187{
188 return m_subtype; 188 return m_subtype;
189} 189}
diff --git a/noncore/net/mail/mailtypes.cpp b/noncore/net/mail/mailtypes.cpp
index 0e3174d..6a66113 100644
--- a/noncore/net/mail/mailtypes.cpp
+++ b/noncore/net/mail/mailtypes.cpp
@@ -1,189 +1,189 @@
1#include "mailtypes.h" 1#include "mailtypes.h"
2 2
3 3
4RecMail::RecMail() 4RecMail::RecMail()
5 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) 5 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7)
6{ 6{
7 init(); 7 init();
8} 8}
9 9
10RecMail::RecMail(const RecMail&old) 10RecMail::RecMail(const RecMail&old)
11 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) 11 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7)
12{ 12{
13 init(); 13 init();
14 copy_old(old); 14 copy_old(old);
15 qDebug("Copy constructor RecMail"); 15 qDebug("Copy constructor RecMail");
16} 16}
17 17
18void RecMail::copy_old(const RecMail&old) 18void RecMail::copy_old(const RecMail&old)
19{ 19{
20 subject = old.subject; 20 subject = old.subject;
21 date = old.date; 21 date = old.date;
22 mbox = old.mbox; 22 mbox = old.mbox;
23 msg_id = old.msg_id; 23 msg_id = old.msg_id;
24 msg_size = old.msg_size; 24 msg_size = old.msg_size;
25 msg_number = old.msg_number; 25 msg_number = old.msg_number;
26 from = old.from; 26 from = old.from;
27 msg_flags = old.msg_flags; 27 msg_flags = old.msg_flags;
28 to = old.to; 28 to = old.to;
29 cc = old.cc; 29 cc = old.cc;
30 bcc = old.bcc; 30 bcc = old.bcc;
31} 31}
32 32
33void RecMail::init() 33void RecMail::init()
34{ 34{
35 to.clear(); 35 to.clear();
36 cc.clear(); 36 cc.clear();
37 bcc.clear(); 37 bcc.clear();
38} 38}
39 39
40void RecMail::setTo(const QStringList&list) 40void RecMail::setTo(const QStringList&list)
41{ 41{
42 to = list; 42 to = list;
43} 43}
44 44
45const QStringList&RecMail::To()const 45const QStringList&RecMail::To()const
46{ 46{
47 return to; 47 return to;
48} 48}
49 49
50void RecMail::setCC(const QStringList&list) 50void RecMail::setCC(const QStringList&list)
51{ 51{
52 cc = list; 52 cc = list;
53} 53}
54 54
55const QStringList&RecMail::CC()const 55const QStringList&RecMail::CC()const
56{ 56{
57 return cc; 57 return cc;
58} 58}
59 59
60void RecMail::setBcc(const QStringList&list) 60void RecMail::setBcc(const QStringList&list)
61{ 61{
62 bcc = list; 62 bcc = list;
63} 63}
64 64
65const QStringList& RecMail::Bcc()const 65const QStringList& RecMail::Bcc()const
66{ 66{
67 return bcc; 67 return bcc;
68} 68}
69 69
70RecPart::RecPart() 70RecPart::RecPart()
71 : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0) 71 : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0)
72{ 72{
73} 73}
74 74
75RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines) 75RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines)
76 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines) 76 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines)
77{ 77{
78} 78}
79 79
80RecPart::~RecPart() 80RecPart::~RecPart()
81{ 81{
82} 82}
83 83
84void RecPart::setLines(unsigned int lines) 84void RecPart::setLines(unsigned int lines)
85{ 85{
86 m_lines = lines; 86 m_lines = lines;
87} 87}
88 88
89const unsigned int RecPart::Lines()const 89const unsigned int RecPart::Lines()const
90{ 90{
91 return m_lines; 91 return m_lines;
92} 92}
93 93
94const QString& RecPart::Type()const 94const QString& RecPart::Type()const
95{ 95{
96 return m_type; 96 return m_type;
97} 97}
98 98
99void RecPart::setType(const QString&type) 99void RecPart::setType(const QString&type)
100{ 100{
101 m_type = type; 101 m_type = type;
102} 102}
103 103
104const QString& RecPart::Subtype()const 104const QString& RecPart::Subtype()const
105{ 105{
106 return m_subtype; 106 return m_subtype;
107} 107}
108 108
109void RecPart::setSubtype(const QString&subtype) 109void RecPart::setSubtype(const QString&subtype)
110{ 110{
111 m_subtype = subtype; 111 m_subtype = subtype;
112} 112}
113 113
114const QString& RecPart::Identifier()const 114const QString& RecPart::Identifier()const
115{ 115{
116 return m_identifier; 116 return m_identifier;
117} 117}
118 118
119void RecPart::setIdentifier(const QString&identifier) 119void RecPart::setIdentifier(const QString&identifier)
120{ 120{
121 m_identifier = identifier; 121 m_identifier = identifier;
122} 122}
123 123
124const QString& RecPart::Encoding()const 124const QString& RecPart::Encoding()const
125{ 125{
126 return m_encoding; 126 return m_encoding;
127} 127}
128 128
129void RecPart::setEncoding(const QString&encoding) 129void RecPart::setEncoding(const QString&encoding)
130{ 130{
131 m_encoding = encoding; 131 m_encoding = encoding;
132} 132}
133 133
134RecBody::RecBody() 134RecBody::RecBody()
135 : m_BodyText(""),m_PartsList() 135 : m_BodyText(),m_PartsList()
136{ 136{
137 m_PartsList.setAutoDelete(true); 137 m_PartsList.setAutoDelete(true);
138} 138}
139 139
140RecBody::~RecBody() 140RecBody::~RecBody()
141{ 141{
142} 142}
143 143
144void RecBody::setBodytext(const QString&bodyText) 144void RecBody::setBodytext(const QString&bodyText)
145{ 145{
146 m_BodyText = bodyText; 146 m_BodyText = bodyText;
147} 147}
148 148
149const QString& RecBody::Bodytext()const 149const QString& RecBody::Bodytext()const
150{ 150{
151 return m_BodyText; 151 return m_BodyText;
152} 152}
153 153
154void RecBody::setParts(const QList<RecPart>&parts) 154void RecBody::setParts(const QList<RecPart>&parts)
155{ 155{
156 m_PartsList = parts; 156 m_PartsList = parts;
157 m_PartsList.setAutoDelete(true); 157 m_PartsList.setAutoDelete(true);
158} 158}
159 159
160const QList<RecPart>& RecBody::Parts()const 160const QList<RecPart>& RecBody::Parts()const
161{ 161{
162 return m_PartsList; 162 return m_PartsList;
163} 163}
164 164
165void RecBody::addPart(const RecPart& part) 165void RecBody::addPart(const RecPart& part)
166{ 166{
167 RecPart*p = new RecPart(part); 167 RecPart*p = new RecPart(part);
168 m_PartsList.append(p); 168 m_PartsList.append(p);
169} 169}
170 170
171void RecBody::setType(const QString&type) 171void RecBody::setType(const QString&type)
172{ 172{
173 m_type = type; 173 m_type = type;
174} 174}
175 175
176const QString& RecBody::Type()const 176const QString& RecBody::Type()const
177{ 177{
178 return m_type; 178 return m_type;
179} 179}
180 180
181void RecBody::setSubtype(const QString&type) 181void RecBody::setSubtype(const QString&type)
182{ 182{
183 m_subtype = type; 183 m_subtype = type;
184} 184}
185 185
186const QString& RecBody::Subtype()const 186const QString& RecBody::Subtype()const
187{ 187{
188 return m_subtype; 188 return m_subtype;
189} 189}