From 42079d50b51866f139cc3ec46c91d34ba9515974 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 7 Dec 2011 21:48:50 +0100 Subject: [PATCH] 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) --- src/webview/tabwidget.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/webview/tabwidget.cpp b/src/webview/tabwidget.cpp index b9083b64f..c24f435c1 100644 --- a/src/webview/tabwidget.cpp +++ b/src/webview/tabwidget.cpp @@ -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);