author | zautrix <zautrix> | 2004-08-09 12:44:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-09 12:44:25 (UTC) |
commit | 48f53b2d2e7ed189e88f924259693ab66ff44b7f (patch) (unidiff) | |
tree | 19bcb263aef667ee236b4d49cea89985331805bd | |
parent | e0ba2d4770094974ec4a2a48af436a7df9a055bc (diff) | |
download | kdepimpi-48f53b2d2e7ed189e88f924259693ab66ff44b7f.zip kdepimpi-48f53b2d2e7ed189e88f924259693ab66ff44b7f.tar.gz kdepimpi-48f53b2d2e7ed189e88f924259693ab66ff44b7f.tar.bz2 |
recurrence fixes
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | libkcal/phoneformat.cpp | 34 |
2 files changed, 26 insertions, 10 deletions
@@ -2,3 +2,3 @@ | |||
2 | # Makefile for building: kopi-desktop | 2 | # Makefile for building: kopi-desktop |
3 | # Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 12:10:32 2004 | 3 | # Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 13:18:13 2004 |
4 | # Project: kopi-desktop.pro | 4 | # Project: kopi-desktop.pro |
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index bc1b863..596148e 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp | |||
@@ -345,3 +345,3 @@ public: | |||
345 | QString recurString = "no"; | 345 | QString recurString = "no"; |
346 | if ( repeating ) { | 346 | if ( repeating && repeat_frequency != -1) { |
347 | recurString = "y"; | 347 | recurString = "y"; |
@@ -361,6 +361,8 @@ public: | |||
361 | QDate startDate, endDate; | 361 | QDate startDate, endDate; |
362 | if ( repeat_startdate.Day > 0 ) | 362 | if ( repeat_startdate.Day > 0 ) { |
363 | startDate = datefromGSM ( &repeat_startdate ); | 363 | startDate = datefromGSM ( &repeat_startdate ); |
364 | else | 364 | event->setDtStart(QDateTime ( startDate, event->dtStart().time())); |
365 | } else { | ||
365 | startDate = event->dtStart().date(); | 366 | startDate = event->dtStart().date(); |
367 | } | ||
366 | int freq = repeat_frequency; | 368 | int freq = repeat_frequency; |
@@ -373,3 +375,3 @@ public: | |||
373 | uint weekDaysNum = repeat_dayofweek ; | 375 | uint weekDaysNum = repeat_dayofweek ; |
374 | 376 | // 1 == monday, 7 == sunday | |
375 | QBitArray weekDays( 7 ); | 377 | QBitArray weekDays( 7 ); |
@@ -400,3 +402,3 @@ public: | |||
400 | if ( repeat_weekofmonth >= 0 ) { | 402 | if ( repeat_weekofmonth >= 0 ) { |
401 | rtype = 2; | 403 | rtype = 2; // ************************ 2 MonthlyPos |
402 | pos = repeat_weekofmonth; | 404 | pos = repeat_weekofmonth; |
@@ -404,8 +406,22 @@ public: | |||
404 | dayOfWeek = repeat_dayofweek; | 406 | dayOfWeek = repeat_dayofweek; |
407 | if (repeat_month > 0) { | ||
408 | if ( repeat_month != event->dtStart().date().month() ) { | ||
409 | QDate date (event->dtStart().date().year(),repeat_month,event->dtStart().date().day() ); | ||
410 | event->setDtStart(QDateTime ( date , event->dtStart().time()) ); | ||
411 | } | ||
412 | if ( freq == 1 ) | ||
413 | freq = 12; | ||
414 | } | ||
405 | } else if ( repeat_dayofweek >= 0 ) { | 415 | } else if ( repeat_dayofweek >= 0 ) { |
406 | rtype = 1; | 416 | rtype = 1;// ************************ 1 Weekly |
407 | } if ( repeat_dayofweek >= 0 ) { | 417 | } else if ( repeat_day >= 0 ) { |
408 | rtype = 1; | 418 | if ( repeat_month > 0) { |
419 | rtype = 4; | ||
420 | } else { | ||
421 | rtype = 3; | ||
422 | } | ||
423 | } else { | ||
424 | rtype = 0 ; | ||
409 | } | 425 | } |
410 | 426 | ||
411 | if ( rtype == 0 ) { | 427 | if ( rtype == 0 ) { |