summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorrecurrence.cpp12
-rw-r--r--korganizer/koeditorrecurrence.h3
-rw-r--r--libkcal/calendarlocal.cpp2
-rw-r--r--libkcal/icalformatimpl.cpp9
-rw-r--r--libkcal/journal.cpp2
5 files changed, 20 insertions, 8 deletions
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 89504db..0e74a99 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -513,55 +513,59 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
QWidget *rangeBox = new QWidget( mRangeGroupBox );
QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox );
rangeLayout->setSpacing( KDialog::spacingHint() );
rangeLayout->setMargin( KDialog::marginHintSmall() );
mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
rangeLayout->addWidget( mStartDateLabel );
- QButtonGroup *rangeButtonGroup = new QButtonGroup;
+ mRangeButtonGroup = new QButtonGroup;
mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );
- rangeButtonGroup->insert( mNoEndDateButton );
+ mRangeButtonGroup->insert( mNoEndDateButton );
rangeLayout->addWidget( mNoEndDateButton );
QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout );
durationLayout->setSpacing( KDialog::spacingHint() );
mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox );
- rangeButtonGroup->insert( mEndDurationButton );
+ mRangeButtonGroup->insert( mEndDurationButton );
durationLayout->addWidget( mEndDurationButton );
mEndDurationEdit = new QSpinBox( 1, 9999, 1, rangeBox );
durationLayout->addWidget( mEndDurationEdit );
QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox );
durationLayout ->addWidget( endDurationLabel );
QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout );
endDateLayout->setSpacing( KDialog::spacingHint() );
mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox );
- rangeButtonGroup->insert( mEndDateButton );
+ mRangeButtonGroup->insert( mEndDateButton );
endDateLayout->addWidget( mEndDateButton );
mEndDateEdit = new KDateEdit( rangeBox );
endDateLayout->addWidget( mEndDateEdit );
//endDateLayout->addStretch( 1 );
connect( mNoEndDateButton, SIGNAL( toggled( bool ) ),
SLOT( showCurrentRange() ) );
connect( mEndDurationButton, SIGNAL( toggled( bool ) ),
SLOT( showCurrentRange() ) );
connect( mEndDateButton, SIGNAL( toggled( bool ) ),
SLOT( showCurrentRange() ) );
}
+RecurrenceRangeWidget::~RecurrenceRangeWidget()
+{
+ delete mRangeButtonGroup;
+}
void RecurrenceRangeWidget::setDefaults( const QDateTime &from )
{
mNoEndDateButton->setChecked( true );
setDateTimes( from );
mEndDateEdit->setDate( from.date() );
}
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index f398f62..75e0c73 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -28,16 +28,17 @@
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qmultilineedit.h>
#include <qlistview.h>
#include <qradiobutton.h>
+#include <qbuttongroup.h>
#include <kdialogbase.h>
#include <libkcal/event.h>
#include "ktimeedit.h"
class QWidgetStack;
@@ -212,32 +213,34 @@ class RecurrenceRangeBase
const QDateTime &end = QDateTime() ) = 0;
};
class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
{
Q_OBJECT
public:
RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 );
+ ~RecurrenceRangeWidget();
void setDefaults( const QDateTime &from );
void setDuration( int );
int duration();
void setEndDate( const QDate & );
QDate endDate();
void setDateTimes( const QDateTime &start,
const QDateTime &end = QDateTime() );
protected slots:
void showCurrentRange();
private:
+ QButtonGroup *mRangeButtonGroup;
QGroupBox *mRangeGroupBox;
QLabel *mStartDateLabel;
QRadioButton *mNoEndDateButton;
QRadioButton *mEndDurationButton;
QSpinBox *mEndDurationEdit;
QRadioButton *mEndDateButton;
KDateEdit *mEndDateEdit;
};
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index eef8327..5baa7dc 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -251,17 +251,17 @@ void CalendarLocal::stopAllTodos()
void CalendarLocal::close()
{
Todo * i;
for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false);
mEventList.setAutoDelete( true );
mTodoList.setAutoDelete( true );
- mJournalList.setAutoDelete( false );
+ mJournalList.setAutoDelete( true );
mEventList.clear();
mTodoList.clear();
mJournalList.clear();
mEventList.setAutoDelete( false );
mTodoList.setAutoDelete( false );
mJournalList.setAutoDelete( false );
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index f349681..53aa039 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -1939,35 +1939,38 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar)
icalcomponent *c;
// Iterate through all todos
c = icalcomponent_get_first_component(calendar,ICAL_VTODO_COMPONENT);
while (c) {
// kdDebug(5800) << "----Todo found" << endl;
Todo *todo = readTodo(c);
- if (!cal->todo(todo->uid())) cal->addTodo(todo);
+ if (!cal->todo(todo->uid()))
+ cal->addTodo(todo);
c = icalcomponent_get_next_component(calendar,ICAL_VTODO_COMPONENT);
}
// Iterate through all events
c = icalcomponent_get_first_component(calendar,ICAL_VEVENT_COMPONENT);
while (c) {
// kdDebug(5800) << "----Event found" << endl;
Event *event = readEvent(c);
- if (!cal->event(event->uid())) cal->addEvent(event);
+ if (!cal->event(event->uid()))
+ cal->addEvent(event);
c = icalcomponent_get_next_component(calendar,ICAL_VEVENT_COMPONENT);
}
// Iterate through all journals
c = icalcomponent_get_first_component(calendar,ICAL_VJOURNAL_COMPONENT);
while (c) {
// kdDebug(5800) << "----Journal found" << endl;
Journal *journal = readJournal(c);
- if (!cal->journal(journal->uid())) cal->addJournal(journal);
+ if (!cal->journal(journal->uid()))
+ cal->addJournal(journal);
c = icalcomponent_get_next_component(calendar,ICAL_VJOURNAL_COMPONENT);
}
#if 0
initPropIterator(&i, vcal);
// go through all the vobjects in the vcal
while (moreIteration(&i)) {
diff --git a/libkcal/journal.cpp b/libkcal/journal.cpp
index 859161f..c4e4474 100644
--- a/libkcal/journal.cpp
+++ b/libkcal/journal.cpp
@@ -19,20 +19,22 @@
*/
#include "journal.h"
using namespace KCal;
Journal::Journal()
{
+ qDebug("New JJJ ");
}
Journal::~Journal()
{
+ qDebug("delete JJJ ");
}
Incidence *Journal::clone()
{
return new Journal(*this);
}