1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Some minor changes in restoring tabs + pinned tabs

- it may fix showing close button on pinned tab
  when restoring on qt 4.8 (probably, I cannot reproduce
  this even on qt 4.8 so I cannot exactly tell)
This commit is contained in:
nowrep 2011-12-07 21:48:50 +01:00
parent a7736d4130
commit 42079d50b5

View File

@ -376,7 +376,6 @@ void TabWidget::currentTabChanged(int index)
}
p_QupZilla->setWindowTitle(title + " - QupZilla");
// p_QupZilla->locationBar()->showUrl(weView()->url(),false);
if (m_locationBars->indexOf(locBar) != -1) {
m_locationBars->setCurrentWidget(locBar);
@ -554,7 +553,7 @@ void TabWidget::restorePinnedTabs()
QByteArray historyState = tabHistory.value(i);
int addedIndex;
if (!historyState.isEmpty()) {
addedIndex = addView(QUrl());
addedIndex = addView(QUrl(), tr("New tab"), CleanPage);
QDataStream historyStream(historyState);
historyStream >> *weView(addedIndex)->history();
weView(addedIndex)->load(url);
@ -568,8 +567,8 @@ void TabWidget::restorePinnedTabs()
emit pinnedTabAdded();
}
m_tabBar->updateCloseButton(addedIndex);
m_tabBar->moveTab(addedIndex, i);
m_tabBar->updateCloseButton(i);
}
}
@ -630,7 +629,7 @@ bool TabWidget::restoreState(const QByteArray &state)
QByteArray historyState = tabHistory.value(i);
if (!historyState.isEmpty()) {
int index = addView(QUrl());
int index = addView(QUrl(), tr("New tab"), CleanPage);
QDataStream historyStream(historyState);
historyStream >> *weView(index)->history();
weView(index)->load(url);