-rw-r--r-- | kabc/vcard/AgentParam.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp index 5625e00..aae35ac 100644 --- a/kabc/vcard/AgentParam.cpp +++ b/kabc/vcard/AgentParam.cpp | |||
@@ -1,92 +1,94 @@ | |||
1 | /* | 1 | /* |
2 | libvcard - vCard parsing library for vCard version 3.0 | 2 | libvcard - vCard parsing library for vCard version 3.0 |
3 | 3 | ||
4 | Copyright (C) 1998 Rik Hemsley rik@kde.org | 4 | Copyright (C) 1998 Rik Hemsley rik@kde.org |
5 | 5 | ||
6 | Permission is hereby granted, free of charge, to any person obtaining a copy | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | of this software and associated documentation files (the "Software"), to | 7 | of this software and associated documentation files (the "Software"), to |
8 | deal in the Software without restriction, including without limitation the | 8 | deal in the Software without restriction, including without limitation the |
9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | 9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
10 | sell copies of the Software, and to permit persons to whom the Software is | 10 | sell copies of the Software, and to permit persons to whom the Software is |
11 | furnished to do so, subject to the following conditions: | 11 | furnished to do so, subject to the following conditions: |
12 | 12 | ||
13 | The above copyright notice and this permission notice shall be included in | 13 | The above copyright notice and this permission notice shall be included in |
14 | all copies or substantial portions of the Software. | 14 | all copies or substantial portions of the Software. |
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 <VCardAgentParam.h> | 24 | #include <VCardAgentParam.h> |
25 | 25 | ||
26 | #include <VCardParam.h> | 26 | #include <VCardParam.h> |
27 | //Added by qt3to4: | ||
28 | #include <Q3CString> | ||
27 | 29 | ||
28 | using namespace VCARD; | 30 | using namespace VCARD; |
29 | 31 | ||
30 | AgentParam::AgentParam() | 32 | AgentParam::AgentParam() |
31 | :Param() | 33 | :Param() |
32 | { | 34 | { |
33 | } | 35 | } |
34 | 36 | ||
35 | AgentParam::AgentParam(const AgentParam & x) | 37 | AgentParam::AgentParam(const AgentParam & x) |
36 | :Param(x), | 38 | :Param(x), |
37 | refer_(x.refer_), | 39 | refer_(x.refer_), |
38 | uri_(x.uri_) | 40 | uri_(x.uri_) |
39 | { | 41 | { |
40 | } | 42 | } |
41 | 43 | ||
42 | AgentParam::AgentParam(const QCString & s) | 44 | AgentParam::AgentParam(const Q3CString & s) |
43 | :Param(s) | 45 | :Param(s) |
44 | { | 46 | { |
45 | } | 47 | } |
46 | 48 | ||
47 | AgentParam & | 49 | AgentParam & |
48 | AgentParam::operator = (AgentParam & x) | 50 | AgentParam::operator = (AgentParam & x) |
49 | { | 51 | { |
50 | if (*this == x) return *this; | 52 | if (*this == x) return *this; |
51 | 53 | ||
52 | refer_= x.refer_; | 54 | refer_= x.refer_; |
53 | uri_= x.uri_; | 55 | uri_= x.uri_; |
54 | 56 | ||
55 | Param::operator = (x); | 57 | Param::operator = (x); |
56 | return *this; | 58 | return *this; |
57 | } | 59 | } |
58 | 60 | ||
59 | AgentParam & | 61 | AgentParam & |
60 | AgentParam::operator = (const QCString & s) | 62 | AgentParam::operator = (const Q3CString & s) |
61 | { | 63 | { |
62 | Param::operator = (s); | 64 | Param::operator = (s); |
63 | return *this; | 65 | return *this; |
64 | } | 66 | } |
65 | 67 | ||
66 | bool | 68 | bool |
67 | AgentParam::operator == (AgentParam & x) | 69 | AgentParam::operator == (AgentParam & x) |
68 | { | 70 | { |
69 | parse(); | 71 | parse(); |
70 | 72 | ||
71 | if (refer_) | 73 | if (refer_) |
72 | return (x.refer() && uri_ == x.uri_); | 74 | return (x.refer() && uri_ == x.uri_); |
73 | 75 | ||
74 | return !x.refer(); | 76 | return !x.refer(); |
75 | } | 77 | } |
76 | 78 | ||
77 | AgentParam::~AgentParam() | 79 | AgentParam::~AgentParam() |
78 | { | 80 | { |
79 | } | 81 | } |
80 | 82 | ||
81 | void | 83 | void |
82 | AgentParam::_parse() | 84 | AgentParam::_parse() |
83 | { | 85 | { |
84 | if (strRep_.isEmpty()) { | 86 | if (strRep_.isEmpty()) { |
85 | refer_ = false; | 87 | refer_ = false; |
86 | return; | 88 | return; |
87 | } | 89 | } |
88 | 90 | ||
89 | refer_= true; | 91 | refer_= true; |
90 | uri_= strRep_; | 92 | uri_= strRep_; |
91 | } | 93 | } |
92 | 94 | ||