summaryrefslogtreecommitdiff
authorzecke <zecke>2003-10-07 12:55:16 (UTC)
committer zecke <zecke>2003-10-07 12:55:16 (UTC)
commit898d453b417e561cea25f6b7578814d31cec6e97 (patch) (unidiff)
tree92ba0e55f17abcaa7b7883410c8850e59e54f516
parente65d5c86b5fff521dfb94282a96606546bad9585 (diff)
downloadopie-898d453b417e561cea25f6b7578814d31cec6e97.zip
opie-898d453b417e561cea25f6b7578814d31cec6e97.tar.gz
opie-898d453b417e561cea25f6b7578814d31cec6e97.tar.bz2
If you decide to close the mainwindow and have say editor and views open as well
call closeAllWindows() after all events are dispatched
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index ad7899f..7f40645 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -388,49 +388,49 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
388 "Free up some space\n" 388 "Free up some space\n"
389 "and try again.\n" 389 "and try again.\n"
390 "\nQuit Anyway?"), 390 "\nQuit Anyway?"),
391 QMessageBox::Yes|QMessageBox::Escape, 391 QMessageBox::Yes|QMessageBox::Escape,
392 QMessageBox::No|QMessageBox::Default) 392 QMessageBox::No|QMessageBox::Default)
393 != QMessageBox::No ) { 393 != QMessageBox::No ) {
394 e->accept(); 394 e->accept();
395 quit = true; 395 quit = true;
396 }else 396 }else
397 e->ignore(); 397 e->ignore();
398 398
399 } 399 }
400 400
401 if (quit ) { 401 if (quit ) {
402 Config config( "todo" ); 402 Config config( "todo" );
403 config.setGroup( "View" ); 403 config.setGroup( "View" );
404 config.writeEntry( "ShowComplete", showCompleted() ); 404 config.writeEntry( "ShowComplete", showCompleted() );
405 config.writeEntry( "Category", currentCategory() ); 405 config.writeEntry( "Category", currentCategory() );
406 config.writeEntry( "ShowDeadLine", showDeadline()); 406 config.writeEntry( "ShowDeadLine", showDeadline());
407 config.writeEntry( "ShowOverDue", showOverDue() ); 407 config.writeEntry( "ShowOverDue", showOverDue() );
408 config.writeEntry( "ShowQuickTask", showQuickTask() ); 408 config.writeEntry( "ShowQuickTask", showQuickTask() );
409 /* save templates */ 409 /* save templates */
410 templateManager()->save(); 410 templateManager()->save();
411 e->accept(); 411 e->accept();
412 qApp->quit(); 412 QTimer::singleShot(0, qApp, SLOT(closeAllWindows()) );
413 } 413 }
414} 414}
415void MainWindow::populateTemplates() { 415void MainWindow::populateTemplates() {
416 m_template->clear(); 416 m_template->clear();
417 QStringList list = templateManager()->templates(); 417 QStringList list = templateManager()->templates();
418 QStringList::Iterator it; 418 QStringList::Iterator it;
419 for ( it = list.begin(); it != list.end(); ++it ) { 419 for ( it = list.begin(); it != list.end(); ++it ) {
420 m_template->insertItem( (*it) ); 420 m_template->insertItem( (*it) );
421 } 421 }
422} 422}
423/* 423/*
424 * slotNewFromTemplate 424 * slotNewFromTemplate
425 * We use the edit widget to do 425 * We use the edit widget to do
426 * the config but we setUid(1) 426 * the config but we setUid(1)
427 * to get a new uid 427 * to get a new uid
428 */ 428 */
429/* 429/*
430 * first we get the name of the template 430 * first we get the name of the template
431 * then we will use the TemplateManager 431 * then we will use the TemplateManager
432 */ 432 */
433void MainWindow::slotNewFromTemplate( int id ) { 433void MainWindow::slotNewFromTemplate( int id ) {
434 QString name = m_template->text( id ); 434 QString name = m_template->text( id );
435 435
436 OTodo event = templateManager()->templateEvent( name ); 436 OTodo event = templateManager()->templateEvent( name );