From a10c41adb4df9015183ca01a4dd07c519619827c Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 7 Oct 2011 19:59:23 +0200 Subject: Clean up windows close and app quit --- src/mainwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f0df00e8..abd5455a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -118,6 +118,10 @@ MainWindow::MainWindow() , m_hidePopupTimer(new QTimer(this)) , m_rekonqMenu(0) { + // Setting attributes (just to be sure...) + setAttribute(Qt::WA_DeleteOnClose, true); + setAttribute(Qt::WA_QuitOnClose, false); + // creating a centralWidget containing panel, m_view and the hidden findbar QWidget *centralWidget = new QWidget; centralWidget->setContentsMargins(0, 0, 0, 0); @@ -1569,8 +1573,9 @@ void MainWindow::setEditable(bool on) } -bool MainWindow::close() +void MainWindow::closeEvent(QCloseEvent *event) { emit windowClosing(); - return KMainWindow::close(); + kDebug() << "CLOSING WINDOW..."; + KXmlGuiWindow::closeEvent(event); } -- cgit v1.2.1