[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kcal
From: Allen Winter <winter () kde ! org>
Date: 2010-05-24 11:42:31
Message-ID: 20100524114231.87D3AAC8BE () svn ! kde ! org
[Download RAW message or body]
SVN commit 1130075 by winterz:
merge forward SVN commit 1128965 by winterz:
a better way of reading X-SUMMARY and X-LOCATION freebusy parameters.
M +14 -4 icalformat_p.cpp
--- trunk/KDE/kdepimlibs/kcal/icalformat_p.cpp #1130074:1130075
@@ -1204,6 +1204,7 @@
while ( p ) {
icalproperty_kind kind = icalproperty_isa( p );
switch ( kind ) {
+
case ICAL_DTSTART_PROPERTY: // start date and time (UTC)
freebusy->setDtStart( readICalUtcDateTimeProperty( p ) );
break;
@@ -1224,10 +1225,19 @@
Duration duration ( readICalDuration( icalperiod.duration ) );
period = FreeBusyPeriod( period_start, duration );
}
- QByteArray param = icalproperty_get_parameter_as_string( p, "X-SUMMARY" );
- period.setSummary( QString::fromUtf8( KCodecs::base64Decode( param ) ) );
- param = icalproperty_get_parameter_as_string( p, "X-LOCATION" );
- period.setLocation( QString::fromUtf8( KCodecs::base64Decode( param ) ) );
+
+ icalparameter *param = icalproperty_get_first_parameter( p, ICAL_X_PARAMETER );
+ while ( param ) {
+ if ( strncmp( icalparameter_get_xname( param ), "X-SUMMARY", 9 ) == 0 ) {
+ period.setSummary( QString::fromUtf8(
+ KCodecs::base64Decode( icalparameter_get_xvalue( param ) ) ) );
+ }
+ if ( strncmp( icalparameter_get_xname( param ), "X-LOCATION", 10 ) == 0 ) {
+ period.setLocation( QString::fromUtf8(
+ KCodecs::base64Decode( icalparameter_get_xvalue( param ) ) ) );
+ }
+ param = icalproperty_get_next_parameter( p, ICAL_X_PARAMETER );
+ }
periods.append( period );
break;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic