summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
-rw-r--r--libkcal/sharpformat.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index ce41fbd..5a6d615 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -713,58 +713,58 @@ void CalendarView::confSync()
// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full )
{
//void setZaurusId(int id);
// int zaurusId() const;
// void setZaurusUid(int id);
// int zaurusUid() const;
// void setZaurusStat(int id);
// int zaurusStat() const;
// 0 equal
// 1 take local
// 2 take remote
// 3 cancel
QDateTime lastSync = mLastCalendarSync;
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
bool remCh, locCh;
remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
if ( remCh )
qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
locCh = ( local->lastModified() > mLastCalendarSync );
//qDebug("locCh %d remCh %d locuid %d remuid %d", locCh, remCh,local->zaurusUid(), remote->zaurusUid() );
if ( !remCh && ! locCh ) {
- qDebug("both not changed ");
+ //qDebug("both not changed ");
lastSync = local->lastModified().addDays(1);
} else {
if ( locCh ) {
- qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1());
+ // qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1());
lastSync = local->lastModified().addDays( -1 );
if ( !remCh )
remote->setLastModified( lastSync.addDays( -1 ) );
} else {
- qDebug(" not loc changed ");
+ //qDebug(" not loc changed ");
lastSync = local->lastModified().addDays( 1 );
if ( remCh )
remote->setLastModified( lastSync.addDays( 1 ) );
}
}
full = true;
if ( mode < SYNC_PREF_ASK )
mode = SYNC_PREF_ASK;
} else {
if ( local->lastModified() == remote->lastModified() )
if ( local->revision() == remote->revision() )
return 0;
}
// qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() );
//qDebug("%s %d %s %d", local->lastModified().toString().latin1() , local->revision(), remote->lastModified().toString().latin1(), remote->revision());
//qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() );
//full = true; //debug only
if ( full ) {
bool equ = false;
if ( local->type() == "Event" ) {
equ = (*((Event*) local) == *((Event*) remote));
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 89eb72f..a53b3f8 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -348,50 +348,50 @@ SharpFormat::~SharpFormat()
ulong SharpFormat::getCsum( const QStringList & attList)
{
int max = attList.count() -1;
ulong cSum = 0;
int j,k,i;
int add;
for ( i = 1; i < max ; ++i ) {
QString s = attList[i];
if ( ! s.isEmpty() ){
j = s.length();
for ( k = 0; k < j; ++k ) {
int mul = k +1;
add = s[k].unicode ();
if ( k < 16 )
mul = mul * mul;
add = add * mul *i*i*i;
cSum += add;
}
}
}
return cSum;
}
#include <stdlib.h>
-//#define DEBUGMODE false
-#define DEBUGMODE true
+#define DEBUGMODE false
+//#define DEBUGMODE true
bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
{
bool debug = DEBUGMODE;
QString text;
QString codec = "utf8";
QLabel status ( i18n("Reading events ..."), 0 );
int w = status.sizeHint().width()+20 ;
if ( w < 200 ) w = 200;
int h = status.sizeHint().height()+20 ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
status.setCaption(i18n("Reading DTM Data") );
status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
status.show();
status.raise();
qApp->processEvents();
QString fileName;
if ( ! debug ) {
fileName = "/tmp/kopitempout";
QString command ="db2file datebook -r -c "+ codec + " > " + fileName;
system ( command.latin1() );