summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-10-23 17:26:08 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commitfcbe8fba1b0d197fb2711bdce5e01a2b7a3a8e56 (patch)
tree082f52276c3adcc16c0af30fb63813ac0f3322c5 /src/tabwindow
parentFix line changed by accident, restoring correct behavior on startup (diff)
downloadrekonq-fcbe8fba1b0d197fb2711bdce5e01a2b7a3a8e56.tar.xz
Fix tab titles managements on empty page titles
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/tabwindow.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp
index 99c4aa40..5b295981 100644
--- a/src/tabwindow/tabwindow.cpp
+++ b/src/tabwindow/tabwindow.cpp
@@ -262,9 +262,7 @@ void TabWindow::tabTitleChanged(const QString &title)
if (!tab)
return;
- bool emptyTitle = title.isEmpty();
-
- QString tabTitle = emptyTitle ? tab->url().url() : title;
+ QString tabTitle = title.isEmpty() ? tab->title() : title;
tabTitle.replace('&', "&&");
int index = indexOf(tab);
@@ -275,14 +273,11 @@ void TabWindow::tabTitleChanged(const QString &title)
if (currentIndex() != index)
{
- if (!emptyTitle)
- tabBar()->setTabHighlighted(index, true);
+ tabBar()->setTabHighlighted(index, true);
}
else
{
- emptyTitle
- ? setWindowTitle(QL1S("rekonq"))
- : setWindowTitle(tabTitle + QL1S(" - rekonq"));
+ setWindowTitle(tabTitle + QL1S(" - rekonq"));
}
}