summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp23
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp1
2 files changed, 10 insertions, 14 deletions
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index aa8887c..0a94a3d 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -678,26 +678,21 @@ void CentralWidget::activateTab(bool onlyHelpViewer)
void CentralWidget::setTabTitle(const QUrl& url)
{
- int tab = lastTabPage;
- HelpViewer* viewer = currentHelpViewer();
-
+ Q_UNUSED(url)
#if !defined(QT_NO_WEBKIT)
- if (!viewer || viewer->source() != url) {
- QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
- for (tab = 0; tab < tabBar->count(); ++tab) {
- viewer = qobject_cast<HelpViewer*>(tabWidget->widget(tab));
- if (viewer && viewer->source() == url)
- break;
- }
+ QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
+ for (int tab = 0; tab < tabBar->count(); ++tab) {
+ HelpViewer* viewer = qobject_cast<HelpViewer*>(tabWidget->widget(tab));
+ if (viewer)
+ tabWidget->setTabText(tab, viewer->documentTitle().trimmed());
}
#else
- Q_UNUSED(url)
-#endif
-
+ HelpViewer* viewer = currentHelpViewer();
if (viewer) {
- tabWidget->setTabText(tab,
+ tabWidget->setTabText(lastTabPage,
quoteTabTitle(viewer->documentTitle().trimmed()));
}
+#endif
}
void CentralWidget::currentPageChanged(int index)
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index 5ce6e14..5726136 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -393,6 +393,7 @@ void HelpViewer::mousePressEvent(QMouseEvent *event)
void HelpViewer::setLoadFinished(bool ok)
{
loadFinished = ok;
+ emit sourceChanged(url());
}
#else // !defined(QT_NO_WEBKIT)