summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2004-09-14 02:04:12 (UTC)
committer zautrix <zautrix>2004-09-14 02:04:12 (UTC)
commit5060b0737c0c279859cac3bcfb73d2ac21c6a79e (patch) (unidiff)
tree8de6965559cb5bd6eba1eea5c635315d0945cfd1 /libkcal
parent739fec31c8cea89dd40ff1ce7dd7b84b05e4e973 (diff)
downloadkdepimpi-5060b0737c0c279859cac3bcfb73d2ac21c6a79e.zip
kdepimpi-5060b0737c0c279859cac3bcfb73d2ac21c6a79e.tar.gz
kdepimpi-5060b0737c0c279859cac3bcfb73d2ac21c6a79e.tar.bz2
debug off
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp4
1 files changed, 2 insertions, 2 deletions
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()
348ulong SharpFormat::getCsum( const QStringList & attList) 348ulong SharpFormat::getCsum( const QStringList & attList)
349{ 349{
350 int max = attList.count() -1; 350 int max = attList.count() -1;
351 ulong cSum = 0; 351 ulong cSum = 0;
352 int j,k,i; 352 int j,k,i;
353 int add; 353 int add;
354 for ( i = 1; i < max ; ++i ) { 354 for ( i = 1; i < max ; ++i ) {
355 QString s = attList[i]; 355 QString s = attList[i];
356 if ( ! s.isEmpty() ){ 356 if ( ! s.isEmpty() ){
357 j = s.length(); 357 j = s.length();
358 for ( k = 0; k < j; ++k ) { 358 for ( k = 0; k < j; ++k ) {
359 int mul = k +1; 359 int mul = k +1;
360 add = s[k].unicode (); 360 add = s[k].unicode ();
361 if ( k < 16 ) 361 if ( k < 16 )
362 mul = mul * mul; 362 mul = mul * mul;
363 add = add * mul *i*i*i; 363 add = add * mul *i*i*i;
364 cSum += add; 364 cSum += add;
365 } 365 }
366 } 366 }
367 } 367 }
368 return cSum; 368 return cSum;
369 369
370} 370}
371#include <stdlib.h> 371#include <stdlib.h>
372//#define DEBUGMODE false 372#define DEBUGMODE false
373#define DEBUGMODE true 373//#define DEBUGMODE true
374bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) 374bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
375{ 375{
376 376
377 377
378 bool debug = DEBUGMODE; 378 bool debug = DEBUGMODE;
379 QString text; 379 QString text;
380 QString codec = "utf8"; 380 QString codec = "utf8";
381 QLabel status ( i18n("Reading events ..."), 0 ); 381 QLabel status ( i18n("Reading events ..."), 0 );
382 382
383 int w = status.sizeHint().width()+20 ; 383 int w = status.sizeHint().width()+20 ;
384 if ( w < 200 ) w = 200; 384 if ( w < 200 ) w = 200;
385 int h = status.sizeHint().height()+20 ; 385 int h = status.sizeHint().height()+20 ;
386 int dw = QApplication::desktop()->width(); 386 int dw = QApplication::desktop()->width();
387 int dh = QApplication::desktop()->height(); 387 int dh = QApplication::desktop()->height();
388 status.setCaption(i18n("Reading DTM Data") ); 388 status.setCaption(i18n("Reading DTM Data") );
389 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 389 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
390 status.show(); 390 status.show();
391 status.raise(); 391 status.raise();
392 qApp->processEvents(); 392 qApp->processEvents();
393 QString fileName; 393 QString fileName;
394 if ( ! debug ) { 394 if ( ! debug ) {
395 fileName = "/tmp/kopitempout"; 395 fileName = "/tmp/kopitempout";
396 QString command ="db2file datebook -r -c "+ codec + " > " + fileName; 396 QString command ="db2file datebook -r -c "+ codec + " > " + fileName;
397 system ( command.latin1() ); 397 system ( command.latin1() );