summaryrefslogtreecommitdiff
path: root/core/pim/todo/templatedialogimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/templatedialogimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/templatedialogimpl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp
index 77c5363..fed92f0 100644
--- a/core/pim/todo/templatedialogimpl.cpp
+++ b/core/pim/todo/templatedialogimpl.cpp
@@ -9,6 +9,8 @@
9 9
10using namespace Todo; 10using namespace Todo;
11 11
12/* TRANSLATOR Todo::TemplateDialogImpl */
13
12namespace { 14namespace {
13 class TemplateListItem : public QListViewItem { 15 class TemplateListItem : public QListViewItem {
14 public: 16 public:
@@ -61,7 +63,7 @@ TemplateDialogImpl::TemplateDialogImpl( MainWindow* win,
61 it != list.end(); ++it ) { 63 it != list.end(); ++it ) {
62 new TemplateListItem( listView(), (*it), man->templateEvent( (*it) ) ); 64 new TemplateListItem( listView(), (*it), man->templateEvent( (*it) ) );
63 } 65 }
64 listView()->addColumn( tr("Name") ); 66 listView()->addColumn( QWidget::tr("Name") );
65 67
66 connect( listView(), SIGNAL(clicked(QListViewItem*) ), 68 connect( listView(), SIGNAL(clicked(QListViewItem*) ),
67 this, SLOT(slotClicked(QListViewItem*) ) ); 69 this, SLOT(slotClicked(QListViewItem*) ) );
@@ -70,7 +72,7 @@ TemplateDialogImpl::~TemplateDialogImpl() {
70 72
71} 73}
72void TemplateDialogImpl::slotAdd() { 74void TemplateDialogImpl::slotAdd() {
73 QString str = tr("New Template %1").arg( listView()->childCount() ); 75 QString str = QWidget::tr("New Template %1").arg( listView()->childCount() );
74 OTodo ev; 76 OTodo ev;
75 m_man->addEvent(str, ev); 77 m_man->addEvent(str, ev);
76 new TemplateListItem( listView(), str, ev ); 78 new TemplateListItem( listView(), str, ev );
@@ -87,9 +89,7 @@ void TemplateDialogImpl::slotEdit() {
87 TemplateListItem* item = (TemplateListItem*)listView()->currentItem(); 89 TemplateListItem* item = (TemplateListItem*)listView()->currentItem();
88 OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); 90 OTodo ev = m_win->currentEditor()->edit( m_win, item->event() );
89 if ( m_win->currentEditor()->accepted() ) { 91 if ( m_win->currentEditor()->accepted() ) {
90 qWarning("accepted");
91 item->setEvent( ev ); 92 item->setEvent( ev );
92 qWarning("Priority %d", ev.priority() );
93 m_man->removeEvent( item->text() ); 93 m_man->removeEvent( item->text() );
94 m_man->addEvent( item->text(), ev ); 94 m_man->addEvent( item->text(), ev );
95 } 95 }
@@ -113,7 +113,7 @@ void TemplateDialogImpl::slotClicked( QListViewItem* item) {
113 if (!item) 113 if (!item)
114 return; 114 return;
115 115
116 TemplateListItem* tbl = (TemplateListItem*)item; 116 TemplateListItem* tbl = static_cast<TemplateListItem*>(item);
117 edit()->setText( tbl->text() ); 117 edit()->setText( tbl->text() );
118} 118}
119 119