Репозиторий Sisyphus
Последнее обновление: 27 мая 2019 | Пакетов: 17693 | Посещений: 13605317
en ru br
Репозитории ALT
S:4.14.11-alt9.S1
5.1: 4.4.5-alt0.M51.1
4.1: 4.1.3-alt0.M41.2
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: kde4pimlibs

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alt-libical.patch
Скачать


--- a/kcalcore/icalformat_p.cpp
+++ b/kcalcore/icalformat_p.cpp
@@ -2301,8 +2301,7 @@ icaltimetype ICalFormatImpl::writeICalDa
     t.second = 0;
 
     t.is_date = 1;
-    t.is_utc = 0;
-    t.zone = 0;
+    t.zone = 0;
 
     return t;
 }
@@ -2323,7 +2322,6 @@ icaltimetype ICalFormatImpl::writeICalDa
         t.second = datetime.time().second();
     }
-    t.zone = 0;   // zone is NOT set
-    t.is_utc = datetime.isUtc() ? 1 : 0;
+    t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0;
 
     // _dumpIcaltime( t );
 
@@ -2398,7 +2397,7 @@ icalproperty *ICalFormatImpl::writeICalD
     }
 
     KTimeZone ktz;
-    if (!t.is_utc) {
+    if (!icaltime_is_utc(t)) {
         ktz = dt.timeZone();
     }
 
@@ -2431,7 +2430,7 @@ KDateTime ICalFormatImpl::readICalDateTi
 //  _dumpIcaltime( t );
 
     KDateTime::Spec timeSpec;
-    if (t.is_utc  ||  t.zone == icaltimezone_get_utc_timezone()) {
+    if (icaltime_is_utc(t)  ||  t.zone == icaltimezone_get_utc_timezone()) {
         timeSpec = KDateTime::UTC;   // the time zone is UTC
         utc = false;    // no need to convert to UTC
     } else {
--- a/kcalcore/icaltimezones.cpp
+++ b/kcalcore/icaltimezones.cpp
@@ -54,7 +54,7 @@ static QDateTime toQDateTime(const icalt
 {
     return QDateTime(QDate(t.year, t.month, t.day),
                      QTime(t.hour, t.minute, t.second),
-                     (t.is_utc ? Qt::UTC : Qt::LocalTime));
+                     (icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime));
 }
 
 // Maximum date for time zone data.
@@ -81,7 +81,6 @@ static icaltimetype writeLocalICalDateTi
     t.second = local.time().second();
     t.is_date = 0;
     t.zone = 0;
-    t.is_utc = 0;
     return t;
 }
 
@@ -886,7 +885,7 @@ ICalTimeZone ICalTimeZoneSource::parse(i
         case ICAL_LASTMODIFIED_PROPERTY:
         {
             const icaltimetype t = icalproperty_get_lastmodified(p);
-            if (t.is_utc) {
+            if (icaltime_is_utc(t)) {
                 data->d->lastModified = toQDateTime(t);
             } else {
                 kDebug() << "LAST-MODIFIED not UTC";
@@ -1259,7 +1258,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva
     // Convert DTSTART to QDateTime, and from local time to UTC
     const QDateTime localStart = toQDateTime(dtstart);     // local time
     dtstart.second -= prevOffset;
-    dtstart.is_utc = 1;
+    dtstart.zone = icaltimezone_get_utc_timezone();
     const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart));       // UTC
 
     transitions += utcStart;
@@ -1286,13 +1285,12 @@ QList<QDateTime> ICalTimeZoneSourcePriva
                     t.minute = dtstart.minute;
                     t.second = dtstart.second;
                     t.is_date = 0;
-                    t.is_utc = 0;    // dtstart is in local time
                 }
                 // RFC2445 states that RDATE must be in local time,
                 // but we support UTC as well to be safe.
-                if (!t.is_utc) {
+                if (!icaltime_is_utc(t)) {
                     t.second -= prevOffset;    // convert to UTC
-                    t.is_utc = 1;
+                    t.zone = icaltimezone_get_utc_timezone();
                     t = icaltime_normalize(t);
                 }
                 transitions += toQDateTime(t);
--- a/kcal/icalformat_p.cpp
+++ b/kcal/icalformat_p.cpp
@@ -2087,7 +2087,6 @@ icaltimetype ICalFormatImpl::writeICalDa
   t.second = 0;
 
   t.is_date = 1;
-  t.is_utc = 0;
   t.zone = 0;
 
   return t;
@@ -2106,8 +2105,7 @@ icaltimetype ICalFormatImpl::writeICalDa
   t.second = datetime.time().second();
 
   t.is_date = 0;
-  t.zone = 0;   // zone is NOT set
-  t.is_utc = datetime.isUtc() ? 1 : 0;
+  t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0;;   // zone is NOT set
 
   // _dumpIcaltime( t );
 
@@ -2174,7 +2172,7 @@ icalproperty *ICalFormatImpl::writeICalD
   }
 
   KTimeZone ktz;
-  if ( !t.is_utc ) {
+  if ( !icaltime_is_utc(t) ) {
     ktz = dt.timeZone();
   }
 
@@ -2207,7 +2205,7 @@ KDateTime ICalFormatImpl::readICalDateTi
 //  _dumpIcaltime( t );
 
   KDateTime::Spec timeSpec;
-  if ( t.is_utc  ||  t.zone == icaltimezone_get_utc_timezone() ) {
+  if ( t.zone == icaltimezone_get_utc_timezone() ) {
     timeSpec = KDateTime::UTC;   // the time zone is UTC
     utc = false;    // no need to convert to UTC
   } else {
--- a/kcal/icaltimezones.cpp
+++ b/kcal/icaltimezones.cpp
@@ -50,7 +50,7 @@ static QDateTime toQDateTime( const ical
 {
   return QDateTime( QDate( t.year, t.month, t.day ),
                     QTime( t.hour, t.minute, t.second ),
-                    ( t.is_utc ? Qt::UTC : Qt::LocalTime ) );
+                    ( icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime ) );
 }
 
 // Maximum date for time zone data.
@@ -77,7 +77,6 @@ static icaltimetype writeLocalICalDateTi
   t.second = local.time().second();
   t.is_date = 0;
   t.zone = 0;
-  t.is_utc = 0;
   return t;
 }
 
@@ -787,7 +786,7 @@ ICalTimeZone ICalTimeZoneSource::parse(
     case ICAL_LASTMODIFIED_PROPERTY:
     {
       icaltimetype t = icalproperty_get_lastmodified(p);
-      if ( t.is_utc ) {
+      if ( icaltime_is_utc(t) ) {
         data->d->lastModified = toQDateTime( t );
       } else {
         kDebug() << "LAST-MODIFIED not UTC";
@@ -972,7 +971,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva
   // Convert DTSTART to QDateTime, and from local time to UTC
   QDateTime localStart = toQDateTime( dtstart );   // local time
   dtstart.second -= prevOffset;
-  dtstart.is_utc = 1;
+  dtstart.zone = icaltimezone_get_utc_timezone();
   QDateTime utcStart = toQDateTime( icaltime_normalize( dtstart ) );   // UTC
 
   transitions += utcStart;
@@ -999,13 +998,12 @@ QList<QDateTime> ICalTimeZoneSourcePriva
           t.minute = dtstart.minute;
           t.second = dtstart.second;
           t.is_date = 0;
-          t.is_utc = 0;    // dtstart is in local time
         }
         // RFC2445 states that RDATE must be in local time,
         // but we support UTC as well to be safe.
-        if ( !t.is_utc ) {
+        if ( !icaltime_is_utc(t) ) {
           t.second -= prevOffset;    // convert to UTC
-          t.is_utc = 1;
+          t.zone = icaltimezone_get_utc_timezone();
           t = icaltime_normalize( t );
         }
         transitions += toQDateTime( t );
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin