Diffstat (limited to 'library/backend/timeconversion.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | library/backend/timeconversion.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/backend/timeconversion.cpp b/library/backend/timeconversion.cpp index df7b0d5..6551697 100644 --- a/library/backend/timeconversion.cpp +++ b/library/backend/timeconversion.cpp | |||
@@ -22,29 +22,29 @@ | |||
22 | #include <qtopia/timeconversion.h> | 22 | #include <qtopia/timeconversion.h> |
23 | #include <qregexp.h> | 23 | #include <qregexp.h> |
24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
25 | 25 | ||
26 | QString TimeConversion::toString( const QDate &d ) | 26 | QString TimeConversion::toString( const QDate &d ) |
27 | { | 27 | { |
28 | QString empty; | 28 | // QString empty; |
29 | if ( d.isNull() ) | 29 | // if ( d.isNull() ) |
30 | return empty; | 30 | // return empty; |
31 | 31 | ||
32 | QString r = QString::number( d.day() ) + "." + | 32 | QString r = QString::number( d.day() ) + "." + |
33 | QString::number( d.month() ) + "." + | 33 | QString::number( d.month() ) + "." + |
34 | QString::number( d.year() ); | 34 | QString::number( d.year() ); |
35 | //qDebug("TimeConversion::toString %s", r.latin1()); | 35 | //qDebug("TimeConversion::toString %s", r.latin1()); |
36 | 36 | ||
37 | return r; | 37 | return r; |
38 | } | 38 | } |
39 | 39 | ||
40 | QDate TimeConversion::fromString( const QString &datestr ) | 40 | QDate TimeConversion::fromString( const QString &datestr ) |
41 | { | 41 | { |
42 | QDate empty; | 42 | // QDate empty; |
43 | if ( datestr.isEmpty() ) | 43 | // if ( datestr.isEmpty() ) |
44 | return empty; | 44 | // return empty; |
45 | 45 | ||
46 | int monthPos = datestr.find('.'); | 46 | int monthPos = datestr.find('.'); |
47 | int yearPos = datestr.find('.', monthPos+1 ); | 47 | int yearPos = datestr.find('.', monthPos+1 ); |
48 | if ( monthPos == -1 || yearPos == -1 ) { | 48 | if ( monthPos == -1 || yearPos == -1 ) { |
49 | qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos ); | 49 | qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos ); |
50 | return QDate(); | 50 | return QDate(); |