summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp4
-rw-r--r--src/mainwindow.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 9fa0e322..efbfd60a 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -516,6 +516,10 @@ void Application::removeMainWindow(MainWindow *window)
{
m_mainWindows.removeOne(window);
kDebug() << "Removing Window from app window list...";
+
+ // bye bye...
+ if (m_mainWindows.count() == 0)
+ quit();
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e0fdf255..a3b222b3 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -125,6 +125,7 @@ MainWindow::MainWindow()
{
// Setting attributes (just to be sure...)
setAttribute(Qt::WA_DeleteOnClose, true);
+ setAttribute(Qt::WA_QuitOnClose, true);
// creating a centralWidget containing panel, m_view and the hidden findbar
QWidget *centralWidget = new QWidget;
@@ -235,6 +236,7 @@ MainWindow::~MainWindow()
rApp->bookmarkManager()->removeBookmarkBar(m_bookmarksBar);
rApp->bookmarkManager()->removeBookmarkPanel(m_bookmarksPanel);
+
rApp->removeMainWindow(this);
}
@@ -657,6 +659,7 @@ void MainWindow::finalizeGUI(KXMLGUIClient* client)
<< " ====================== ";
}
+
void MainWindow::readProperties(const KConfigGroup& config)
{
Q_UNUSED(config)
@@ -664,6 +667,7 @@ void MainWindow::readProperties(const KConfigGroup& config)
Application::instance()->sessionManager()->restoreMainWindow(this);
}
+
void MainWindow::openLocation()
{
if (isFullScreen())