summaryrefslogtreecommitdiff
authorzecke <zecke>2003-10-07 12:55:16 (UTC)
committer zecke <zecke>2003-10-07 12:55:16 (UTC)
commit898d453b417e561cea25f6b7578814d31cec6e97 (patch) (side-by-side diff)
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 ) {
"Free up some space\n"
"and try again.\n"
"\nQuit Anyway?"),
QMessageBox::Yes|QMessageBox::Escape,
QMessageBox::No|QMessageBox::Default)
!= QMessageBox::No ) {
e->accept();
quit = true;
}else
e->ignore();
}
if (quit ) {
Config config( "todo" );
config.setGroup( "View" );
config.writeEntry( "ShowComplete", showCompleted() );
config.writeEntry( "Category", currentCategory() );
config.writeEntry( "ShowDeadLine", showDeadline());
config.writeEntry( "ShowOverDue", showOverDue() );
config.writeEntry( "ShowQuickTask", showQuickTask() );
/* save templates */
templateManager()->save();
e->accept();
- qApp->quit();
+ QTimer::singleShot(0, qApp, SLOT(closeAllWindows()) );
}
}
void MainWindow::populateTemplates() {
m_template->clear();
QStringList list = templateManager()->templates();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
m_template->insertItem( (*it) );
}
}
/*
* slotNewFromTemplate
* We use the edit widget to do
* the config but we setUid(1)
* to get a new uid
*/
/*
* first we get the name of the template
* then we will use the TemplateManager
*/
void MainWindow::slotNewFromTemplate( int id ) {
QString name = m_template->text( id );
OTodo event = templateManager()->templateEvent( name );