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) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/vcard/DateValue.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/DateValue.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
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 @@ -21,8 +21,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <qregexp.h> +//Added by qt3to4: +#include <Q3CString> #include <kdebug.h> #include <VCardDefines.h> @@ -104,9 +106,9 @@ DateValue::DateValue(const DateValue & x) secFrac_ = x.secFrac_; hasTime_ = x.hasTime_; } -DateValue::DateValue(const QCString & s) +DateValue::DateValue(const Q3CString & s) : Value(s) { } @@ -119,9 +121,9 @@ DateValue::operator = (DateValue & x) return *this; } DateValue & -DateValue::operator = (const QCString & s) +DateValue::operator = (const Q3CString & s) { Value::operator = (s); return *this; } @@ -153,10 +155,10 @@ DateValue::_parse() // [time-secfrac] [time-zone] int timeSep = strRep_.find('T'); - QCString dateStr; - QCString timeStr; + Q3CString dateStr; + Q3CString timeStr; if (timeSep == -1) { dateStr = strRep_; @@ -172,9 +174,9 @@ DateValue::_parse() } /////////////////////////////////////////////////////////////// DATE - dateStr.replace(QRegExp("-"), ""); + dateStr.replace("-", ""); kdDebug(5710) << "dateStr: " << dateStr << endl; year_ = dateStr.left(4).toInt(); @@ -195,9 +197,9 @@ DateValue::_parse() int zoneSep = timeStr.find('Z'); 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] == '+'); zoneHour_ = zoneStr.mid(1, 2).toInt(); @@ -210,15 +212,15 @@ 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(); second_ = timeStr.mid(4, 2).toInt(); @@ -228,11 +230,11 @@ DateValue::_parse() DateValue::_assemble() { vDebug("DateValue::_assemble"); - QCString year; - QCString month; - QCString day; + Q3CString year; + Q3CString month; + Q3CString day; year.setNum( year_ ); month.setNum( month_ ); day.setNum( day_ ); @@ -242,11 +244,11 @@ 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_ ); second.setNum( second_ ); |