diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-05-25 00:29:17 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-05-25 00:29:17 +0200 |
commit | 5dcce5ee7698ad2749186306627583e109e0f235 (patch) | |
tree | 1e1a4fb5a48f031c3099b817079b0b4b85bc4108 /src/mainview.cpp | |
parent | This commit fixes my problems with this new handling. (diff) | |
download | rekonq-5dcce5ee7698ad2749186306627583e109e0f235.tar.xz |
Properly take care of ampersands
Ronny Scholz patch. Thanks ;)
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 11 |
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); } |