From 5dcce5ee7698ad2749186306627583e109e0f235 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 25 May 2010 00:29:17 +0200 Subject: Properly take care of ampersands Ronny Scholz patch. Thanks ;) --- src/mainview.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mainview.cpp') 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(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); } -- cgit v1.2.1