summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp6
-rw-r--r--src/application.h2
-rw-r--r--src/mainwindow.cpp1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 683a405f..9bbf7792 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -406,6 +406,12 @@ MainWindow *Application::newMainWindow()
}
+void Application::removeMainWindow(MainWindow *window)
+{
+ m_mainWindows.removeAt(m_mainWindows.indexOf(window, 0));
+}
+
+
MainWindowList Application::mainWindowList()
{
return m_mainWindows;
diff --git a/src/application.h b/src/application.h
index 61d93b87..e5616d59 100644
--- a/src/application.h
+++ b/src/application.h
@@ -127,6 +127,8 @@ public slots:
const Rekonq::OpenType& type = Rekonq::CurrentTab
);
+ void removeMainWindow(MainWindow *window);
+
private slots:
/**
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 345cfda7..722189f5 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -143,6 +143,7 @@ MainWindow::MainWindow()
MainWindow::~MainWindow()
{
+ Application::instance()->removeMainWindow(this);
delete m_popup;
delete m_view;
}