summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/AdrParam.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/vcard/AdrParam.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kabc/vcard/AdrParam.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/AdrParam.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp
index fa46499..33d358c 100644
--- a/kabc/vcard/AdrParam.cpp
+++ b/kabc/vcard/AdrParam.cpp
@@ -11,86 +11,88 @@
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <VCardRToken.h>
#include <VCardAdrParam.h>
#include <VCardParam.h>
+//Added by qt3to4:
+#include <Q3CString>
using namespace VCARD;
AdrParam::AdrParam()
: Param()
{
}
AdrParam::AdrParam(const AdrParam & x)
: Param(x),
adrTypeList_ (x.adrTypeList_)
{
}
-AdrParam::AdrParam(const QCString & s)
+AdrParam::AdrParam(const Q3CString & s)
: Param(s)
{
}
AdrParam &
AdrParam::operator = (AdrParam & x)
{
if (*this == x) return *this;
adrTypeList_ = x.adrTypeList();
textParam_ = x.textParam();
Param::operator = (x);
return *this;
}
AdrParam &
-AdrParam::operator = (const QCString & s)
+AdrParam::operator = (const Q3CString & s)
{
Param::operator = (s);
adrTypeList_.clear();
textParam_.truncate(0);
return *this;
}
bool
AdrParam::operator == (AdrParam & x)
{
parse();
if (!x.textParam().isEmpty())
return (x.textParam_ == textParam_);
if (x.adrTypeList().count() != adrTypeList_.count())
return false;
- QStrListIterator it(x.adrTypeList_);
+ Q3StrListIterator it(x.adrTypeList_);
for (; it.current(); ++it)
if (!adrTypeList_.find(it.current()))
return false;
return true;
}
AdrParam::~AdrParam()
{
}
void
AdrParam::_parse()
{
adrTypeList_.clear();
@@ -101,26 +103,26 @@ AdrParam::_parse()
}
if (!strRep_.contains('='))
return;
RTokenise(strRep_, ",", adrTypeList_);
}
void
AdrParam::_assemble()
{
if (!textParam_.isEmpty()) {
strRep_ = textParam_;
return;
}
- QStrListIterator it(adrTypeList_);
+ Q3StrListIterator it(adrTypeList_);
for (; it.current(); ++it) {
strRep_ += it.current();
if (it.current() != adrTypeList_.last())
strRep_ += ',';
}
}