author | zecke <zecke> | 2004-02-16 21:32:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-16 21:32:58 (UTC) |
commit | e228f4aa24ce73a49dde349544e55689cb0eccba (patch) (side-by-side diff) | |
tree | 5b9be29793b2a72f9260cb1325751d31e40c18f0 /core | |
parent | 38d601a7d2a975bc0cbcc4cc933844f5572ec4fa (diff) | |
download | opie-e228f4aa24ce73a49dde349544e55689cb0eccba.zip opie-e228f4aa24ce73a49dde349544e55689cb0eccba.tar.gz opie-e228f4aa24ce73a49dde349544e55689cb0eccba.tar.bz2 |
Take care of the lifetime of the EffectiveEvent/Occurence
Make sure not to keep reference on non existing objects
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 10 | ||||
-rw-r--r-- | core/pim/datebook/datebookday.h | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookdayallday.cpp | 11 | ||||
-rw-r--r-- | core/pim/datebook/datebookweek.cpp | 4 |
4 files changed, 13 insertions, 14 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 4d64099..751a1da 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -797,2 +797,4 @@ void DateBookDayWidget::mousePressEvent( QMouseEvent *e ) + Event eve = ev.event(); + QPopupMenu m; @@ -805,9 +807,9 @@ void DateBookDayWidget::mousePressEvent( QMouseEvent *e ) if ( r == 1 ) { - emit editMe( ev.event() ); + emit editMe( eve ); } else if ( r == 2 ) { - emit deleteMe( ev.event() ); + emit deleteMe( eve ); } else if ( r == 3 ) { - emit beamMe( ev.event() ); + emit beamMe( eve ); } else if ( r == 4 ) { - emit duplicateMe( ev.event() ); + emit duplicateMe( eve ); } else if ( r == 5 ) { diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h index 3898cbc..c8cb26b 100644 --- a/core/pim/datebook/datebookday.h +++ b/core/pim/datebook/datebookday.h @@ -126,3 +126,3 @@ private: void setEventText( QString& text ); - const EffectiveEvent ev; + EffectiveEvent ev; DateBookDay *dateBook; diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index 2294f3c..1244fd3 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp @@ -158,2 +158,3 @@ void DatebookAlldayDisp::mousePressEvent(QMouseEvent*e) { + Event ev = m_Ev.event(); QColor b = backgroundColor(); @@ -173,12 +174,12 @@ void DatebookAlldayDisp::mousePressEvent(QMouseEvent*e) case 1: - emit editMe( m_Ev.event() ); + emit editMe( ev ); break; case 2: - emit deleteMe( m_Ev.event() ); + emit deleteMe( ev ); break; case 3: - emit beamMe( m_Ev.event() ); + emit beamMe( ev ); break; case 4: - emit duplicateMe( m_Ev.event() ); + emit duplicateMe( ev ); break; @@ -188,3 +189,3 @@ void DatebookAlldayDisp::mousePressEvent(QMouseEvent*e) case 6: - emit displayMe( m_Ev.event() ); + emit displayMe( ev ); break; diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index 8435132..933e191 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp @@ -84,5 +84,2 @@ void DateBookWeekView::initNames() { -#warning Please review this ! (eilers) - - // Ok, I am Mr. Pedantic, but shouldn't we count until 6 instead of 7, if bOnMonday is false ? (eilers) @@ -316,3 +313,2 @@ void DateBookWeekView::resizeEvent( QResizeEvent *e ) -#warning check the geometry i have choosen BRANCH_1_0 (waspe) |