author | ar <ar> | 2004-06-01 21:38:07 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-01 21:38:07 (UTC) |
commit | baed1d5ab8589aef14440009bc4e7380bcc5a741 (patch) (unidiff) | |
tree | c636e892c5eec0df2b36d16cb601a7da41a2ef0f /libopie2/opiepim/core/opimdateconversion.cpp | |
parent | 4438393d8eef624565e840b798429071829adea8 (diff) | |
download | opie-baed1d5ab8589aef14440009bc4e7380bcc5a741.zip opie-baed1d5ab8589aef14440009bc4e7380bcc5a741.tar.gz opie-baed1d5ab8589aef14440009bc4e7380bcc5a741.tar.bz2 |
- convert to odebug framework
Diffstat (limited to 'libopie2/opiepim/core/opimdateconversion.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimdateconversion.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libopie2/opiepim/core/opimdateconversion.cpp b/libopie2/opiepim/core/opimdateconversion.cpp index 8bf891b..c93e178 100644 --- a/libopie2/opiepim/core/opimdateconversion.cpp +++ b/libopie2/opiepim/core/opimdateconversion.cpp | |||
@@ -28,6 +28,8 @@ _;:, .> :=|. This program is free software; you can | |||
28 | 28 | ||
29 | /* OPIE */ | 29 | /* OPIE */ |
30 | #include <opie2/opimdateconversion.h> | 30 | #include <opie2/opimdateconversion.h> |
31 | #include <opie2/odebug.h> | ||
32 | |||
31 | #include <qpe/timeconversion.h> | 33 | #include <qpe/timeconversion.h> |
32 | 34 | ||
33 | namespace Opie | 35 | namespace Opie |
@@ -46,7 +48,7 @@ QString OPimDateConversion::dateToString( const QDate &d ) | |||
46 | day = day.rightJustify( 2, '0' ); | 48 | day = day.rightJustify( 2, '0' ); |
47 | 49 | ||
48 | QString str = year + month + day; | 50 | QString str = year + month + day; |
49 | //qDebug( "\tPimContact dateToStr = %s", str.latin1() ); | 51 | //odebug << "\tPimContact dateToStr = " << str << "" << oendl; |
50 | 52 | ||
51 | return str; | 53 | return str; |
52 | } | 54 | } |
@@ -74,24 +76,24 @@ QDate OPimDateConversion::dateFromString( const QString& s ) | |||
74 | // but we isValid() again? -zecke | 76 | // but we isValid() again? -zecke |
75 | if ( year < 1900 || year > 3000 ) | 77 | if ( year < 1900 || year > 3000 ) |
76 | { | 78 | { |
77 | qWarning( "PimContact year is not in range" ); | 79 | owarn << "PimContact year is not in range" << oendl; |
78 | return date; | 80 | return date; |
79 | } | 81 | } |
80 | if ( month < 0 || month > 12 ) | 82 | if ( month < 0 || month > 12 ) |
81 | { | 83 | { |
82 | qWarning( "PimContact month is not in range" ); | 84 | owarn << "PimContact month is not in range" << oendl; |
83 | return date; | 85 | return date; |
84 | } | 86 | } |
85 | if ( day < 0 || day > 31 ) | 87 | if ( day < 0 || day > 31 ) |
86 | { | 88 | { |
87 | qWarning( "PimContact day is not in range" ); | 89 | owarn << "PimContact day is not in range" << oendl; |
88 | return date; | 90 | return date; |
89 | } | 91 | } |
90 | 92 | ||
91 | date.setYMD( year, month, day ); | 93 | date.setYMD( year, month, day ); |
92 | if ( !date.isValid() ) | 94 | if ( !date.isValid() ) |
93 | { | 95 | { |
94 | qWarning( "PimContact date is not valid" ); | 96 | owarn << "PimContact date is not valid" << oendl; |
95 | return date; | 97 | return date; |
96 | } | 98 | } |
97 | 99 | ||