[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs
From: Sergio Luis Martins <iamsergio () gmail ! com>
Date: 2010-10-09 17:13:56
Message-ID: 20101009171356.D56C9AC892 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1184272 by smartins:
Replace all code like:
setUid( uid );
setSchedulingId( sid );
with only one method call wrt the reasons mentioned in r1184268.
M +1 -2 kcalcore/icalformat.cpp
M +1 -2 kcalcore/icalformat_p.cpp
M +1 -2 kcalcore/incidence.cpp
M +3 -21 kcalutils/scheduler.cpp
--- trunk/KDE/kdepimlibs/kcalcore/icalformat.cpp #1184271:1184272
@@ -364,8 +364,7 @@
if ( i->schedulingID() != i->uid() ) {
// We have a separation of scheduling ID and UID
i = Incidence::Ptr( i->clone() );
- i->setUid( i->schedulingID() );
- i->setSchedulingID( QString() );
+ i->setSchedulingID( QString(), i->schedulingID() );
// Build the message with the cloned incidence
message = d->mImpl->createScheduleComponent( i, method );
--- trunk/KDE/kdepimlibs/kcalcore/icalformat_p.cpp #1184271:1184272
@@ -1730,8 +1730,7 @@
// The UID stored in incidencebase is actually the scheduling ID
// It has to be stored in the iCal UID component for compatibility
// with other iCal applications
- incidence->setSchedulingID( incidence->uid() );
- incidence->setUid( uid );
+ incidence->setSchedulingID( incidence->uid(), uid );
}
// Now that recurrence and exception stuff is completely set up,
--- trunk/KDE/kdepimlibs/kcalcore/incidence.cpp #1184271:1184272
@@ -290,8 +290,7 @@
KDateTime nowUTC = KDateTime::currentUtcDateTime();
setCreated( nowUTC );
- setUid( CalFormat::createUniqueId() );
- setSchedulingID( QString() );
+ setSchedulingID( QString(), CalFormat::createUniqueId() );
setRevision( 0 );
--- trunk/KDE/kdepimlibs/kcalutils/scheduler.cpp #1184271:1184272
@@ -129,16 +129,7 @@
IncidenceBase *ci = calInc.data();
IncidenceBase *ni = newInc.data();
*ci = *ni;
-
- {
- // issue4579: DON'T change this order. setUid() emits incidenceUpdated().
- // setSchedulingID() doesn't. If you change the order, kolab resource will
- // catch the signal and think there isn't any schedulingId.
- // Possible kcal improvement: create a setUids( schedulingId, uid )
- // that changes both members and emits incidenceuIpdated() at the end.
- calInc->setSchedulingID( newInc->uid() );
- calInc->setUid( oldUid );
- }
+ calInc->setSchedulingID( newInc->uid(), oldUid );
res = true;
}
}
@@ -221,16 +212,8 @@
IncidenceBase *ii = i.data();
IncidenceBase *inci = inc.data();
*ii = *inci;
- {
- // issue4579: DON'T change this order. setUid() emits incidenceUpdated().
- // setSchedulingID() doesn't. If you change the order, kolab resource will
- // catch the signal and think there isn't any schedulingId.
- // Possible kcal improvement: create a setUids( schedulingId, uid )
- // that changes both members and emits incidenceuIpdated() at the end.
- i->setSchedulingID( inc->uid() );
- i->setUid( oldUid );
+ i->setSchedulingID( inc->uid(), oldUid );
}
- }
deleteTransaction( incidence );
return res;
}
@@ -243,8 +226,7 @@
}
// Move the uid to be the schedulingID and make a unique UID
- inc->setSchedulingID( inc->uid() );
- inc->setUid( CalFormat::createUniqueId() );
+ inc->setSchedulingID( inc->uid(), CalFormat::createUniqueId() );
// notify the user in case this is an update and we didn't find the to-be-updated incidence
if ( existingIncidences.count() == 0 && inc->revision() > 0 ) {
KMessageBox::information(
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic