summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index b7ad7543..0bc6fbde 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -594,11 +594,10 @@ void MainView::webViewIconChanged()
void MainView::webViewTitleChanged(const QString &title)
{
- QString tabTitle = title;
- if (title.isEmpty())
- {
- tabTitle = i18n("(Untitled)");
- }
+ QString viewTitle = title.isEmpty()? i18n("(Untitled)") : title;
+ QString tabTitle = viewTitle;
+ tabTitle.replace("&", "&&");
+
WebView *view = qobject_cast<WebView *>(sender());
int index = indexOf(view->parentWidget());
if (-1 != index)
@@ -607,7 +606,7 @@ void MainView::webViewTitleChanged(const QString &title)
}
if (currentIndex() == index)
{
- emit currentTitle(tabTitle);
+ emit currentTitle(viewTitle);
}
Application::historyManager()->updateHistoryEntry(view->url(), tabTitle);
}