From kde-commits Sun Oct 31 22:26:39 2004 From: Till Adam Date: Sun, 31 Oct 2004 22:26:39 +0000 To: kde-commits Subject: kdepim/kresources/opengroupware Message-Id: <20041031222639.1602E16C68 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=109926160610870 CVS commit by tilladam: Remove merging problems and start looking at headers. M +14 -13 kcal_resourceopengroupware.cpp 1.16 --- kdepim/kresources/opengroupware/kcal_resourceopengroupware.cpp #1.15:1.16 @@ -171,4 +171,5 @@ bool OpenGroupware::doLoad() mIncidencesForDownload.clear(); + mVersionsPendingDownload.clear(); mProgress = KPIM::ProgressManager::instance()->createProgressItem( @@ -227,6 +228,4 @@ void OpenGroupware::slotListJobResult( K } } else { - mIncidencesForDownload.clear(); - mVersionsPendingDownload.clear(); QDomDocument doc = mListEventsJob->response(); @@ -256,17 +255,17 @@ void OpenGroupware::slotListJobResult( K i = mCalendar.incidence( localId ); if ( !i ) { - // kdDebug(7000) << "Not locally present, download: " << location << endl; + kdDebug(7000) << "Not locally present, download: " << location << endl; download = true; } else { - // kdDebug(7000) << "Locally present " << endl; + kdDebug(7000) << "Locally present " << endl; /* locally present, let's check if it's newer than what we have */ const QString &oldFingerprint = idMapper().fingerprint( i->uid() ); if ( oldFingerprint != newFingerprint ) { - // kdDebug(7000) << "Fingerprint changed old: " << oldFingerprint << " new: " << newFingerprint << endl; + kdDebug(7000) << "Fingerprint changed old: " << oldFingerprint << " new: " << newFingerprint << endl; // something changed on the server, let's see if we also changed it locally if ( deletedIncidences().find( i ) != deletedIncidences().end() || changedIncidences().find( i ) != changedIncidences().end() ) { // TODO conflict resolution - // kdDebug(7000) << "TODO conflict resolution" << endl; + kdDebug(7000) << "TODO conflict resolution" << endl; download = true; } else { @@ -274,5 +273,6 @@ void OpenGroupware::slotListJobResult( K } } else { - // kdDebug(7000) << "Fingerprint did not change, don't download this one " << endl; + kdDebug(7000) << "Fingerprint did not change, don't download this one " << endl; + } } if ( download ) { @@ -282,5 +282,4 @@ void OpenGroupware::slotListJobResult( K } } - } mListEventsJob = 0; @@ -291,4 +290,5 @@ void OpenGroupware::slotListJobResult( K void OpenGroupware::downloadNextIncidence() { + kdDebug(7000) << " downloadNextIncidence " << endl; if ( !mIncidencesForDownload.isEmpty() ) { const QString entry = mIncidencesForDownload.front(); @@ -304,4 +304,5 @@ void OpenGroupware::downloadNextIncidenc mDownloadJob = KIO::get( url, false, false ); + mDownloadJob->addMetaData( "PropagateHTTPHeader", "true" ); connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ), SLOT( slotJobResult( KIO::Job * ) ) ); @@ -350,4 +349,6 @@ void OpenGroupware::slotJobResult( KIO:: mIsShowingError = false; } else { + const QString& headers = job->queryMetaData( "HTTP-Headers" ); + kdDebug(7000) << "HEADERS: " << endl << headers << endl; CalendarLocal calendar; ICalFormat ical;