summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp8
-rw-r--r--src/mainview.cpp7
-rw-r--r--src/mainview.h1
-rw-r--r--src/mainwindow.cpp2
4 files changed, 7 insertions, 11 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 6ef0b0c3..f37720ff 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -462,13 +462,7 @@ MainWindow *Application::newMainWindow(bool withTab)
void Application::removeMainWindow(MainWindow *window)
{
m_mainWindows.removeOne(window);
-
- // QApplication should quit as soon we have no mainwindow
- // But QtWebkit seems to create windows without Qt::WA_QuitOnClose attribute,
- // making rekonq keep running after last window is closed
- if (m_mainWindows.length() == 0)
- QCoreApplication::quit();
-
+ kDebug() << "Removing Window from app window list...";
}
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 1ad452ea..fb6a1d78 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -422,9 +422,10 @@ void MainView::closeTab(int index, bool del)
{
if (ReKonfig::lastTabClosesWindow())
{
- // closing window...
- MainWindow *w = qobject_cast<MainWindow *>(parent());
- w->close();
+ emit closeWindow();
+// // closing window...
+// MainWindow *w = qobject_cast<MainWindow *>(parent());
+// w->close();
return;
}
diff --git a/src/mainview.h b/src/mainview.h
index 632ddbca..4e6f1bbb 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -114,6 +114,7 @@ Q_SIGNALS:
void browserTabLoading(bool);
void openPreviousInHistory();
void openNextInHistory();
+ void closeWindow();
void printRequested(QWebFrame *frame);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 811f1cf8..c53fcb6c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -121,7 +121,6 @@ MainWindow::MainWindow()
{
// 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;
@@ -186,6 +185,7 @@ MainWindow::MainWindow()
// connect signals and slots
connect(m_view, SIGNAL(currentTitle(const QString &)), this, SLOT(updateWindowTitle(const QString &)));
connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *)));
+ connect(m_view, SIGNAL(closeWindow()), this, SLOT(close()));
// (shift +) ctrl + tab switching
connect(this, SIGNAL(ctrlTabPressed()), m_view, SLOT(nextTab()));