summaryrefslogtreecommitdiffabout
path: root/libkcal/sharpformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/sharpformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index defdb09..89eb72f 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -171,26 +171,27 @@ class SharpParser : public QObject
QString categoryList = attList[1] ;
event->setCategories( lookupCategories( categoryList ) );
// strange 0 semms to mean: alarm enabled
if ( attList[8] == "0" ) {
Alarm *alarm;
if ( event->alarms().count() > 0 )
alarm = event->alarms().first();
else {
alarm = new Alarm( event );
event->addAlarm( alarm );
+ alarm->setType( Alarm::Audio );
}
- alarm->setType( Alarm::Audio );
+ //alarm->setType( Alarm::Audio );
alarm->setEnabled( true );
int alarmOffset = attList[9].toInt();
alarm->setStartOffset( alarmOffset * -60 );
} else {
Alarm *alarm;
if ( event->alarms().count() > 0 ) {
alarm = event->alarms().first();
alarm->setType( Alarm::Audio );
alarm->setStartOffset( -60*15 );
alarm->setEnabled( false );
}
}
@@ -359,31 +360,31 @@ ulong SharpFormat::getCsum( const QStringList & attList)
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 false
+#define DEBUGMODE true
bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
{
bool debug = DEBUGMODE;
- //debug = true;
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();