summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-07-27 23:40:19 (UTC)
committer zautrix <zautrix>2005-07-27 23:40:19 (UTC)
commit27ffa2e08ebb38e71f613af3a214750442418e2c (patch) (unidiff)
treede2bb4c541ab8795ee3739526e82ca8f4e952c09 /libkcal
parent0e38cffd7ba745f237c659e1c48080fcb25b126c (diff)
downloadkdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.zip
kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.gz
kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.bz2
fixcxcx
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp1
-rw-r--r--libkcal/icalformat.cpp17
-rw-r--r--libkcal/icalformat.h3
-rw-r--r--libkcal/todo.cpp7
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
@@ -65,6 +65,7 @@ void CalendarLocal::init()
65 65
66CalendarLocal::~CalendarLocal() 66CalendarLocal::~CalendarLocal()
67{ 67{
68 registerObserver( 0 );
68 if ( mDeleteIncidencesOnClose ) 69 if ( mDeleteIncidencesOnClose )
69 close(); 70 close();
70} 71}
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index 5877406..6f3a799 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -50,8 +50,9 @@ extern "C" {
50 50
51using namespace KCal; 51using namespace KCal;
52 52
53ICalFormat::ICalFormat( ) 53ICalFormat::ICalFormat( bool pe )
54{ 54{
55 mProcessEvents = pe;
55 mImpl = new ICalFormatImpl( this ); 56 mImpl = new ICalFormatImpl( this );
56 tzOffsetMin = 0; 57 tzOffsetMin = 0;
57 //qDebug("new ICalFormat() "); 58 //qDebug("new ICalFormat() ");
@@ -189,7 +190,10 @@ QString ICalFormat::toString( Calendar *cal )
189 component = mImpl->writeTodo(qlt.current()); 190 component = mImpl->writeTodo(qlt.current());
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
195 QPtrList<Event> events = cal->rawEvents(); 199 QPtrList<Event> events = cal->rawEvents();
@@ -198,7 +202,8 @@ QString ICalFormat::toString( Calendar *cal )
198 component = mImpl->writeEvent(ev); 202 component = mImpl->writeEvent(ev);
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
204 // journals 209 // journals
@@ -208,12 +213,14 @@ QString ICalFormat::toString( Calendar *cal )
208 component = mImpl->writeJournal(j); 213 component = mImpl->writeJournal(j);
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";
219 226
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h
index 485ab6e..a770dbb 100644
--- a/libkcal/icalformat.h
+++ b/libkcal/icalformat.h
@@ -40,7 +40,7 @@ class ICalFormatImpl;
40class ICalFormat : public CalFormat { 40class 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
46 /** 46 /**
@@ -103,6 +103,7 @@ class ICalFormat : public CalFormat {
103 bool utc() const; 103 bool utc() const;
104 104
105 private: 105 private:
106 bool mProcessEvents;
106 ICalFormatImpl *mImpl; 107 ICalFormatImpl *mImpl;
107 QString mTimeZoneId; 108 QString mTimeZoneId;
108 QCString mTzString; 109 QCString mTzString;
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 4ada2d8..7bf756a 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -66,7 +66,8 @@ void Todo::setRunningFalse( QString s )
66 if ( ! mRunning ) 66 if ( ! mRunning )
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}
72void Todo::stopRunning() 73void Todo::stopRunning()
@@ -139,7 +140,7 @@ void Todo::saveRunningInfoToFile( QString comment )
139 to->setDescription( "TT-Note: " + comment +"\n" + des ); 140 to->setDescription( "TT-Note: " + comment +"\n" + des );
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 );
145 saveParents(); 146 saveParents();
@@ -167,7 +168,7 @@ void Todo::saveParents()
167 cal.setLocalTime(); 168 cal.setLocalTime();
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 }
173 to->saveParents(); 174 to->saveParents();