[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/libkcal
From:       Allen Winter <winter () kde ! org>
Date:       2007-02-23 14:37:46
Message-ID: 1172241466.466192.6103.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 636608 by winterz:

merge SVN commit 634259 by kainhofe:

Fix some issues which prevented RDATEs from working properly:
1) An incidence does also recur when it has rdates, even if there are no rrules \
present 2) don't blindly convert all times to the first VTIMEZONE found. If the time \
is given in Z format, don't use the timezone. 3) But if a time zone is given, also \
convert the rdate using that timezone



 M  +9 -3      icalformatimpl.cpp  
 M  +1 -1      recurrence.cpp  


--- branches/KDE/3.5/kdepim/libkcal/icalformatimpl.cpp #636607:636608
@@ -1326,7 +1326,7 @@
           if ( icaltime_is_date( rd.time ) ) {
             incidence->recurrence()->addRDate( readICalDate( rd.time ) );
           } else {
-            incidence->recurrence()->addRDateTime( readICalDateTime(rd.time ) );
+            incidence->recurrence()->addRDateTime( readICalDateTime( rd.time, tz ) \
);  }
         } else {
           // TODO: RDates as period are not yet implemented!
@@ -1407,6 +1407,7 @@
   }
   // Fix incorrect alarm settings by other applications (like outloook 9)
   if ( mCompat ) mCompat->fixAlarms( incidence );
+  
 }
 
 void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase \
*incidenceBase) @@ -1790,9 +1791,14 @@
 QDateTime ICalFormatImpl::readICalDateTime( icaltimetype& t, icaltimezone* tz )
 {
 //   kdDebug(5800) << "ICalFormatImpl::readICalDateTime()" << endl;
-  if ( tz ) {
+  icaltimezone *zone = tz;
+  if ( tz && t.is_utc == 0 ) { // Only use the TZ if time is not UTC.
+    // FIXME: We'll need to make sure to apply the appropriate TZ, not just
+    //        the first one found.
     t.zone = tz;
     t.is_utc = (tz == icaltimezone_get_utc_timezone())?1:0;
+  } else {
+    zone = icaltimezone_get_utc_timezone();
   }
   //_dumpIcaltime( t );
 
@@ -1800,7 +1806,7 @@
   if ( !mParent->timeZoneId().isEmpty() && t.zone ) {
 //    kdDebug(5800) << "--- Converting time from: " << icaltimezone_get_tzid( \
                const_cast<icaltimezone*>( t.zone ) ) << " (" << ICalDate2QDate(t) << \
                ")." << endl;
     icaltimezone* viewTimeZone = icaltimezone_get_builtin_timezone ( \
                mParent->timeZoneId().latin1() );
-    icaltimezone_convert_time(  &t, const_cast<icaltimezone*>( t.zone ), \
viewTimeZone ); +    icaltimezone_convert_time(  &t, zone, viewTimeZone );
 //    kdDebug(5800) << "--- Converted to zone " << mParent->timeZoneId() << " (" << \
ICalDate2QDate(t) << ")." << endl;  }
 
--- branches/KDE/3.5/kdepim/libkcal/recurrence.cpp #636607:636608
@@ -184,7 +184,7 @@
 
 bool Recurrence::doesRecur() const
 {
-  return !mRRules.isEmpty();
+  return !mRRules.isEmpty() || !mRDates.isEmpty() || !mRDateTimes.isEmpty();
 }
 
 ushort Recurrence::recurrenceType() const


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic