summaryrefslogtreecommitdiff
path: root/core/pim/todo/todoentryimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/todoentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoentryimpl.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp
index f938d61..26a685c 100644
--- a/core/pim/todo/todoentryimpl.cpp
+++ b/core/pim/todo/todoentryimpl.cpp
@@ -44,13 +44,12 @@
44 44
45NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent, 45NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent,
46 const char *name, bool modal, WFlags fl ) 46 const char *name, bool modal, WFlags fl )
47 : NewTaskDialogBase( parent, name, modal, fl ), 47 : NewTaskDialogBase( parent, name, modal, fl ),
48 todo( task ) 48 todo( task )
49{ 49{
50 qWarning("setting category" );
51 todo.setCategories( task.allCategories() ); 50 todo.setCategories( task.allCategories() );
52 if ( todo.hasDate() ) 51 if ( todo.hasDate() )
53 date = todo.date(); 52 date = todo.date();
54 else 53 else
55 date = QDate::currentDate(); 54 date = QDate::currentDate();
56 55
@@ -101,13 +100,12 @@ void NewTaskDialog::init()
101 100
102/* 101/*
103 * Destroys the object and frees any allocated resources 102 * Destroys the object and frees any allocated resources
104 */ 103 */
105NewTaskDialog::~NewTaskDialog() 104NewTaskDialog::~NewTaskDialog()
106{ 105{
107 qWarning("d'tor" );
108 // no need to delete child widgets, Qt does it all for us 106 // no need to delete child widgets, Qt does it all for us
109} 107}
110void NewTaskDialog::dateChanged( int y, int m, int d ) 108void NewTaskDialog::dateChanged( int y, int m, int d )
111{ 109{
112 date = QDate( y, m, d ); 110 date = QDate( y, m, d );
113 buttonDate->setText( TimeString::longDateString( date ) ); 111 buttonDate->setText( TimeString::longDateString( date ) );
@@ -115,25 +113,22 @@ void NewTaskDialog::dateChanged( int y, int m, int d )
115 113
116/*! 114/*!
117*/ 115*/
118 116
119ToDoEvent NewTaskDialog::todoEntry() 117ToDoEvent NewTaskDialog::todoEntry()
120{ 118{
121 qWarning("todoEntry()" );
122 if( checkDate->isChecked() ){ 119 if( checkDate->isChecked() ){
123 todo.setDate( date ); 120 todo.setDate( date );
124 todo.setHasDate( true ); 121 todo.setHasDate( true );
125 }else{ 122 }else{
126 todo.setHasDate( false ); 123 todo.setHasDate( false );
127 } 124 }
128 qWarning("todoEntry::category()" );
129 if ( comboCategory->currentCategory() != -1 ) { 125 if ( comboCategory->currentCategory() != -1 ) {
130 QArray<int> arr = comboCategory->currentCategories(); 126 QArray<int> arr = comboCategory->currentCategories();
131 QStringList list; 127 QStringList list;
132 list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ; 128 list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ;
133 qWarning("saving category");
134 todo.setCategories( list ); 129 todo.setCategories( list );
135 } 130 }
136 todo.setPriority( comboPriority->currentItem() + 1 ); 131 todo.setPriority( comboPriority->currentItem() + 1 );
137 todo.setCompleted( checkCompleted->isChecked() ); 132 todo.setCompleted( checkCompleted->isChecked() );
138 133
139 todo.setDescription( txtTodo->text() ); 134 todo.setDescription( txtTodo->text() );
@@ -145,13 +140,12 @@ ToDoEvent NewTaskDialog::todoEntry()
145/*! 140/*!
146 141
147*/ 142*/
148 143
149void NewTaskDialog::accept() 144void NewTaskDialog::accept()
150{ 145{
151 qWarning("accept" );
152 QString strText = txtTodo->text(); 146 QString strText = txtTodo->text();
153 if ( strText.isEmpty() ) { 147 if ( strText.isEmpty() ) {
154 // hmm... just decline it then, the user obviously didn't care about it 148 // hmm... just decline it then, the user obviously didn't care about it
155 QDialog::reject(); 149 QDialog::reject();
156 return; 150 return;
157 } 151 }