summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/URIValue.cpp
Unidiff
Diffstat (limited to 'kabc/vcard/URIValue.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/URIValue.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp
index c1d1022..26da7f4 100644
--- a/kabc/vcard/URIValue.cpp
+++ b/kabc/vcard/URIValue.cpp
@@ -15,66 +15,68 @@
15 15
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 <VCardURIValue.h> 24#include <VCardURIValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30URIValue::URIValue() 32URIValue::URIValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart) 37URIValue::URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart)
36 :Value(), 38 :Value(),
37 scheme_ (scheme), 39 scheme_ (scheme),
38 schemeSpecificPart_(schemeSpecificPart) 40 schemeSpecificPart_(schemeSpecificPart)
39{ 41{
40 parsed_ = true; 42 parsed_ = true;
41} 43}
42 44
43URIValue::URIValue(const URIValue & x) 45URIValue::URIValue(const URIValue & x)
44 : Value (x), 46 : Value (x),
45 scheme_ (x.scheme_), 47 scheme_ (x.scheme_),
46 schemeSpecificPart_(x.schemeSpecificPart_) 48 schemeSpecificPart_(x.schemeSpecificPart_)
47{ 49{
48} 50}
49 51
50URIValue::URIValue(const QCString & s) 52URIValue::URIValue(const Q3CString & s)
51 :Value(s) 53 :Value(s)
52{ 54{
53} 55}
54 56
55 URIValue & 57 URIValue &
56URIValue::operator = (URIValue & x) 58URIValue::operator = (URIValue & x)
57{ 59{
58 if (*this == x) return *this; 60 if (*this == x) return *this;
59 61
60 scheme_ = x.scheme_; 62 scheme_ = x.scheme_;
61 schemeSpecificPart_= x.schemeSpecificPart_; 63 schemeSpecificPart_= x.schemeSpecificPart_;
62 64
63 Value::operator = (x); 65 Value::operator = (x);
64 return *this; 66 return *this;
65} 67}
66 68
67 URIValue & 69 URIValue &
68URIValue::operator = (const QCString & s) 70URIValue::operator = (const Q3CString & s)
69{ 71{
70 Value::operator = (s); 72 Value::operator = (s);
71 return *this; 73 return *this;
72} 74}
73 75
74 bool 76 bool
75URIValue::operator == (URIValue & x) 77URIValue::operator == (URIValue & x)
76{ 78{
77 x.parse(); 79 x.parse();
78 return ( 80 return (
79 (scheme_ == x.scheme_) && 81 (scheme_ == x.scheme_) &&
80 (schemeSpecificPart_== x.schemeSpecificPart_)); 82 (schemeSpecificPart_== x.schemeSpecificPart_));
@@ -94,40 +96,40 @@ URIValue::_parse()
94 return; 96 return;
95 97
96 scheme_ = strRep_.left(split); 98 scheme_ = strRep_.left(split);
97 schemeSpecificPart_ = strRep_.mid(split + 1); 99 schemeSpecificPart_ = strRep_.mid(split + 1);
98} 100}
99 101
100 void 102 void
101URIValue::_assemble() 103URIValue::_assemble()
102{ 104{
103 strRep_ = scheme_ + ':' + schemeSpecificPart_; 105 strRep_ = scheme_ + ':' + schemeSpecificPart_;
104} 106}
105 107
106 QCString 108 Q3CString
107URIValue::scheme() 109URIValue::scheme()
108{ 110{
109 parse(); 111 parse();
110 return scheme_; 112 return scheme_;
111} 113}
112 114
113 QCString 115 Q3CString
114URIValue::schemeSpecificPart() 116URIValue::schemeSpecificPart()
115{ 117{
116 parse(); 118 parse();
117 return schemeSpecificPart_; 119 return schemeSpecificPart_;
118} 120}
119 121
120 void 122 void
121URIValue::setScheme(const QCString & s) 123URIValue::setScheme(const Q3CString & s)
122{ 124{
123 parse(); 125 parse();
124 scheme_ = s; 126 scheme_ = s;
125} 127}
126 128
127 void 129 void
128URIValue::setSchemeSpecificPart(const QCString & s) 130URIValue::setSchemeSpecificPart(const Q3CString & s)
129{ 131{
130 parse(); 132 parse();
131 schemeSpecificPart_ = s; 133 schemeSpecificPart_ = s;
132} 134}
133 135