summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp4
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp4
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp4
-rw-r--r--korganizer/kotodoviewitem.cpp2
-rw-r--r--korganizer/kotodoviewitem.h2
-rw-r--r--korganizer/koviewmanager.cpp2
-rw-r--r--korganizer/searchdialog.cpp22
-rw-r--r--korganizer/timespanview.cpp2
-rw-r--r--libkcal/icalformatimpl.cpp6
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp10
-rw-r--r--microkde/kcalendarsystemgregorian.cpp8
11 files changed, 31 insertions, 35 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index 6fcd73f..9d8c5ce 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -309,33 +309,33 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field )
309 return; 309 return;
310 mCardView->viewport()->setUpdatesEnabled( false ); 310 mCardView->viewport()->setUpdatesEnabled( false );
311 KABC::Addressee::List addresseeList = addressees(); 311 KABC::Addressee::List addresseeList = addressees();
312 KABC::Addressee::List::Iterator it; 312 KABC::Addressee::List::Iterator it;
313 if ( field ) { 313 if ( field ) {
314 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 314 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
315 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 315 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
316 continue; 316 continue;
317#if QT_VERSION >= 300 317#if QT_VERSION >= 0x030000
318 if (re.search(field->value( *it ).lower()) != -1) 318 if (re.search(field->value( *it ).lower()) != -1)
319#else 319#else
320 if (re.match(field->value( *it ).lower()) != -1) 320 if (re.match(field->value( *it ).lower()) != -1)
321#endif 321#endif
322 new AddresseeCardViewItem(fields(), mShowEmptyFields, 322 new AddresseeCardViewItem(fields(), mShowEmptyFields,
323 addressBook(), *it, mCardView); 323 addressBook(), *it, mCardView);
324 324
325 } 325 }
326 } else { 326 } else {
327 KABC::Field::List fieldList = allFields(); 327 KABC::Field::List fieldList = allFields();
328 KABC::Field::List::ConstIterator fieldIt; 328 KABC::Field::List::ConstIterator fieldIt;
329 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 329 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
330 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 330 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
331 continue; 331 continue;
332 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 332 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
333#if QT_VERSION >= 300 333#if QT_VERSION >= 0x030000
334 if (re.search((*fieldIt)->value( *it ).lower()) != -1) 334 if (re.search((*fieldIt)->value( *it ).lower()) != -1)
335#else 335#else
336 if (re.match((*fieldIt)->value( *it ).lower()) != -1) 336 if (re.match((*fieldIt)->value( *it ).lower()) != -1)
337#endif 337#endif
338 { 338 {
339 new AddresseeCardViewItem(fields(), mShowEmptyFields, 339 new AddresseeCardViewItem(fields(), mShowEmptyFields,
340 addressBook(), *it, mCardView); 340 addressBook(), *it, mCardView);
341 break; 341 break;
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index ef0a23a..fb53215 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -267,33 +267,33 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
267 if (!re.isValid()) 267 if (!re.isValid())
268 return; 268 return;
269 KABC::Addressee::List addresseeList = addressees(); 269 KABC::Addressee::List addresseeList = addressees();
270 KABC::Addressee::List::Iterator it; 270 KABC::Addressee::List::Iterator it;
271 if ( field ) { 271 if ( field ) {
272 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 272 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
273 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 273 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
274 continue; 274 continue;
275#if QT_VERSION >= 300 275#if QT_VERSION >= 0x030000
276 if (re.search(field->value( *it ).lower()) != -1) 276 if (re.search(field->value( *it ).lower()) != -1)
277#else 277#else
278 if (re.match(field->value( *it ).lower()) != -1) 278 if (re.match(field->value( *it ).lower()) != -1)
279#endif 279#endif
280 mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); 280 mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView ));
281 281
282 282
283 } 283 }
284 } else { 284 } else {
285 KABC::Field::List fieldList = allFields(); 285 KABC::Field::List fieldList = allFields();
286 KABC::Field::List::ConstIterator fieldIt; 286 KABC::Field::List::ConstIterator fieldIt;
287 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 287 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
288 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 288 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
289 continue; 289 continue;
290 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 290 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
291#if QT_VERSION >= 300 291#if QT_VERSION >= 0x030000
292 if (re.search((*fieldIt)->value( *it ).lower()) != -1) 292 if (re.search((*fieldIt)->value( *it ).lower()) != -1)
293#else 293#else
294 if (re.match((*fieldIt)->value( *it ).lower()) != -1) 294 if (re.match((*fieldIt)->value( *it ).lower()) != -1)
295#endif 295#endif
296 { 296 {
297 mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); 297 mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView ));
298 break; 298 break;
299 } 299 }
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 7022dcb..69802a4 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -151,32 +151,32 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
151 if (!re.isValid()) 151 if (!re.isValid())
152 return; 152 return;
153 KABC::Addressee::List addresseeList = addressees(); 153 KABC::Addressee::List addresseeList = addressees();
154 KABC::Addressee::List::Iterator it; 154 KABC::Addressee::List::Iterator it;
155 if ( field ) { 155 if ( field ) {
156 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 156 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
157 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 157 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
158 continue; 158 continue;
159#if QT_VERSION >= 300 159#if QT_VERSION >= 0x030000
160 if (re.search(field->value( *it ).lower()) == 0) 160 if (re.search(field->value( *it ).lower()) == 0)
161#else 161#else
162 if (re.match(field->value( *it ).lower()) != -1) 162 if (re.match(field->value( *it ).lower()) != -1)
163#endif 163#endif
164 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); 164 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
165 165
166 } 166 }
167 } else { 167 } else {
168 KABC::Field::List fieldList = allFields(); 168 KABC::Field::List fieldList = allFields();
169 KABC::Field::List::ConstIterator fieldIt; 169 KABC::Field::List::ConstIterator fieldIt;
170 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { 170 for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
171 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 171 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
172 continue; 172 continue;
173 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 173 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
174#if QT_VERSION >= 300 174#if QT_VERSION >= 0x030000
175 if (re.search((*fieldIt)->value( *it ).lower()) != -1) 175 if (re.search((*fieldIt)->value( *it ).lower()) != -1)
176#else 176#else
177 if (re.match((*fieldIt)->value( *it ).lower()) != -1) 177 if (re.match((*fieldIt)->value( *it ).lower()) != -1)
178#endif 178#endif
179 { 179 {
180 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); 180 ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
181 break; 181 break;
182 } 182 }
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index ead8628..21ecb73 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -59,17 +59,17 @@ void KOTodoViewItem:: setup()
59 setHeight( h ); 59 setHeight( h );
60 60
61} 61}
62void KOTodoViewItem::setSortKey(int column,const QString &key) 62void KOTodoViewItem::setSortKey(int column,const QString &key)
63{ 63{
64 mKeyMap.insert(column,key); 64 mKeyMap.insert(column,key);
65} 65}
66 66
67#if QT_VERSION >= 300 67#if QT_VERSION >= 0x030000
68void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, 68void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
69 int y,int h) 69 int y,int h)
70{ 70{
71 QListViewItem::paintBranches(p,cg,w,y,h); 71 QListViewItem::paintBranches(p,cg,w,y,h);
72} 72}
73#else 73#else
74#endif 74#endif
75 75
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index 74dbe98..bd024c8 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -67,17 +67,17 @@ class KOTodoViewItem : public QCheckListItem
67 void setSortKey(int column,const QString &key); 67 void setSortKey(int column,const QString &key);
68 68
69 bool isAlternate(); 69 bool isAlternate();
70 70
71 virtual void paintCell(QPainter *p, const QColorGroup &cg, 71 virtual void paintCell(QPainter *p, const QColorGroup &cg,
72 int column, int width, int alignment); 72 int column, int width, int alignment);
73 virtual void setup(); 73 virtual void setup();
74 protected: 74 protected:
75#if QT_VERSION >= 300 75#if QT_VERSION >= 0x030000
76 void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h); 76 void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h);
77#else 77#else
78#endif 78#endif
79 virtual void stateChange(bool); 79 virtual void stateChange(bool);
80 void setMyPixmap(); 80 void setMyPixmap();
81 81
82 private: 82 private:
83 Todo *mTodo; 83 Todo *mTodo;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f6b7718..e255b83 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -570,17 +570,17 @@ QDate KOViewManager::currentSelectionDate()
570 DateList qvl = mCurrentView->selectedDates(); 570 DateList qvl = mCurrentView->selectedDates();
571 if (!qvl.isEmpty()) qd = qvl.first(); 571 if (!qvl.isEmpty()) qd = qvl.first();
572 } 572 }
573 return qd; 573 return qd;
574} 574}
575 575
576void KOViewManager::addView(KOrg::BaseView *view) 576void KOViewManager::addView(KOrg::BaseView *view)
577{ 577{
578#if QT_VERSION >= 300 578#if QT_VERSION >= 0x030000
579 mMainView->viewStack()->addWidget( view ); 579 mMainView->viewStack()->addWidget( view );
580#else 580#else
581 mMainView->viewStack()->addWidget( view, 1 ); 581 mMainView->viewStack()->addWidget( view, 1 );
582#endif 582#endif
583} 583}
584 584
585void KOViewManager::setDocumentId( const QString &id ) 585void KOViewManager::setDocumentId( const QString &id )
586{ 586{
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 72ee1d2..39966b5 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -229,65 +229,65 @@ void SearchDialog::search(const QRegExp &re)
229 mEndDate->date(), 229 mEndDate->date(),
230 false /*mInclusiveCheck->isChecked()*/ ); 230 false /*mInclusiveCheck->isChecked()*/ );
231 231
232 mMatchedEvents.clear(); 232 mMatchedEvents.clear();
233 if ( mSearchEvent->isChecked() ) { 233 if ( mSearchEvent->isChecked() ) {
234 Event *ev; 234 Event *ev;
235 for(ev=events.first();ev;ev=events.next()) { 235 for(ev=events.first();ev;ev=events.next()) {
236 if (mSummaryCheck->isChecked()) { 236 if (mSummaryCheck->isChecked()) {
237#if QT_VERSION >= 300 237#if QT_VERSION >= 0x030000
238 if (re.search(ev->summary()) != -1) 238 if (re.search(ev->summary()) != -1)
239#else 239#else
240 if (re.match(ev->summary()) != -1) 240 if (re.match(ev->summary()) != -1)
241#endif 241#endif
242 { 242 {
243 mMatchedEvents.append(ev); 243 mMatchedEvents.append(ev);
244 continue; 244 continue;
245 } 245 }
246 } 246 }
247 if (mDescriptionCheck->isChecked()) { 247 if (mDescriptionCheck->isChecked()) {
248#if QT_VERSION >= 300 248#if QT_VERSION >= 0x030000
249 if (re.search(ev->description()) != -1) 249 if (re.search(ev->description()) != -1)
250#else 250#else
251 if (re.match(ev->description()) != -1) 251 if (re.match(ev->description()) != -1)
252#endif 252#endif
253 { 253 {
254 mMatchedEvents.append(ev); 254 mMatchedEvents.append(ev);
255 continue; 255 continue;
256 } 256 }
257 } 257 }
258 if (mCategoryCheck->isChecked()) { 258 if (mCategoryCheck->isChecked()) {
259#if QT_VERSION >= 300 259#if QT_VERSION >= 0x030000
260 if (re.search(ev->categoriesStr()) != -1) 260 if (re.search(ev->categoriesStr()) != -1)
261#else 261#else
262 if (re.match(ev->categoriesStr()) != -1) 262 if (re.match(ev->categoriesStr()) != -1)
263#endif 263#endif
264 { 264 {
265 mMatchedEvents.append(ev); 265 mMatchedEvents.append(ev);
266 continue; 266 continue;
267 } 267 }
268 } 268 }
269 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 269 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
270 QPtrList<Attendee> tmpAList = ev->attendees(); 270 QPtrList<Attendee> tmpAList = ev->attendees();
271 Attendee *a; 271 Attendee *a;
272 for (a = tmpAList.first(); a; a = tmpAList.next()) { 272 for (a = tmpAList.first(); a; a = tmpAList.next()) {
273 if (mSearchAName->isChecked()) { 273 if (mSearchAName->isChecked()) {
274#if QT_VERSION >= 300 274#if QT_VERSION >= 0x030000
275 if (re.search(a->name()) != -1) 275 if (re.search(a->name()) != -1)
276#else 276#else
277 if (re.match(a->name()) != -1) 277 if (re.match(a->name()) != -1)
278#endif 278#endif
279 { 279 {
280 mMatchedEvents.append(ev); 280 mMatchedEvents.append(ev);
281 break; 281 break;
282 } 282 }
283 } 283 }
284 if (mSearchAEmail->isChecked()) { 284 if (mSearchAEmail->isChecked()) {
285#if QT_VERSION >= 300 285#if QT_VERSION >= 0x030000
286 if (re.search(a->email()) != -1) 286 if (re.search(a->email()) != -1)
287#else 287#else
288 if (re.match(a->email()) != -1) 288 if (re.match(a->email()) != -1)
289#endif 289#endif
290 { 290 {
291 mMatchedEvents.append(ev); 291 mMatchedEvents.append(ev);
292 break; 292 break;
293 } 293 }
@@ -297,65 +297,65 @@ void SearchDialog::search(const QRegExp &re)
297 } 297 }
298 } 298 }
299 QPtrList<Todo> todos = mCalendar->todos( ); 299 QPtrList<Todo> todos = mCalendar->todos( );
300 mMatchedTodos.clear(); 300 mMatchedTodos.clear();
301 if ( mSearchTodo->isChecked() ) { 301 if ( mSearchTodo->isChecked() ) {
302 Todo *tod; 302 Todo *tod;
303 for(tod=todos.first();tod;tod=todos.next()) { 303 for(tod=todos.first();tod;tod=todos.next()) {
304 if (mSummaryCheck->isChecked()) { 304 if (mSummaryCheck->isChecked()) {
305#if QT_VERSION >= 300 305#if QT_VERSION >= 0x030000
306 if (re.search(tod->summary()) != -1) 306 if (re.search(tod->summary()) != -1)
307#else 307#else
308 if (re.match(tod->summary()) != -1) 308 if (re.match(tod->summary()) != -1)
309#endif 309#endif
310 { 310 {
311 mMatchedTodos.append(tod); 311 mMatchedTodos.append(tod);
312 continue; 312 continue;
313 } 313 }
314 } 314 }
315 if (mDescriptionCheck->isChecked()) { 315 if (mDescriptionCheck->isChecked()) {
316#if QT_VERSION >= 300 316#if QT_VERSION >= 0x030000
317 if (re.search(tod->description()) != -1) 317 if (re.search(tod->description()) != -1)
318#else 318#else
319 if (re.match(tod->description()) != -1) 319 if (re.match(tod->description()) != -1)
320#endif 320#endif
321 { 321 {
322 mMatchedTodos.append(tod); 322 mMatchedTodos.append(tod);
323 continue; 323 continue;
324 } 324 }
325 } 325 }
326 if (mCategoryCheck->isChecked()) { 326 if (mCategoryCheck->isChecked()) {
327#if QT_VERSION >= 300 327#if QT_VERSION >= 0x030000
328 if (re.search(tod->categoriesStr()) != -1) 328 if (re.search(tod->categoriesStr()) != -1)
329#else 329#else
330 if (re.match(tod->categoriesStr()) != -1) 330 if (re.match(tod->categoriesStr()) != -1)
331#endif 331#endif
332 { 332 {
333 mMatchedTodos.append(tod); 333 mMatchedTodos.append(tod);
334 continue; 334 continue;
335 } 335 }
336 } 336 }
337 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 337 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
338 QPtrList<Attendee> tmpAList = tod->attendees(); 338 QPtrList<Attendee> tmpAList = tod->attendees();
339 Attendee *a; 339 Attendee *a;
340 for (a = tmpAList.first(); a; a = tmpAList.next()) { 340 for (a = tmpAList.first(); a; a = tmpAList.next()) {
341 if (mSearchAName->isChecked()) { 341 if (mSearchAName->isChecked()) {
342#if QT_VERSION >= 300 342#if QT_VERSION >= 0x030000
343 if (re.search(a->name()) != -1) 343 if (re.search(a->name()) != -1)
344#else 344#else
345 if (re.match(a->name()) != -1) 345 if (re.match(a->name()) != -1)
346#endif 346#endif
347 { 347 {
348 mMatchedTodos.append(tod); 348 mMatchedTodos.append(tod);
349 break; 349 break;
350 } 350 }
351 } 351 }
352 if (mSearchAEmail->isChecked()) { 352 if (mSearchAEmail->isChecked()) {
353#if QT_VERSION >= 300 353#if QT_VERSION >= 0x030000
354 if (re.search(a->email()) != -1) 354 if (re.search(a->email()) != -1)
355#else 355#else
356 if (re.match(a->email()) != -1) 356 if (re.match(a->email()) != -1)
357#endif 357#endif
358 { 358 {
359 mMatchedTodos.append(tod); 359 mMatchedTodos.append(tod);
360 break; 360 break;
361 } 361 }
@@ -367,17 +367,17 @@ void SearchDialog::search(const QRegExp &re)
367 mMatchedJournals.clear(); 367 mMatchedJournals.clear();
368 if (mSearchJournal->isChecked() ) { 368 if (mSearchJournal->isChecked() ) {
369 QPtrList<Journal> journals = mCalendar->journals( ); 369 QPtrList<Journal> journals = mCalendar->journals( );
370 Journal* journ; 370 Journal* journ;
371 371
372 for(journ=journals.first();journ;journ=journals.next()) { 372 for(journ=journals.first();journ;journ=journals.next()) {
373 if ( journ->dtStart().date() <= mEndDate->date() 373 if ( journ->dtStart().date() <= mEndDate->date()
374 &&journ->dtStart().date() >= mStartDate->date()) { 374 &&journ->dtStart().date() >= mStartDate->date()) {
375#if QT_VERSION >= 300 375#if QT_VERSION >= 0x030000
376 if (re.search(journ->description()) != -1) 376 if (re.search(journ->description()) != -1)
377#else 377#else
378 if (re.match(journ->description()) != -1) 378 if (re.match(journ->description()) != -1)
379#endif 379#endif
380 { 380 {
381 mMatchedJournals.append(journ); 381 mMatchedJournals.append(journ);
382 continue; 382 continue;
383 } 383 }
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index 67a3811..df8ff88 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -100,17 +100,17 @@ void TimeSpanView::addItem( KCal::Event *event )
100void TimeSpanView::clear() 100void TimeSpanView::clear()
101{ 101{
102 mList->clear(); 102 mList->clear();
103 mLineView->clear(); 103 mLineView->clear();
104} 104}
105 105
106void TimeSpanView::updateView() 106void TimeSpanView::updateView()
107{ 107{
108#if QT_VERSION >= 300 108#if QT_VERSION >= 0x030000
109 mLineView->updateContents(); 109 mLineView->updateContents();
110 mTimeLine->updateContents(); 110 mTimeLine->updateContents();
111#else 111#else
112#endif 112#endif
113} 113}
114 114
115void TimeSpanView::setDateRange( const QDateTime &start, const QDateTime &end ) 115void TimeSpanView::setDateRange( const QDateTime &start, const QDateTime &end )
116{ 116{
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index c23978d..bd13132 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -198,21 +198,17 @@ icalcomponent *ICalFormatImpl::writeEvent(Event *event)
198 } 198 }
199 199
200 return vevent; 200 return vevent;
201} 201}
202 202
203icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy, 203icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy,
204 Scheduler::Method method) 204 Scheduler::Method method)
205{ 205{
206#if QT_VERSION >= 300 206
207 kdDebug(5800) << "icalformatimpl: writeFreeBusy: startDate: "
208 << freebusy->dtStart().toString("ddd MMMM d yyyy: h:m:s ap") << " End Date: "
209 << freebusy->dtEnd().toString("ddd MMMM d yyyy: h:m:s ap") << endl;
210#endif
211 207
212 icalcomponent *vfreebusy = icalcomponent_new(ICAL_VFREEBUSY_COMPONENT); 208 icalcomponent *vfreebusy = icalcomponent_new(ICAL_VFREEBUSY_COMPONENT);
213 209
214 writeIncidenceBase(vfreebusy,freebusy); 210 writeIncidenceBase(vfreebusy,freebusy);
215 211
216 icalcomponent_add_property(vfreebusy, icalproperty_new_dtstart( 212 icalcomponent_add_property(vfreebusy, icalproperty_new_dtstart(
217 writeICalDateTime(freebusy->dtStart()))); 213 writeICalDateTime(freebusy->dtStart())));
218 214
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 60b8bc7..567ae54 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -31,18 +31,18 @@
31 ** 31 **
32 **********************************************************************/ 32 **********************************************************************/
33 33
34#include "KDGanttMinimizeSplitter.h" 34#include "KDGanttMinimizeSplitter.h"
35#ifndef QT_NO_SPLITTER___ 35#ifndef QT_NO_SPLITTER___
36 36
37#include "qpainter.h" 37#include "qpainter.h"
38#include "qdrawutil.h" 38#include "qdrawutil.h"
39#include "qbitmap.h" 39#include "qbitmap.h"
40#if QT_VERSION >= 300 40#if QT_VERSION >= 0x030000
41#include "qptrlist.h" 41#include "qptrlist.h"
42#include "qmemarray.h" 42#include "qmemarray.h"
43#else 43#else
44#include <qlist.h> 44#include <qlist.h>
45#include <qarray.h> 45#include <qarray.h>
46#define QPtrList QList 46#define QPtrList QList
47#define QMemArray QArray 47#define QMemArray QArray
48#endif 48#endif
@@ -622,17 +622,17 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
622void KDGanttMinimizeSplitter::setRubberband( int p ) 622void KDGanttMinimizeSplitter::setRubberband( int p )
623{ 623{
624 QPainter paint( this ); 624 QPainter paint( this );
625 paint.setPen( gray ); 625 paint.setPen( gray );
626 paint.setBrush( gray ); 626 paint.setBrush( gray );
627 paint.setRasterOp( XorROP ); 627 paint.setRasterOp( XorROP );
628 QRect r = contentsRect(); 628 QRect r = contentsRect();
629 const int rBord = 3; //Themable???? 629 const int rBord = 3; //Themable????
630#if QT_VERSION >= 300 630#if QT_VERSION >= 0x030000
631 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); 631 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
632#else 632#else
633 int sw = style().splitterWidth(); 633 int sw = style().splitterWidth();
634#endif 634#endif
635 if ( orient == Horizontal ) { 635 if ( orient == Horizontal ) {
636 if ( opaqueOldPos >= 0 ) 636 if ( opaqueOldPos >= 0 )
637 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), 637 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
638 2*rBord, r.height() ); 638 2*rBord, r.height() );
@@ -904,17 +904,17 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
904 maxA += s->sizer; 904 maxA += s->sizer;
905 } else { 905 } else {
906 minA += pick( minSize(s->wid) ); 906 minA += pick( minSize(s->wid) );
907 maxA += pick( s->wid->maximumSize() ); 907 maxA += pick( s->wid->maximumSize() );
908 } 908 }
909 } 909 }
910 QRect r = contentsRect(); 910 QRect r = contentsRect();
911 if ( orient == Horizontal && false ) { 911 if ( orient == Horizontal && false ) {
912#if QT_VERSION >= 300 912#if QT_VERSION >= 0x030000
913 int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this); 913 int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this);
914#else 914#else
915 int splitterWidth = style().splitterWidth(); 915 int splitterWidth = style().splitterWidth();
916#endif 916#endif
917 917
918 if ( min ) 918 if ( min )
919 *min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth; 919 *min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth;
920 if ( max ) 920 if ( max )
@@ -1382,17 +1382,17 @@ void KDGanttMinimizeSplitter::processChildEvents()
1382 1382
1383/*! 1383/*!
1384 \reimp 1384 \reimp
1385*/ 1385*/
1386 1386
1387void KDGanttMinimizeSplitter::styleChange( QStyle& old ) 1387void KDGanttMinimizeSplitter::styleChange( QStyle& old )
1388{ 1388{
1389 1389
1390#if QT_VERSION >= 300 1390#if QT_VERSION >= 0x030000
1391 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); 1391 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
1392#else 1392#else
1393 int sw = style().splitterWidth(); 1393 int sw = style().splitterWidth();
1394#endif 1394#endif
1395 QSplitterLayoutStruct *s = data->list.first(); 1395 QSplitterLayoutStruct *s = data->list.first();
1396 while ( s ) { 1396 while ( s ) {
1397 if ( s->isSplitter ) 1397 if ( s->isSplitter )
1398 s->sizer = sw; 1398 s->sizer = sw;
diff --git a/microkde/kcalendarsystemgregorian.cpp b/microkde/kcalendarsystemgregorian.cpp
index 7c5b62a..cc12b9f 100644
--- a/microkde/kcalendarsystemgregorian.cpp
+++ b/microkde/kcalendarsystemgregorian.cpp
@@ -49,17 +49,17 @@ int KCalendarSystemGregorian::monthsInYear( const QDate & ) const
49{ 49{
50// kdDebug(5400) << "Gregorian monthsInYear" << endl; 50// kdDebug(5400) << "Gregorian monthsInYear" << endl;
51 51
52 return 12; 52 return 12;
53} 53}
54 54
55int KCalendarSystemGregorian::weeksInYear(int year) const 55int KCalendarSystemGregorian::weeksInYear(int year) const
56{ 56{
57#if QT_VERSION >= 300 57#if QT_VERSION >= 0x030000
58 QDate temp; 58 QDate temp;
59 temp.setYMD(year, 12, 31); 59 temp.setYMD(year, 12, 31);
60 60
61 // If the last day of the year is in the first week, we have to check the 61 // If the last day of the year is in the first week, we have to check the
62 // week before 62 // week before
63 if ( temp.weekNumber() == 1 ) 63 if ( temp.weekNumber() == 1 )
64 temp.addDays(-7); 64 temp.addDays(-7);
65 65
@@ -67,17 +67,17 @@ int KCalendarSystemGregorian::weeksInYear(int year) const
67#else 67#else
68 return 52; 68 return 52;
69#endif 69#endif
70} 70}
71 71
72int KCalendarSystemGregorian::weekNumber(const QDate& date, 72int KCalendarSystemGregorian::weekNumber(const QDate& date,
73 int * yearNum) const 73 int * yearNum) const
74{ 74{
75#if QT_VERSION >= 300 75#if QT_VERSION >= 0x030000
76 return date.weekNumber(yearNum); 76 return date.weekNumber(yearNum);
77#else 77#else
78 return 1; 78 return 1;
79#endif 79#endif
80} 80}
81 81
82QString KCalendarSystemGregorian::monthName(const QDate& date, 82QString KCalendarSystemGregorian::monthName(const QDate& date,
83 bool shortName) const 83 bool shortName) const
@@ -226,31 +226,31 @@ bool KCalendarSystemGregorian::setYMD(QDate & date, int y, int m, int d) const
226 return false; 226 return false;
227 227
228 // QDate supports gregorian internally 228 // QDate supports gregorian internally
229 return date.setYMD(y, m, d); 229 return date.setYMD(y, m, d);
230} 230}
231 231
232QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const 232QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const
233{ 233{
234#if QT_VERSION >= 300 234#if QT_VERSION >= 0x030000
235 return date.addYears(nyears); 235 return date.addYears(nyears);
236#else 236#else
237 int year = date.year() + nyears; 237 int year = date.year() + nyears;
238 int month = date.month(); 238 int month = date.month();
239 int day = date.day(); 239 int day = date.day();
240 QDate newDate( year, month, 1 ); 240 QDate newDate( year, month, 1 );
241 if ( day > newDate.daysInMonth() ) day = newDate.daysInMonth(); 241 if ( day > newDate.daysInMonth() ) day = newDate.daysInMonth();
242 return QDate( year, month, day ); 242 return QDate( year, month, day );
243#endif 243#endif
244} 244}
245 245
246QDate KCalendarSystemGregorian::addMonths(const QDate & date, int nmonths) const 246QDate KCalendarSystemGregorian::addMonths(const QDate & date, int nmonths) const
247{ 247{
248#if QT_VERSION >= 300 248#if QT_VERSION >= 0x030000
249 return date.addMonths(nmonths); 249 return date.addMonths(nmonths);
250#else 250#else
251 int month = date.month(); 251 int month = date.month();
252 int nyears; 252 int nyears;
253 if ( nmonths >= 0 ) { 253 if ( nmonths >= 0 ) {
254 month += nmonths; 254 month += nmonths;
255 nyears = ( month - 1 ) / 12; 255 nyears = ( month - 1 ) / 12;
256 month = ( ( month - 1 ) % 12 ) + 1; 256 month = ( ( month - 1 ) % 12 ) + 1;