mainwindow::closeevent handles all the quit events

master
Denes Matetelki 14 years ago
parent 165842b1fd
commit 557b8573d8

@ -25,8 +25,9 @@ MainWindow::MainWindow(QWidget *parent) :
this, SLOT(closeFile())); this, SLOT(closeFile()));
connect(m_ui->actionExport, SIGNAL(activated()), connect(m_ui->actionExport, SIGNAL(activated()),
this, SLOT(exportScene())); this, SLOT(exportScene()));
connect(m_ui->actionQuit, SIGNAL(activated()), connect(m_ui->actionQuit, SIGNAL(activated()),
this, SLOT(quit())); QApplication::instance(), SLOT(quit()));
connect(m_ui->actionAbout_QtMindMap, SIGNAL(activated()), connect(m_ui->actionAbout_QtMindMap, SIGNAL(activated()),
this, SLOT(about())); this, SLOT(about()));
@ -208,14 +209,6 @@ void MainWindow::exportScene()
} }
} }
void MainWindow::quit()
{
if (m_contentChanged && !closeFile())
return;
QApplication::instance()->quit();
}
void MainWindow::keys() void MainWindow::keys()
{ {
QMessageBox msgBox(this); QMessageBox msgBox(this);

@ -30,7 +30,6 @@ public slots:
bool saveFileAs(); bool saveFileAs();
bool closeFile(); bool closeFile();
void exportScene(); void exportScene();
void quit();
void keys(); void keys();
void about(); void about();

Loading…
Cancel
Save