author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/vcard/ContentLine.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/vcard/ContentLine.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 0a2f97d..1d4886c 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp | |||
@@ -21,8 +21,8 @@ | |||
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcstring.h> | 24 | #include <q3cstring.h> |
25 | #include <qstrlist.h> | 25 | #include <q3strlist.h> |
26 | #include <qregexp.h> | 26 | #include <qregexp.h> |
27 | 27 | ||
28 | #include <kdebug.h> | 28 | #include <kdebug.h> |
@@ -98,7 +98,7 @@ ContentLine::ContentLine(const ContentLine & x) | |||
98 | 98 | ||
99 | } | 99 | } |
100 | 100 | ||
101 | ContentLine::ContentLine(const QCString & s) | 101 | ContentLine::ContentLine(const Q3CString & s) |
102 | :Entity(s), | 102 | :Entity(s), |
103 | value_(0), | 103 | value_(0), |
104 | paramType_( ParamUnknown ), | 104 | paramType_( ParamUnknown ), |
@@ -129,7 +129,7 @@ ContentLine::operator = (ContentLine & x) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | ContentLine & | 131 | ContentLine & |
132 | ContentLine::operator = (const QCString & s) | 132 | ContentLine::operator = (const Q3CString & s) |
133 | { | 133 | { |
134 | Entity::operator = (s); | 134 | Entity::operator = (s); |
135 | delete value_; | 135 | delete value_; |
@@ -142,7 +142,7 @@ ContentLine::operator == (ContentLine & x) | |||
142 | { | 142 | { |
143 | x.parse(); | 143 | x.parse(); |
144 | 144 | ||
145 | QPtrListIterator<Param> it(x.paramList()); | 145 | Q3PtrListIterator<Param> it(x.paramList()); |
146 | 146 | ||
147 | if (!paramList_.find(it.current())) | 147 | if (!paramList_.find(it.current())) |
148 | return false; | 148 | return false; |
@@ -163,11 +163,11 @@ ContentLine::_parse() | |||
163 | 163 | ||
164 | // Unfold folded lines | 164 | // Unfold folded lines |
165 | // NLR | 165 | // NLR |
166 | strRep_ = strRep_.replace( QRegExp( "\\r" ), "" ); | 166 | strRep_ = strRep_.replace( "\\r" , "" ); |
167 | // Unqote newlines | 167 | // Unqote newlines |
168 | strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); | 168 | strRep_ = strRep_.replace( "\\\\n", "\n" ); |
169 | //NLR | 169 | //NLR |
170 | strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" ); | 170 | strRep_ = strRep_.replace( "\\\\r" , "\r" ); |
171 | 171 | ||
172 | int split = strRep_.find(':'); | 172 | int split = strRep_.find(':'); |
173 | 173 | ||
@@ -176,8 +176,8 @@ ContentLine::_parse() | |||
176 | return; | 176 | return; |
177 | } | 177 | } |
178 | 178 | ||
179 | QCString firstPart(strRep_.left(split)); | 179 | Q3CString firstPart(strRep_.left(split)); |
180 | QCString valuePart(strRep_.mid(split + 1)); | 180 | Q3CString valuePart(strRep_.mid(split + 1)); |
181 | 181 | ||
182 | split = firstPart.find('.'); | 182 | split = firstPart.find('.'); |
183 | 183 | ||
@@ -192,7 +192,7 @@ ContentLine::_parse() | |||
192 | 192 | ||
193 | // Now we have the group, the name and param list together and the value. | 193 | // Now we have the group, the name and param list together and the value. |
194 | 194 | ||
195 | QStrList l; | 195 | Q3StrList l; |
196 | 196 | ||
197 | RTokenise(firstPart, ";", l); | 197 | RTokenise(firstPart, ";", l); |
198 | 198 | ||
@@ -214,11 +214,11 @@ ContentLine::_parse() | |||
214 | 214 | ||
215 | // For each parameter, create a new parameter of the correct type. | 215 | // For each parameter, create a new parameter of the correct type. |
216 | 216 | ||
217 | QStrListIterator it(l); | 217 | Q3StrListIterator it(l); |
218 | 218 | ||
219 | for (; it.current(); ++it, i++) { | 219 | for (; it.current(); ++it, i++) { |
220 | 220 | ||
221 | QCString str = *it; | 221 | Q3CString str = *it; |
222 | 222 | ||
223 | split = str.find("="); | 223 | split = str.find("="); |
224 | if (split < 0 ) { | 224 | if (split < 0 ) { |
@@ -226,13 +226,13 @@ ContentLine::_parse() | |||
226 | continue; | 226 | continue; |
227 | } | 227 | } |
228 | 228 | ||
229 | QCString paraName = str.left(split); | 229 | Q3CString paraName = str.left(split); |
230 | QCString paraValue = str.mid(split + 1); | 230 | Q3CString paraValue = str.mid(split + 1); |
231 | 231 | ||
232 | QStrList paraValues; | 232 | Q3StrList paraValues; |
233 | RTokenise(paraValue, ",", paraValues); | 233 | RTokenise(paraValue, ",", paraValues); |
234 | 234 | ||
235 | QStrListIterator it2( paraValues ); | 235 | Q3StrListIterator it2( paraValues ); |
236 | 236 | ||
237 | for(; it2.current(); ++it2) { | 237 | for(; it2.current(); ++it2) { |
238 | 238 | ||
@@ -309,7 +309,7 @@ ContentLine::_assemble() | |||
309 | vDebug("Assemble (argl) - my name is \"" + name_ + "\""); | 309 | vDebug("Assemble (argl) - my name is \"" + name_ + "\""); |
310 | strRep_.truncate(0); | 310 | strRep_.truncate(0); |
311 | 311 | ||
312 | QCString line; | 312 | Q3CString line; |
313 | 313 | ||
314 | if (!group_.isEmpty()) | 314 | if (!group_.isEmpty()) |
315 | line += group_ + '.'; | 315 | line += group_ + '.'; |