summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2004-10-26 20:04:29 (UTC)
committer zautrix <zautrix>2004-10-26 20:04:29 (UTC)
commit8b111ae30fc51a4a580b8d485bef8ad28b0dde84 (patch) (unidiff)
treefb4cf20f5675e5ff2221ed6eea51785bdd65616c /libkcal
parent62e91b888de607fa5a9f9c0fba807287e57d5d5c (diff)
downloadkdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.zip
kdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.tar.gz
kdepimpi-8b111ae30fc51a4a580b8d485bef8ad28b0dde84.tar.bz2
fix in kapi translation call, clone fix and kde first sync fix
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidence.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 55ac6d4..5a9ef0e 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -136,97 +136,97 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
136 for( ; a1.current() && a2.current(); ++a1, ++a2 ) { 136 for( ; a1.current() && a2.current(); ++a1, ++a2 ) {
137 if( *a1.current() == *a2.current() ) { 137 if( *a1.current() == *a2.current() ) {
138 continue; 138 continue;
139 } 139 }
140 else { 140 else {
141 return false; 141 return false;
142 } 142 }
143 } 143 }
144#endif 144#endif
145 145
146 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) 146 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) )
147 return false; 147 return false;
148 if ( i1.hasStartDate() == i2.hasStartDate() ) { 148 if ( i1.hasStartDate() == i2.hasStartDate() ) {
149 if ( i1.hasStartDate() ) { 149 if ( i1.hasStartDate() ) {
150 if ( i1.dtStart() != i2.dtStart() ) 150 if ( i1.dtStart() != i2.dtStart() )
151 return false; 151 return false;
152 } 152 }
153 } else { 153 } else {
154 return false; 154 return false;
155 } 155 }
156 if (!( *i1.recurrence() == *i2.recurrence()) ) { 156 if (!( *i1.recurrence() == *i2.recurrence()) ) {
157 qDebug("recurrence is NOT equal "); 157 qDebug("recurrence is NOT equal ");
158 return false; 158 return false;
159 } 159 }
160 return 160 return
161 // i1.created() == i2.created() && 161 // i1.created() == i2.created() &&
162 stringCompare( i1.description(), i2.description() ) && 162 stringCompare( i1.description(), i2.description() ) &&
163 stringCompare( i1.summary(), i2.summary() ) && 163 stringCompare( i1.summary(), i2.summary() ) &&
164 i1.categories() == i2.categories() && 164 i1.categories() == i2.categories() &&
165 // no need to compare mRelatedTo 165 // no need to compare mRelatedTo
166 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && 166 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) &&
167 // i1.relations() == i2.relations() && 167 // i1.relations() == i2.relations() &&
168 i1.exDates() == i2.exDates() && 168 i1.exDates() == i2.exDates() &&
169 i1.attachments() == i2.attachments() && 169 i1.attachments() == i2.attachments() &&
170 i1.resources() == i2.resources() && 170 i1.resources() == i2.resources() &&
171 i1.secrecy() == i2.secrecy() && 171 i1.secrecy() == i2.secrecy() &&
172 i1.priority() == i2.priority() && 172 i1.priority() == i2.priority() &&
173 stringCompare( i1.location(), i2.location() ); 173 stringCompare( i1.location(), i2.location() );
174} 174}
175 175
176 176
177void Incidence::recreate() 177void Incidence::recreate()
178{ 178{
179 setCreated(QDateTime::currentDateTime()); 179 setCreated(QDateTime::currentDateTime());
180 180
181 setUid(CalFormat::createUniqueId()); 181 setUid(CalFormat::createUniqueId());
182 182
183 setRevision(0); 183 setRevision(0);
184 184 setIDStr( ":" );
185 setLastModified(QDateTime::currentDateTime()); 185 setLastModified(QDateTime::currentDateTime());
186} 186}
187 187
188void Incidence::setReadOnly( bool readOnly ) 188void Incidence::setReadOnly( bool readOnly )
189{ 189{
190 IncidenceBase::setReadOnly( readOnly ); 190 IncidenceBase::setReadOnly( readOnly );
191 recurrence()->setRecurReadOnly( readOnly); 191 recurrence()->setRecurReadOnly( readOnly);
192} 192}
193 193
194void Incidence::setCreated(QDateTime created) 194void Incidence::setCreated(QDateTime created)
195{ 195{
196 if (mReadOnly) return; 196 if (mReadOnly) return;
197 mCreated = getEvenTime(created); 197 mCreated = getEvenTime(created);
198} 198}
199 199
200QDateTime Incidence::created() const 200QDateTime Incidence::created() const
201{ 201{
202 return mCreated; 202 return mCreated;
203} 203}
204 204
205void Incidence::setRevision(int rev) 205void Incidence::setRevision(int rev)
206{ 206{
207 if (mReadOnly) return; 207 if (mReadOnly) return;
208 mRevision = rev; 208 mRevision = rev;
209 209
210 updated(); 210 updated();
211} 211}
212 212
213int Incidence::revision() const 213int Incidence::revision() const
214{ 214{
215 return mRevision; 215 return mRevision;
216} 216}
217 217
218void Incidence::setDtStart(const QDateTime &dtStart) 218void Incidence::setDtStart(const QDateTime &dtStart)
219{ 219{
220 220
221 QDateTime dt = getEvenTime(dtStart); 221 QDateTime dt = getEvenTime(dtStart);
222 recurrence()->setRecurStart( dt); 222 recurrence()->setRecurStart( dt);
223 IncidenceBase::setDtStart( dt ); 223 IncidenceBase::setDtStart( dt );
224} 224}
225 225
226void Incidence::setDescription(const QString &description) 226void Incidence::setDescription(const QString &description)
227{ 227{
228 if (mReadOnly) return; 228 if (mReadOnly) return;
229 mDescription = description; 229 mDescription = description;
230 updated(); 230 updated();
231} 231}
232 232