summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-09-13 17:10:30 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-09-13 17:10:30 +0200
commit681a611588781734d45395d76ec802c0a2117be3 (patch)
treedfcf89a4772664417dfd1b0b70d78f29362c0cb8 /src/mainview.cpp
parentGet sure about urls are restored (diff)
downloadrekonq-681a611588781734d45395d76ec802c0a2117be3.tar.xz
Fix close & session
First, I'm really sorry for this bad commit ('git' talking..). The fact is that the 3 bugs fixed here were found chained playing with close code. Here it is the report: - fix close window (it now really appears on multiple window closing) - fix saveSession (saving one call for each site loaded and storing better information): saveSession is now called on loadFinished - clean up some compilation warnings
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 6d907ea2..716e8dab 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -93,6 +93,7 @@ MainView::MainView(MainWindow *parent)
// current page index changing
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
+ connect(this, SIGNAL(currentChanged(int)), rApp->sessionManager(), SLOT(saveSession()));
QTimer::singleShot(0, this, SLOT(postLaunch()));
}
@@ -109,9 +110,6 @@ void MainView::postLaunch()
m_recentlyClosedTabs.prepend(tab);
}
- // Session Manager
- connect(this, SIGNAL(tabsChanged()), rApp->sessionManager(), SLOT(saveSession()));
-
m_addTabButton->setDefaultAction(m_parentWindow->actionByName("new_tab"));
m_addTabButton->setAutoRaise(true);
@@ -278,8 +276,6 @@ void MainView::currentChanged(int index)
tab->view()->setFocus();
tabBar()->resetTabHighlighted(index);
-
- emit tabsChanged();
}
@@ -331,12 +327,6 @@ WebTab *MainView::newWebTab(bool focused)
{
setCurrentWidget(tab);
}
- else
- {
- // if tab is not focused,
- // current index doesn't change...
- emit tabsChanged();
- }
return tab;
}
@@ -508,11 +498,6 @@ void MainView::closeTab(int index, bool del)
{
tabToClose->deleteLater();
}
-
- // if tab was not focused, current index does not change...
- if (index != currentIndex())
- emit tabsChanged();
-
}
void MainView::webViewLoadStarted()
@@ -627,8 +612,6 @@ void MainView::webViewUrlChanged(const QUrl &url)
}
if (ReKonfig::hoveringTabOption() == 2)
tabBar()->setTabToolTip(index, webTab(index)->url().toMimeDataString());
-
- emit tabsChanged();
}