summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2005-01-26 00:32:18 (UTC)
committer zautrix <zautrix>2005-01-26 00:32:18 (UTC)
commitc3ec0a5a43fb328f2d190b8adee1ef662746fb41 (patch) (side-by-side diff)
treedd34f587205f8567a59bf7abb6161e1ba6667444 /korganizer/calendarview.cpp
parenteeb9059d1cbf2ffb13300d0491b4b61126507373 (diff)
downloadkdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.zip
kdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.tar.gz
kdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.tar.bz2
debug fixes
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 038da54..06454c2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -945,13 +945,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
local->resetTempSyncStat();
mLastCalendarSync = QDateTime::currentDateTime();
if ( mSyncManager->syncWithDesktop() ) {
remote->resetPilotStat(1);
if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
mLastCalendarSync = KSyncManager::mRequestedSyncEvent;
- qDebug("using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
+ qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
} else {
qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime ");
}
}
QDateTime modifiedCalendar = mLastCalendarSync;
eventLSync = getLastSyncEvent();
@@ -994,13 +994,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
// 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);
+ qDebug("KO: 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!") );
@@ -1221,17 +1221,18 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
eventRSync->setDtStart( mLastCalendarSync );
eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
eventLSync->setReadOnly( true );
- qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() );
+ qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL );
if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
remote->addEvent( eventRSync );
else
delete eventRSync;
+ qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() );
QString mes;
mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT );
QString delmess;
if ( delFut ) {
delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut);
mes += delmess;
@@ -1239,13 +1240,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
mes = i18n("Local calendar changed!\n") +mes;
mCalendar->checkAlarmForIncidence( 0, true );
qDebug( mes );
if ( mSyncManager->mShowSyncSummary ) {
if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
i18n("KO/Pi Synchronization"),i18n("Write back"))) {
- qDebug("cancelled ");
+ qDebug("KO: WB cancelled ");
return false;
}
}
return syncOK;
}
@@ -1437,20 +1438,20 @@ bool CalendarView::importBday()
// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI
void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList,
const QStringList& anniversaryList, const QStringList& realNameList,
const QStringList& emailList, const QStringList& assembledNameList,
const QStringList& uidList)
{
- qDebug("CalendarView::insertBirthdays");
+ //qDebug("KO::CalendarView::insertBirthdays");
if (uid == this->name())
{
int count = birthdayList.count();
int addCount = 0;
KCal::Attendee* a = 0;
- qDebug("CalView 1 %i", count);
+ //qDebug("CalView 1 %i", count);
QProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
@@ -2506,13 +2507,13 @@ void CalendarView::showEventEditor()
{
#ifdef DESKTOP_VERSION
mEventEditor->show();
#else
if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
- qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
+ qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
delete mEventEditor;
mEventEditor = mDialogManager->getEventEditor();
}
mEventEditor->showMaximized();
topLevelWidget()->setCaption( i18n("") );
#endif
@@ -2521,13 +2522,13 @@ void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
mTodoEditor->show();
#else
if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
- qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
+ qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
delete mTodoEditor;
mTodoEditor = mDialogManager->getTodoEditor();
}
mTodoEditor->showMaximized();
topLevelWidget()->setCaption( i18n("") );
#endif
@@ -3854,13 +3855,13 @@ void CalendarView::keyPressEvent ( QKeyEvent *e)
bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
{
// mSyncManager = manager;
if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
- qDebug("SyncKDE request detected!");
+ qDebug("KO: SyncKDE request detected!");
}
mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
mCurrentSyncName = mSyncManager->getCurrentSyncName();
return syncCalendar( filename, mode );
}
bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
@@ -3879,13 +3880,13 @@ void CalendarView::setSyncManager(KSyncManager* manager)
{
mSyncManager = manager;
}
void CalendarView::removeSyncInfo( QString syncProfile)
{
- qDebug("removeSyncInfo for profile %s ", syncProfile.latin1());
+ qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
mCalendar->removeSyncInfo( syncProfile );
}
void CalendarView::undo_delete()
{