summaryrefslogtreecommitdiffstats
path: root/kaddressbook/xxport/dateparser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/xxport/dateparser.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/xxport/dateparser.cpp')
-rw-r--r--kaddressbook/xxport/dateparser.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kaddressbook/xxport/dateparser.cpp b/kaddressbook/xxport/dateparser.cpp
index ed485e0dd..2052407a6 100644
--- a/kaddressbook/xxport/dateparser.cpp
+++ b/kaddressbook/xxport/dateparser.cpp
@@ -21,11 +21,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "dateparser.h"
-DateParser::DateParser( const QString &pattern )
+DateParser::DateParser( const TQString &pattern )
: mPattern( pattern )
{
}
@@ -34,7 +34,7 @@ DateParser::~DateParser()
{
}
-QDate DateParser::parse( const QString &dateStr ) const
+TQDate DateParser::parse( const TQString &dateStr ) const
{
int year, month, day;
year = month = day = 0;
@@ -46,13 +46,13 @@ QDate DateParser::parse( const QString &dateStr ) const
year = 1900 + dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'Y' ) { // YYYY
if ( currPos + 3 < dateStr.length() ) {
year = dateStr.mid( currPos, 4 ).toInt();
currPos += 4;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'm' ) { // M or MM
if ( currPos + 1 < dateStr.length() ) {
if ( dateStr[ currPos ].isDigit() ) {
@@ -71,13 +71,13 @@ QDate DateParser::parse( const QString &dateStr ) const
}
}
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'M' ) { // 0M or MM
if ( currPos + 1 < dateStr.length() ) {
month = dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'd' ) { // D or DD
if ( currPos + 1 < dateStr.length() ) {
if ( dateStr[ currPos ].isDigit() ) {
@@ -96,17 +96,17 @@ QDate DateParser::parse( const QString &dateStr ) const
}
}
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'D' ) { // 0D or DD
if ( currPos + 1 < dateStr.length() ) {
day = dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else {
currPos++;
}
}
- return QDate( year, month, day );
+ return TQDate( year, month, day );
}