summaryrefslogtreecommitdiff
authorzecke <zecke>2002-06-25 18:50:22 (UTC)
committer zecke <zecke>2002-06-25 18:50:22 (UTC)
commitcfd080ed605cdfc878f8a5e519ac53fc331092d9 (patch) (side-by-side diff)
tree16ad000a505fe836ccd94fc6d6cfbf6fbacfa4e4
parentbb392a72fd6071e76ca0c103637d6bb9eed59d3a (diff)
downloadopie-cfd080ed605cdfc878f8a5e519ac53fc331092d9.zip
opie-cfd080ed605cdfc878f8a5e519ac53fc331092d9.tar.gz
opie-cfd080ed605cdfc878f8a5e519ac53fc331092d9.tar.bz2
fix a bug spotted by treke. A ne Task got rejected when only the summary
was filled with text
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/todoentryimpl.cpp3
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
@@ -115,55 +115,56 @@ NewTaskDialog::~NewTaskDialog()
{
// no need to delete child widgets, Qt does it all for us
}
void NewTaskDialog::dateChanged( int y, int m, int d )
{
date = QDate( y, m, d );
buttonDate->setText( TimeString::longDateString( date ) );
}
/*!
*/
ToDoEvent NewTaskDialog::todoEntry()
{
if( checkDate->isChecked() ){
todo.setDate( date );
todo.setHasDate( true );
}else{
todo.setHasDate( false );
}
if ( comboCategory->currentCategory() != -1 ) {
QArray<int> arr = comboCategory->currentCategories();
QStringList list;
list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ;
todo.setCategories( list );
}
todo.setPriority( comboPriority->currentItem() + 1 );
todo.setCompleted( checkCompleted->isChecked() );
todo.setDescription( txtTodo->text() );
todo.setSummary( lneSum->text() );
QString text = cmbProg->currentText();
todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() );
return todo;
}
void NewTaskDialog::slotCopy()
{
txtTodo->clear();
txtTodo->setText( lneSum->text() );
}
/*!
*/
void NewTaskDialog::accept()
{
QString strText = txtTodo->text();
- if ( strText.isEmpty() ) {
+ QString strSumm = lneSum->text();
+ if ( strSumm.isEmpty() && strText.isEmpty() ) {
// hmm... just decline it then, the user obviously didn't care about it
QDialog::reject();
return;
}
QDialog::accept();
}