summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-10-07 19:59:23 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-10-07 19:59:23 +0200
commita10c41adb4df9015183ca01a4dd07c519619827c (patch)
tree9026ae53487d61b90f044f2b1d0f7100014e5e1c /src/mainwindow.cpp
parentUse KPart url when some KPart is active on saving (diff)
downloadrekonq-a10c41adb4df9015183ca01a4dd07c519619827c.tar.xz
Clean up windows close and app quit
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp9
1 files changed, 7 insertions, 2 deletions
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);
}