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/SourceParam.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/vcard/SourceParam.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp index cd51cbd..8f02113 100644 --- a/kabc/vcard/SourceParam.cpp +++ b/kabc/vcard/SourceParam.cpp | |||
@@ -3,85 +3,87 @@ | |||
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 <VCardSourceParam.h> | 24 | #include <VCardSourceParam.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 | SourceParam::SourceParam() | 32 | SourceParam::SourceParam() |
31 | :Param(), | 33 | :Param(), |
32 | type_(SourceParam::TypeUnknown) | 34 | type_(SourceParam::TypeUnknown) |
33 | { | 35 | { |
34 | } | 36 | } |
35 | 37 | ||
36 | SourceParam::SourceParam(const SourceParam & x) | 38 | SourceParam::SourceParam(const SourceParam & x) |
37 | :Param(x), | 39 | :Param(x), |
38 | type_(x.type_), | 40 | type_(x.type_), |
39 | par_(x.par_), | 41 | par_(x.par_), |
40 | val_(x.val_) | 42 | val_(x.val_) |
41 | { | 43 | { |
42 | } | 44 | } |
43 | 45 | ||
44 | SourceParam::SourceParam(const QCString & s) | 46 | SourceParam::SourceParam(const Q3CString & s) |
45 | :Param(s), | 47 | :Param(s), |
46 | type_(SourceParam::TypeUnknown) | 48 | type_(SourceParam::TypeUnknown) |
47 | { | 49 | { |
48 | } | 50 | } |
49 | 51 | ||
50 | SourceParam & | 52 | SourceParam & |
51 | SourceParam::operator = (SourceParam & x) | 53 | SourceParam::operator = (SourceParam & x) |
52 | { | 54 | { |
53 | if (*this == x) return *this; | 55 | if (*this == x) return *this; |
54 | type_= x.type(); | 56 | type_= x.type(); |
55 | par_= x.par(); | 57 | par_= x.par(); |
56 | val_= x.val(); | 58 | val_= x.val(); |
57 | 59 | ||
58 | Param::operator = (x); | 60 | Param::operator = (x); |
59 | return *this; | 61 | return *this; |
60 | } | 62 | } |
61 | 63 | ||
62 | SourceParam & | 64 | SourceParam & |
63 | SourceParam::operator = (const QCString & s) | 65 | SourceParam::operator = (const Q3CString & s) |
64 | { | 66 | { |
65 | Param::operator = (s); | 67 | Param::operator = (s); |
66 | return *this; | 68 | return *this; |
67 | } | 69 | } |
68 | 70 | ||
69 | bool | 71 | bool |
70 | SourceParam::operator == (SourceParam & x) | 72 | SourceParam::operator == (SourceParam & x) |
71 | { | 73 | { |
72 | x.parse(); | 74 | x.parse(); |
73 | return false; | 75 | return false; |
74 | } | 76 | } |
75 | 77 | ||
76 | SourceParam::~SourceParam() | 78 | SourceParam::~SourceParam() |
77 | { | 79 | { |
78 | } | 80 | } |
79 | 81 | ||
80 | void | 82 | void |
81 | SourceParam::_parse() | 83 | SourceParam::_parse() |
82 | { | 84 | { |
83 | int i = strRep_.find('='); | 85 | int i = strRep_.find('='); |
84 | if (i == -1) // Invalid | 86 | if (i == -1) // Invalid |
85 | return; | 87 | return; |
86 | 88 | ||
87 | par_ = strRep_.left(i); | 89 | par_ = strRep_.left(i); |