-rw-r--r-- | libkcal/alarm.cpp | 2 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index d8f15b5..6de1566 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp | |||
@@ -345,33 +345,33 @@ int Alarm::offset() | |||
345 | return mParent->dtStart().secsTo( mAlarmTime ) ; | 345 | return mParent->dtStart().secsTo( mAlarmTime ) ; |
346 | } | 346 | } |
347 | else | 347 | else |
348 | { | 348 | { |
349 | return mOffset.asSeconds(); | 349 | return mOffset.asSeconds(); |
350 | } | 350 | } |
351 | 351 | ||
352 | } | 352 | } |
353 | QString Alarm::offsetText() | 353 | QString Alarm::offsetText() |
354 | { | 354 | { |
355 | int min = -offset()/60; | 355 | int min = -offset()/60; |
356 | int hours = min /60; | 356 | int hours = min /60; |
357 | min = min % 60; | 357 | min = min % 60; |
358 | int days = hours /24; | 358 | int days = hours /24; |
359 | hours = hours % 24; | 359 | hours = hours % 24; |
360 | QString message; | 360 | QString message; |
361 | qDebug("%d %d %d ", days, hours, min ); | 361 | //qDebug("%d %d %d ", days, hours, min ); |
362 | if ( days > 0 ) | 362 | if ( days > 0 ) |
363 | message += i18n("%1d").arg( days ); | 363 | message += i18n("%1d").arg( days ); |
364 | if ( hours > 0 ) { | 364 | if ( hours > 0 ) { |
365 | if ( !message.isEmpty() ) message += "/"; | 365 | if ( !message.isEmpty() ) message += "/"; |
366 | message += i18n("%1h").arg( hours ); | 366 | message += i18n("%1h").arg( hours ); |
367 | } | 367 | } |
368 | if ( min > 0 ) { | 368 | if ( min > 0 ) { |
369 | if ( !message.isEmpty() ) message += "/"; | 369 | if ( !message.isEmpty() ) message += "/"; |
370 | message += i18n("%1min").arg( min ); | 370 | message += i18n("%1min").arg( min ); |
371 | } | 371 | } |
372 | if ( message.isEmpty() ) | 372 | if ( message.isEmpty() ) |
373 | message = i18n("%1min").arg( 0 ); | 373 | message = i18n("%1min").arg( 0 ); |
374 | return message; | 374 | return message; |
375 | } | 375 | } |
376 | 376 | ||
377 | 377 | ||
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 8ae5b46..7d61b7f 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -270,33 +270,33 @@ void KIncidenceFormatter::setTodo(Todo *event ) | |||
270 | if ( mDetails ) { | 270 | if ( mDetails ) { |
271 | if (!event->description().isEmpty()) { | 271 | if (!event->description().isEmpty()) { |
272 | addTag("p",i18n("<b>Details: </b>")); | 272 | addTag("p",i18n("<b>Details: </b>")); |
273 | addTag("p",deTag(event->description())); | 273 | addTag("p",deTag(event->description())); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||
278 | void KIncidenceFormatter::setJournal(Journal* ) | 278 | void KIncidenceFormatter::setJournal(Journal* ) |
279 | { | 279 | { |
280 | 280 | ||
281 | } | 281 | } |
282 | 282 | ||
283 | void KIncidenceFormatter::formatCategories(Incidence *event) | 283 | void KIncidenceFormatter::formatCategories(Incidence *event) |
284 | { | 284 | { |
285 | if (!event->categoriesStr().isEmpty()) { | 285 | if (!event->categoriesStr().isEmpty()) { |
286 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); | 286 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStrWithSpace() ); |
287 | //mText.append(event->categoriesStr()); | 287 | //mText.append(event->categoriesStr()); |
288 | } | 288 | } |
289 | } | 289 | } |
290 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) | 290 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) |
291 | { | 291 | { |
292 | int number=text.contains("\n"); | 292 | int number=text.contains("\n"); |
293 | QString str = "<" + tag + ">"; | 293 | QString str = "<" + tag + ">"; |
294 | QString tmpText=text; | 294 | QString tmpText=text; |
295 | QString tmpStr=str; | 295 | QString tmpStr=str; |
296 | if(number !=-1) | 296 | if(number !=-1) |
297 | { | 297 | { |
298 | if (number > 0) { | 298 | if (number > 0) { |
299 | int pos=0; | 299 | int pos=0; |
300 | QString tmp; | 300 | QString tmp; |
301 | for(int i=0;i<=number;i++) { | 301 | for(int i=0;i<=number;i++) { |
302 | pos=tmpText.find("\n"); | 302 | pos=tmpText.find("\n"); |