1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

BookmarksToolBarButton: Don't show empty title in tooltip

BUG: 399233
FIXED-IN: 3.1.0
This commit is contained in:
David Rosca 2018-12-24 15:08:49 +01:00
parent 956b99c1cb
commit 53d35dbdbd
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -243,11 +243,15 @@ QString BookmarksToolbarButton::createTooltip() const
return m_bookmark->description(); 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 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) void BookmarksToolbarButton::enterEvent(QEvent* event)