From 53d35dbdbdf034a3c3c741595b714bff10458de6 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 24 Dec 2018 15:08:49 +0100 Subject: [PATCH] BookmarksToolBarButton: Don't show empty title in tooltip BUG: 399233 FIXED-IN: 3.1.0 --- src/lib/bookmarks/bookmarkstoolbarbutton.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/bookmarks/bookmarkstoolbarbutton.cpp b/src/lib/bookmarks/bookmarkstoolbarbutton.cpp index bc5b2bac0..30c4721dd 100644 --- a/src/lib/bookmarks/bookmarkstoolbarbutton.cpp +++ b/src/lib/bookmarks/bookmarkstoolbarbutton.cpp @@ -243,11 +243,15 @@ QString BookmarksToolbarButton::createTooltip() const return m_bookmark->description(); } - if (!m_bookmark->url().isEmpty()) { + if (!m_bookmark->title().isEmpty() && !m_bookmark->url().isEmpty()) { return QString("%1\n%2").arg(m_bookmark->title(), m_bookmark->urlString()); } - return m_bookmark->title(); + if (!m_bookmark->title().isEmpty()) { + return m_bookmark->title(); + } + + return m_bookmark->urlString(); } void BookmarksToolbarButton::enterEvent(QEvent* event)