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
@@ -396,33 +396,33 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
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 */