diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 21:39:34 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 21:39:34 (GMT) |
commit | 75f16903a09a80ad9a22ccb7d0b90591b7b780a2 (patch) | |
tree | 79ecc7ac5189bc3608947b0cd2d9d1697ec42d3c /mainwin.cc | |
parent | b629bd329247aa47b99afa6c6f9a2a28803af09b (diff) |
Quit now really quits instead of just closing the current document, also fixes dangling dialog problem
git-svn-id: http://svn.clifford.at/openscad/trunk@353 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r-- | mainwin.cc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -158,6 +158,7 @@ MainWindow::MainWindow(const char *filename) connect(this->fileActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); connect(this->fileActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(this->fileActionReload, SIGNAL(triggered()), this, SLOT(actionReload())); + connect(this->fileActionQuit, SIGNAL(triggered()), this, SLOT(quit())); #ifndef __APPLE__ this->fileActionSave->setShortcut(QKeySequence(Qt::Key_F2)); this->fileActionReload->setShortcut(QKeySequence(Qt::Key_F3)); @@ -1790,3 +1791,10 @@ void MainWindow::setFont(const QString &family, uint size) font.setStyleHint(QFont::TypeWriter); editor->setFont(font); } + +void MainWindow::quit() +{ + QCloseEvent ev; + QApplication::sendEvent(QApplication::instance(), &ev); + if (ev.isAccepted()) QApplication::instance()->quit(); +} |