summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2005-01-16 10:26:46 (UTC)
committer zautrix <zautrix>2005-01-16 10:26:46 (UTC)
commit5138d4edea4189100ddc8bf6bd82bccbdcaebf95 (patch) (side-by-side diff)
treec4ec0d0552d06065a1e9f8eb12c44fcbfdd19f4a /korganizer/calendarview.cpp
parent62ff81d5d292ddf3c6032b48f27a6daedf6a6cb0 (diff)
downloadkdepimpi-5138d4edea4189100ddc8bf6bd82bccbdcaebf95.zip
kdepimpi-5138d4edea4189100ddc8bf6bd82bccbdcaebf95.tar.gz
kdepimpi-5138d4edea4189100ddc8bf6bd82bccbdcaebf95.tar.bz2
filter setings changed
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 378c7d4..8258c74 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -975,48 +975,59 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
//qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec());
fullDateRange = true;
}
}
if ( mSyncManager->syncWithDesktop() ) {
fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync );
}
if ( fullDateRange )
mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
else
mLastCalendarSync = eventLSync->dtStart();
// for resyncing if own file has changed
if ( mCurrentSyncDevice == "deleteaftersync" ) {
mLastCalendarSync = loadedFileVersion;
//qDebug("setting mLastCalendarSync ");
}
//qDebug("*************************** ");
qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
QPtrList<Incidence> er = remote->rawIncidences();
Incidence* inR = er.first();
Incidence* inL;
QProgressBar bar( er.count(),0 );
bar.setCaption (i18n("Syncing - close to abort!") );
+ // ************** setting up filter *************
+ CalFilter *filterIN = 0;
+ CalFilter *filterOUT = 0;
+ CalFilter *filter = mFilters.first();
+ while(filter) {
+ if ( filter->name() == mSyncManager->mFilterInCal )
+ filterIN = filter;
+ if ( filter->name() == mSyncManager->mFilterOutCal )
+ filterOUT = filter;
+ filter = mFilters.next();
+ }
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
int modulo = (er.count()/10)+1;
int incCounter = 0;
while ( inR ) {
if ( ! bar.isVisible() )
return false;
if ( incCounter % modulo == 0 )
bar.setProgress( incCounter );
++incCounter;
uid = inR->uid();
bool skipIncidence = false;
if ( uid.left(15) == QString("last-syncEvent-") )
skipIncidence = true;
QString idS;
qApp->processEvents();
if ( !skipIncidence ) {
inL = local->incidence( uid );