summaryrefslogtreecommitdiffabout
path: root/libkcal
Unidiff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index ebfe164..4e54fdf 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -337,49 +337,49 @@ SharpFormat::~SharpFormat()
337ulong SharpFormat::getCsum( const QStringList & attList) 337ulong SharpFormat::getCsum( const QStringList & attList)
338{ 338{
339 int max = attList.count() -1; 339 int max = attList.count() -1;
340 ulong cSum = 0; 340 ulong cSum = 0;
341 int j,k,i; 341 int j,k,i;
342 int add; 342 int add;
343 for ( i = 1; i < max ; ++i ) { 343 for ( i = 1; i < max ; ++i ) {
344 QString s = attList[i]; 344 QString s = attList[i];
345 if ( ! s.isEmpty() ){ 345 if ( ! s.isEmpty() ){
346 j = s.length(); 346 j = s.length();
347 for ( k = 0; k < j; ++k ) { 347 for ( k = 0; k < j; ++k ) {
348 int mul = k +1; 348 int mul = k +1;
349 add = s[k].unicode (); 349 add = s[k].unicode ();
350 if ( k < 16 ) 350 if ( k < 16 )
351 mul = mul * mul; 351 mul = mul * mul;
352 add = add * mul *i*i*i; 352 add = add * mul *i*i*i;
353 cSum += add; 353 cSum += add;
354 } 354 }
355 } 355 }
356 } 356 }
357 return cSum; 357 return cSum;
358 358
359} 359}
360#include <stdlib.h> 360#include <stdlib.h>
361#define DEBUGMODE true 361#define DEBUGMODE false
362bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) 362bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
363{ 363{
364 364
365 365
366 bool debug = DEBUGMODE; 366 bool debug = DEBUGMODE;
367 //debug = true; 367 //debug = true;
368 QString text; 368 QString text;
369 QString codec = "utf8"; 369 QString codec = "utf8";
370 QLabel status ( i18n("Reading events ..."), 0 ); 370 QLabel status ( i18n("Reading events ..."), 0 );
371 371
372 int w = status.sizeHint().width()+20 ; 372 int w = status.sizeHint().width()+20 ;
373 if ( w < 200 ) w = 200; 373 if ( w < 200 ) w = 200;
374 int h = status.sizeHint().height()+20 ; 374 int h = status.sizeHint().height()+20 ;
375 int dw = QApplication::desktop()->width(); 375 int dw = QApplication::desktop()->width();
376 int dh = QApplication::desktop()->height(); 376 int dh = QApplication::desktop()->height();
377 status.setCaption(i18n("Reading DTM Data") ); 377 status.setCaption(i18n("Reading DTM Data") );
378 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 378 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
379 status.show(); 379 status.show();
380 status.raise(); 380 status.raise();
381 qApp->processEvents(); 381 qApp->processEvents();
382 QString fileName; 382 QString fileName;
383 if ( ! debug ) { 383 if ( ! debug ) {
384 fileName = "/tmp/kopitempout"; 384 fileName = "/tmp/kopitempout";
385 QString command ="db2file datebook -r -c "+ codec + " > " + fileName; 385 QString command ="db2file datebook -r -c "+ codec + " > " + fileName;