-rw-r--r-- | core/pim/todo/templatedialogimpl.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp index c2306ac..63d8107 100644 --- a/core/pim/todo/templatedialogimpl.cpp +++ b/core/pim/todo/templatedialogimpl.cpp | |||
@@ -79,3 +79,6 @@ void TemplateDialogImpl::slotAdd() { | |||
79 | void TemplateDialogImpl::slotRemove() { | 79 | void TemplateDialogImpl::slotRemove() { |
80 | TemplateListItem* item = (TemplateListItem*) listView()->currentItem(); | 80 | if (!listView()->currentItem() ) |
81 | return; | ||
82 | |||
83 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); | ||
81 | listView()->takeItem( item ); | 84 | listView()->takeItem( item ); |
@@ -87,3 +90,6 @@ void TemplateDialogImpl::slotRemove() { | |||
87 | void TemplateDialogImpl::slotEdit() { | 90 | void TemplateDialogImpl::slotEdit() { |
88 | TemplateListItem* item = (TemplateListItem*)listView()->currentItem(); | 91 | if ( !listView()->currentItem() ) |
92 | return; | ||
93 | |||
94 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); | ||
89 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); | 95 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); |
@@ -101,3 +107,6 @@ void TemplateDialogImpl::slotEdit() { | |||
101 | void TemplateDialogImpl::slotReturn() { | 107 | void TemplateDialogImpl::slotReturn() { |
102 | TemplateListItem* tbl = (TemplateListItem*)listView()->currentItem(); | 108 | if ( !listView()->currentItem() ) |
109 | return; | ||
110 | |||
111 | TemplateListItem* tbl = static_cast<TemplateListItem*>( listView()->currentItem() ); | ||
103 | 112 | ||