author | zautrix <zautrix> | 2005-07-27 23:40:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-27 23:40:19 (UTC) |
commit | 27ffa2e08ebb38e71f613af3a214750442418e2c (patch) (side-by-side diff) | |
tree | de2bb4c541ab8795ee3739526e82ca8f4e952c09 /libkcal | |
parent | 0e38cffd7ba745f237c659e1c48080fcb25b126c (diff) | |
download | kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.zip kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.gz kdepimpi-27ffa2e08ebb38e71f613af3a214750442418e2c.tar.bz2 |
fixcxcx
-rw-r--r-- | libkcal/calendarlocal.cpp | 1 | ||||
-rw-r--r-- | libkcal/icalformat.cpp | 9 | ||||
-rw-r--r-- | libkcal/icalformat.h | 3 | ||||
-rw-r--r-- | libkcal/todo.cpp | 5 |
4 files changed, 14 insertions, 4 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() CalendarLocal::~CalendarLocal() { + registerObserver( 0 ); if ( mDeleteIncidencesOnClose ) 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" { using namespace KCal; -ICalFormat::ICalFormat( ) +ICalFormat::ICalFormat( bool pe ) { + mProcessEvents = pe; mImpl = new ICalFormatImpl( this ); tzOffsetMin = 0; @@ -190,6 +191,9 @@ QString ICalFormat::toString( Calendar *cal ) icalcomponent_add_component(calendar,component); //qDebug(" todos "); + if ( mProcessEvents ) { + //qDebug("mProcessEvents "); qApp->processEvents(); } + } // events QPtrList<Event> events = cal->rawEvents(); @@ -199,4 +203,5 @@ QString ICalFormat::toString( Calendar *cal ) icalcomponent_add_component(calendar,component); //qDebug("events "); + if ( mProcessEvents ) qApp->processEvents(); } @@ -209,4 +214,5 @@ QString ICalFormat::toString( Calendar *cal ) icalcomponent_add_component(calendar,component); //qDebug("journals "); + if ( mProcessEvents ) qApp->processEvents(); } @@ -214,4 +220,5 @@ QString ICalFormat::toString( Calendar *cal ) QString ret =""; text = icalcomponent_as_ical_string( calendar ); + if ( mProcessEvents ) qApp->processEvents(); 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 { public: /** Create new iCalendar format. */ - ICalFormat( ); + ICalFormat( bool pe = true); virtual ~ICalFormat(); @@ -104,4 +104,5 @@ class ICalFormat : public CalFormat { private: + bool mProcessEvents; ICalFormatImpl *mImpl; 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,4 +67,5 @@ void Todo::setRunningFalse( QString s ) return; mRunning = false; + if ( mRunSaveTimer ) mRunSaveTimer->stop(); saveRunningInfoToFile( s ); @@ -140,5 +141,5 @@ void Todo::saveRunningInfoToFile( QString comment ) } cal.addIncidence( to ); - ICalFormat format; + ICalFormat format( false ); file = dir +"/" +file +".ics"; format.save( &cal, file ); @@ -168,5 +169,5 @@ void Todo::saveParents() Todo * par = (Todo *) to->clone(); cal.addIncidence( par ); - ICalFormat format; + ICalFormat format( false ); format.save( &cal, file ); } |