-rw-r--r-- | libkcal/calendarlocal.cpp | 1 | ||||
-rw-r--r-- | libkcal/icalformat.cpp | 17 | ||||
-rw-r--r-- | libkcal/icalformat.h | 3 | ||||
-rw-r--r-- | libkcal/todo.cpp | 7 |
4 files changed, 19 insertions, 9 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index e37a7ad..eef8327 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -66,4 +66,5 @@ void CalendarLocal::init() | |||
66 | CalendarLocal::~CalendarLocal() | 66 | CalendarLocal::~CalendarLocal() |
67 | { | 67 | { |
68 | registerObserver( 0 ); | ||
68 | if ( mDeleteIncidencesOnClose ) | 69 | if ( mDeleteIncidencesOnClose ) |
69 | close(); | 70 | close(); |
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 5877406..6f3a799 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp | |||
@@ -51,6 +51,7 @@ extern "C" { | |||
51 | using namespace KCal; | 51 | using namespace KCal; |
52 | 52 | ||
53 | ICalFormat::ICalFormat( ) | 53 | ICalFormat::ICalFormat( bool pe ) |
54 | { | 54 | { |
55 | mProcessEvents = pe; | ||
55 | mImpl = new ICalFormatImpl( this ); | 56 | mImpl = new ICalFormatImpl( this ); |
56 | tzOffsetMin = 0; | 57 | tzOffsetMin = 0; |
@@ -190,5 +191,8 @@ QString ICalFormat::toString( Calendar *cal ) | |||
190 | icalcomponent_add_component(calendar,component); | 191 | icalcomponent_add_component(calendar,component); |
191 | //qDebug(" todos "); | 192 | //qDebug(" todos "); |
192 | qApp->processEvents(); | 193 | if ( mProcessEvents ) { |
194 | //qDebug("mProcessEvents "); | ||
195 | qApp->processEvents(); | ||
196 | } | ||
193 | } | 197 | } |
194 | // events | 198 | // events |
@@ -199,5 +203,6 @@ QString ICalFormat::toString( Calendar *cal ) | |||
199 | icalcomponent_add_component(calendar,component); | 203 | icalcomponent_add_component(calendar,component); |
200 | //qDebug("events "); | 204 | //qDebug("events "); |
201 | qApp->processEvents(); | 205 | if ( mProcessEvents ) |
206 | qApp->processEvents(); | ||
202 | } | 207 | } |
203 | 208 | ||
@@ -209,10 +214,12 @@ QString ICalFormat::toString( Calendar *cal ) | |||
209 | icalcomponent_add_component(calendar,component); | 214 | icalcomponent_add_component(calendar,component); |
210 | //qDebug("journals "); | 215 | //qDebug("journals "); |
211 | qApp->processEvents(); | 216 | if ( mProcessEvents ) |
217 | qApp->processEvents(); | ||
212 | } | 218 | } |
213 | const char *text; | 219 | const char *text; |
214 | QString ret =""; | 220 | QString ret =""; |
215 | text = icalcomponent_as_ical_string( calendar ); | 221 | text = icalcomponent_as_ical_string( calendar ); |
216 | qApp->processEvents(); | 222 | if ( mProcessEvents ) |
223 | qApp->processEvents(); | ||
217 | 224 | ||
218 | // text = "BEGIN:VCALENDAR\nPRODID\n :-//K Desktop Environment//NONSGML libkcal 3.1//EN\nVERSION\n :2.0\nBEGIN:VEVENT\nDTSTAMP\n :20031231T213514Z\nORGANIZER\n :MAILTO:lutz@putz.de\nCREATED\n :20031231T213513Z\nUID\n :libkcal-1295166342.120\nSEQUENCE\n :0\nLAST-MODIFIED\n :20031231T213513Z\nSUMMARY\n :test1\nCLASS\n :PUBLIC\nPRIORITY\n :3\nDTSTART\n :20040101T090000Z\nDTEND\n :20040101T110000Z\nTRANSP\n :OPAQUE\nEND:VEVENT\nEND:VCALENDAR\n"; | 225 | // text = "BEGIN:VCALENDAR\nPRODID\n :-//K Desktop Environment//NONSGML libkcal 3.1//EN\nVERSION\n :2.0\nBEGIN:VEVENT\nDTSTAMP\n :20031231T213514Z\nORGANIZER\n :MAILTO:lutz@putz.de\nCREATED\n :20031231T213513Z\nUID\n :libkcal-1295166342.120\nSEQUENCE\n :0\nLAST-MODIFIED\n :20031231T213513Z\nSUMMARY\n :test1\nCLASS\n :PUBLIC\nPRIORITY\n :3\nDTSTART\n :20040101T090000Z\nDTEND\n :20040101T110000Z\nTRANSP\n :OPAQUE\nEND:VEVENT\nEND:VCALENDAR\n"; |
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h index 485ab6e..a770dbb 100644 --- a/libkcal/icalformat.h +++ b/libkcal/icalformat.h | |||
@@ -41,5 +41,5 @@ class ICalFormat : public CalFormat { | |||
41 | public: | 41 | public: |
42 | /** Create new iCalendar format. */ | 42 | /** Create new iCalendar format. */ |
43 | ICalFormat( ); | 43 | ICalFormat( bool pe = true); |
44 | virtual ~ICalFormat(); | 44 | virtual ~ICalFormat(); |
45 | 45 | ||
@@ -104,4 +104,5 @@ class ICalFormat : public CalFormat { | |||
104 | 104 | ||
105 | private: | 105 | private: |
106 | bool mProcessEvents; | ||
106 | ICalFormatImpl *mImpl; | 107 | ICalFormatImpl *mImpl; |
107 | QString mTimeZoneId; | 108 | QString mTimeZoneId; |
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 4ada2d8..7bf756a 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -67,5 +67,6 @@ void Todo::setRunningFalse( QString s ) | |||
67 | return; | 67 | return; |
68 | mRunning = false; | 68 | mRunning = false; |
69 | mRunSaveTimer->stop(); | 69 | if ( mRunSaveTimer ) |
70 | mRunSaveTimer->stop(); | ||
70 | saveRunningInfoToFile( s ); | 71 | saveRunningInfoToFile( s ); |
71 | } | 72 | } |
@@ -140,5 +141,5 @@ void Todo::saveRunningInfoToFile( QString comment ) | |||
140 | } | 141 | } |
141 | cal.addIncidence( to ); | 142 | cal.addIncidence( to ); |
142 | ICalFormat format; | 143 | ICalFormat format( false ); |
143 | file = dir +"/" +file +".ics"; | 144 | file = dir +"/" +file +".ics"; |
144 | format.save( &cal, file ); | 145 | format.save( &cal, file ); |
@@ -168,5 +169,5 @@ void Todo::saveParents() | |||
168 | Todo * par = (Todo *) to->clone(); | 169 | Todo * par = (Todo *) to->clone(); |
169 | cal.addIncidence( par ); | 170 | cal.addIncidence( par ); |
170 | ICalFormat format; | 171 | ICalFormat format( false ); |
171 | format.save( &cal, file ); | 172 | format.save( &cal, file ); |
172 | } | 173 | } |