-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp index 6af229c..89f08e0 100644 --- a/core/pim/todo/todoentryimpl.cpp +++ b/core/pim/todo/todoentryimpl.cpp | |||
@@ -139,31 +139,32 @@ ToDoEvent NewTaskDialog::todoEntry() | |||
139 | todo.setCategories( list ); | 139 | todo.setCategories( list ); |
140 | } | 140 | } |
141 | todo.setPriority( comboPriority->currentItem() + 1 ); | 141 | todo.setPriority( comboPriority->currentItem() + 1 ); |
142 | todo.setCompleted( checkCompleted->isChecked() ); | 142 | todo.setCompleted( checkCompleted->isChecked() ); |
143 | 143 | ||
144 | todo.setDescription( txtTodo->text() ); | 144 | todo.setDescription( txtTodo->text() ); |
145 | todo.setSummary( lneSum->text() ); | 145 | todo.setSummary( lneSum->text() ); |
146 | QString text = cmbProg->currentText(); | 146 | QString text = cmbProg->currentText(); |
147 | todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() ); | 147 | todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() ); |
148 | return todo; | 148 | return todo; |
149 | } | 149 | } |
150 | void NewTaskDialog::slotCopy() | 150 | void NewTaskDialog::slotCopy() |
151 | { | 151 | { |
152 | txtTodo->clear(); | 152 | txtTodo->clear(); |
153 | txtTodo->setText( lneSum->text() ); | 153 | txtTodo->setText( lneSum->text() ); |
154 | } | 154 | } |
155 | 155 | ||
156 | /*! | 156 | /*! |
157 | 157 | ||
158 | */ | 158 | */ |
159 | 159 | ||
160 | void NewTaskDialog::accept() | 160 | void NewTaskDialog::accept() |
161 | { | 161 | { |
162 | QString strText = txtTodo->text(); | 162 | QString strText = txtTodo->text(); |
163 | if ( strText.isEmpty() ) { | 163 | QString strSumm = lneSum->text(); |
164 | if ( strSumm.isEmpty() && strText.isEmpty() ) { | ||
164 | // hmm... just decline it then, the user obviously didn't care about it | 165 | // hmm... just decline it then, the user obviously didn't care about it |
165 | QDialog::reject(); | 166 | QDialog::reject(); |
166 | return; | 167 | return; |
167 | } | 168 | } |
168 | QDialog::accept(); | 169 | QDialog::accept(); |
169 | } | 170 | } |