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/Param.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/Param.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp index c513613..bd6b299 100644 --- a/kabc/vcard/Param.cpp +++ b/kabc/vcard/Param.cpp | |||
@@ -13,117 +13,119 @@ | |||
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 <VCardParam.h> | 24 | #include <VCardParam.h> |
25 | 25 | ||
26 | #include <VCardEntity.h> | 26 | #include <VCardEntity.h> |
27 | 27 | ||
28 | #include <VCardRToken.h> | 28 | #include <VCardRToken.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3CString> | ||
29 | 31 | ||
30 | using namespace VCARD; | 32 | using namespace VCARD; |
31 | 33 | ||
32 | Param::Param() | 34 | Param::Param() |
33 | :Entity(), | 35 | :Entity(), |
34 | name_(""), | 36 | name_(""), |
35 | value_("") | 37 | value_("") |
36 | { | 38 | { |
37 | } | 39 | } |
38 | 40 | ||
39 | Param::Param(const Param & x) | 41 | Param::Param(const Param & x) |
40 | :Entity(x), | 42 | :Entity(x), |
41 | name_(x.name_), | 43 | name_(x.name_), |
42 | value_(x.value_) | 44 | value_(x.value_) |
43 | { | 45 | { |
44 | } | 46 | } |
45 | 47 | ||
46 | Param::Param(const QCString & s) | 48 | Param::Param(const Q3CString & s) |
47 | :Entity(s), | 49 | :Entity(s), |
48 | name_(""), | 50 | name_(""), |
49 | value_("") | 51 | value_("") |
50 | { | 52 | { |
51 | } | 53 | } |
52 | 54 | ||
53 | Param & | 55 | Param & |
54 | Param::operator = (Param & x) | 56 | Param::operator = (Param & x) |
55 | { | 57 | { |
56 | if (*this == x) return *this; | 58 | if (*this == x) return *this; |
57 | 59 | ||
58 | Entity::operator = (x); | 60 | Entity::operator = (x); |
59 | name_ = x.name_; | 61 | name_ = x.name_; |
60 | value_ = x.value_; | 62 | value_ = x.value_; |
61 | 63 | ||
62 | return *this; | 64 | return *this; |
63 | } | 65 | } |
64 | 66 | ||
65 | Param & | 67 | Param & |
66 | Param::operator = (const QCString & s) | 68 | Param::operator = (const Q3CString & s) |
67 | { | 69 | { |
68 | Entity::operator = (s); | 70 | Entity::operator = (s); |
69 | return *this; | 71 | return *this; |
70 | } | 72 | } |
71 | 73 | ||
72 | bool | 74 | bool |
73 | Param::operator == (Param & x) | 75 | Param::operator == (Param & x) |
74 | { | 76 | { |
75 | x.parse(); | 77 | x.parse(); |
76 | return false; | 78 | return false; |
77 | } | 79 | } |
78 | 80 | ||
79 | Param::~Param() | 81 | Param::~Param() |
80 | { | 82 | { |
81 | } | 83 | } |
82 | 84 | ||
83 | void | 85 | void |
84 | Param::_parse() | 86 | Param::_parse() |
85 | { | 87 | { |
86 | } | 88 | } |
87 | 89 | ||
88 | void | 90 | void |
89 | Param::_assemble() | 91 | Param::_assemble() |
90 | { | 92 | { |
91 | strRep_ = name_ + "=" + value_; | 93 | strRep_ = name_ + "=" + value_; |
92 | } | 94 | } |
93 | 95 | ||
94 | Param::Param(const QCString &name, const QCString &value) | 96 | Param::Param(const Q3CString &name, const Q3CString &value) |
95 | :Entity(), | 97 | :Entity(), |
96 | name_(name), | 98 | name_(name), |
97 | value_(value) | 99 | value_(value) |
98 | { | 100 | { |
99 | parsed_ = true; | 101 | parsed_ = true; |
100 | assembled_ = false; | 102 | assembled_ = false; |
101 | } | 103 | } |
102 | 104 | ||
103 | void | 105 | void |
104 | Param::setName(const QCString & name) | 106 | Param::setName(const Q3CString & name) |
105 | { | 107 | { |
106 | name_ = name; | 108 | name_ = name; |
107 | 109 | ||
108 | assembled_ = false; | 110 | assembled_ = false; |
109 | } | 111 | } |
110 | 112 | ||
111 | void | 113 | void |
112 | Param::setValue(const QCString & value) | 114 | Param::setValue(const Q3CString & value) |
113 | { | 115 | { |
114 | value_ = value; | 116 | value_ = value; |
115 | 117 | ||
116 | assembled_ = false; | 118 | assembled_ = false; |
117 | } | 119 | } |
118 | 120 | ||
119 | QCString | 121 | Q3CString |
120 | Param::name() | 122 | Param::name() |
121 | { | 123 | { |
122 | return name_; | 124 | return name_; |
123 | } | 125 | } |
124 | 126 | ||
125 | QCString | 127 | Q3CString |
126 | Param::value() | 128 | Param::value() |
127 | { | 129 | { |
128 | return value_; | 130 | return value_; |
129 | } | 131 | } |