summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/AdrValue.cpp
Unidiff
Diffstat (limited to 'kabc/vcard/AdrValue.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/AdrValue.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp
index 7ecef33..51ca12a 100644
--- a/kabc/vcard/AdrValue.cpp
+++ b/kabc/vcard/AdrValue.cpp
@@ -16,68 +16,71 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
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 <VCardRToken.h> 24#include <VCardRToken.h>
25#include <VCardAdrValue.h> 25#include <VCardAdrValue.h>
26#include <VCardValue.h> 26#include <VCardValue.h>
27#include <VCardDefines.h> 27#include <VCardDefines.h>
28//Added by qt3to4:
29#include <Q3StrList>
30#include <Q3CString>
28 31
29using namespace VCARD; 32using namespace VCARD;
30 33
31AdrValue::AdrValue() 34AdrValue::AdrValue()
32 :Value() 35 :Value()
33{ 36{
34} 37}
35 38
36AdrValue::AdrValue(const AdrValue & x) 39AdrValue::AdrValue(const AdrValue & x)
37 :Value(x), 40 :Value(x),
38 poBox_ (x.poBox_), 41 poBox_ (x.poBox_),
39 extAddress_(x.extAddress_), 42 extAddress_(x.extAddress_),
40 street_ (x.street_), 43 street_ (x.street_),
41 locality_(x.locality_), 44 locality_(x.locality_),
42 region_ (x.region_), 45 region_ (x.region_),
43 postCode_(x.postCode_), 46 postCode_(x.postCode_),
44 countryName_(x.countryName_) 47 countryName_(x.countryName_)
45{ 48{
46} 49}
47 50
48AdrValue::AdrValue(const QCString & s) 51AdrValue::AdrValue(const Q3CString & s)
49 :Value(s) 52 :Value(s)
50{ 53{
51} 54}
52 55
53 AdrValue & 56 AdrValue &
54AdrValue::operator = (AdrValue & x) 57AdrValue::operator = (AdrValue & x)
55{ 58{
56 if (*this == x) return *this; 59 if (*this == x) return *this;
57 60
58 poBox_ = x.poBox_; 61 poBox_ = x.poBox_;
59 extAddress_= x.extAddress_; 62 extAddress_= x.extAddress_;
60 street_ = x.street_; 63 street_ = x.street_;
61 locality_= x.locality_; 64 locality_= x.locality_;
62 region_ = x.region_; 65 region_ = x.region_;
63 postCode_= x.postCode_; 66 postCode_= x.postCode_;
64 countryName_= x.countryName_; 67 countryName_= x.countryName_;
65 68
66 Value::operator = (x); 69 Value::operator = (x);
67 return *this; 70 return *this;
68} 71}
69 72
70 AdrValue & 73 AdrValue &
71AdrValue::operator = (const QCString & s) 74AdrValue::operator = (const Q3CString & s)
72{ 75{
73 Value::operator = (s); 76 Value::operator = (s);
74 return *this; 77 return *this;
75} 78}
76 79
77 bool 80 bool
78AdrValue::operator == (AdrValue & x) 81AdrValue::operator == (AdrValue & x)
79{ 82{
80 parse(); 83 parse();
81 x.parse(); 84 x.parse();
82 85
83 return ( 86 return (
@@ -96,25 +99,25 @@ AdrValue::~AdrValue()
96 99
97 AdrValue * 100 AdrValue *
98AdrValue::clone() 101AdrValue::clone()
99{ 102{
100 return new AdrValue( *this ); 103 return new AdrValue( *this );
101} 104}
102 105
103 void 106 void
104AdrValue::_parse() 107AdrValue::_parse()
105{ 108{
106 vDebug("AdrValue::_parse()"); 109 vDebug("AdrValue::_parse()");
107 110
108 QStrList l; 111 Q3StrList l;
109 RTokenise(strRep_, ";", l); 112 RTokenise(strRep_, ";", l);
110 113
111 for (unsigned int i = 0; i < l.count(); i++) { 114 for (unsigned int i = 0; i < l.count(); i++) {
112 115
113 switch (i) { 116 switch (i) {
114 117
115 case 0: poBox_ = l.at(0);break; 118 case 0: poBox_ = l.at(0);break;
116 case 1: extAddress_ = l.at(1);break; 119 case 1: extAddress_ = l.at(1);break;
117 case 2: street_ = l.at(2);break; 120 case 2: street_ = l.at(2);break;
118 case 3: locality_ = l.at(3);break; 121 case 3: locality_ = l.at(3);break;
119 case 4: region_ = l.at(4);break; 122 case 4: region_ = l.at(4);break;
120 case 5: postCode_ = l.at(5);break; 123 case 5: postCode_ = l.at(5);break;