author | zautrix <zautrix> | 2005-02-07 20:05:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-07 20:05:18 (UTC) |
commit | da5e47069d88fa9aa656423ce4c60bf505728e1c (patch) (unidiff) | |
tree | fdbaf29835a028f1204a19fc10dea97d469c0b29 /libkcal/event.cpp | |
parent | 456b0246521847635fe98471691ceecae211e0c3 (diff) | |
download | kdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.zip kdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.tar.gz kdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.tar.bz2 |
fixes
-rw-r--r-- | libkcal/event.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp index 7256f05..de8dceb 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp | |||
@@ -86,13 +86,13 @@ bool Event::contains ( Event* from ) | |||
86 | return false; | 86 | return false; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | QStringList cat = categories(); | 89 | QStringList cat = categories(); |
90 | QStringList catFrom = from->categories(); | 90 | QStringList catFrom = from->categories(); |
91 | QString nCat; | 91 | QString nCat; |
92 | int iii; | 92 | unsigned int iii; |
93 | for ( iii = 0; iii < catFrom.count();++iii ) { | 93 | for ( iii = 0; iii < catFrom.count();++iii ) { |
94 | nCat = catFrom[iii]; | 94 | nCat = catFrom[iii]; |
95 | if ( !nCat.isEmpty() ) | 95 | if ( !nCat.isEmpty() ) |
96 | if ( !cat.contains( nCat )) { | 96 | if ( !cat.contains( nCat )) { |
97 | return false; | 97 | return false; |
98 | } | 98 | } |
@@ -117,14 +117,12 @@ void Event::setDtEnd(const QDateTime &dtEnd) | |||
117 | 117 | ||
118 | QDateTime Event::dtEnd() const | 118 | QDateTime Event::dtEnd() const |
119 | { | 119 | { |
120 | if (hasEndDate()) return mDtEnd; | 120 | if (hasEndDate()) return mDtEnd; |
121 | if (hasDuration()) return dtStart().addSecs(duration()); | 121 | if (hasDuration()) return dtStart().addSecs(duration()); |
122 | 122 | ||
123 | kdDebug(5800) << "Warning! Event '" << summary() | ||
124 | << "' does have neither end date nor duration." << endl; | ||
125 | return dtStart(); | 123 | return dtStart(); |
126 | } | 124 | } |
127 | 125 | ||
128 | QString Event::dtEndTimeStr() const | 126 | QString Event::dtEndTimeStr() const |
129 | { | 127 | { |
130 | return KGlobal::locale()->formatTime(mDtEnd.time()); | 128 | return KGlobal::locale()->formatTime(mDtEnd.time()); |
@@ -182,13 +180,13 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const | |||
182 | *ok = false; | 180 | *ok = false; |
183 | return QDateTime (); | 181 | return QDateTime (); |
184 | } | 182 | } |
185 | 183 | ||
186 | bool enabled = false; | 184 | bool enabled = false; |
187 | Alarm* alarm; | 185 | Alarm* alarm; |
188 | int off; | 186 | int off = 0; |
189 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 187 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
190 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 188 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
191 | // *ok = false; | 189 | // *ok = false; |
192 | // return incidenceStart; | 190 | // return incidenceStart; |
193 | // } | 191 | // } |
194 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 192 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |