From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kabc/vcard/DateValue.cpp') diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp index c5c5c85..87c7007 100644 --- a/kabc/vcard/DateValue.cpp +++ b/kabc/vcard/DateValue.cpp @@ -22,6 +22,8 @@ */ #include +//Added by qt3to4: +#include #include @@ -105,7 +107,7 @@ DateValue::DateValue(const DateValue & x) hasTime_ = x.hasTime_; } -DateValue::DateValue(const QCString & s) +DateValue::DateValue(const Q3CString & s) : Value(s) { } @@ -120,7 +122,7 @@ DateValue::operator = (DateValue & x) } DateValue & -DateValue::operator = (const QCString & s) +DateValue::operator = (const Q3CString & s) { Value::operator = (s); return *this; @@ -154,8 +156,8 @@ DateValue::_parse() int timeSep = strRep_.find('T'); - QCString dateStr; - QCString timeStr; + Q3CString dateStr; + Q3CString timeStr; if (timeSep == -1) { @@ -173,7 +175,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// DATE - dateStr.replace(QRegExp("-"), ""); + dateStr.replace("-", ""); kdDebug(5710) << "dateStr: " << dateStr << endl; @@ -196,7 +198,7 @@ DateValue::_parse() if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { - QCString zoneStr(timeStr.mid(zoneSep + 1)); + Q3CString zoneStr(timeStr.mid(zoneSep + 1)); vDebug("zoneStr == " + zoneStr); zonePositive_ = (zoneStr[0] == '+'); @@ -211,13 +213,13 @@ DateValue::_parse() int secFracSep = timeStr.findRev(','); if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. - QCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); + Q3CString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); secFrac_ = quirkafleeg.toDouble(); } /////////////////////////////////////////////////////////////// HMS - timeStr.replace(QRegExp(":"), ""); + timeStr.replace(":", ""); hour_ = timeStr.left(2).toInt(); minute_ = timeStr.mid(2, 2).toInt(); @@ -229,9 +231,9 @@ DateValue::_assemble() { vDebug("DateValue::_assemble"); - QCString year; - QCString month; - QCString day; + Q3CString year; + Q3CString month; + Q3CString day; year.setNum( year_ ); month.setNum( month_ ); @@ -243,9 +245,9 @@ DateValue::_assemble() strRep_ = year + '-' + month + '-' + day; if ( hasTime_ ) { - QCString hour; - QCString minute; - QCString second; + Q3CString hour; + Q3CString minute; + Q3CString second; hour.setNum( hour_ ); minute.setNum( minute_ ); -- cgit v0.9.0.2