[kde-doc-english] [trojita] src/Gui: GUI: don't show weird tooltips for non-mailto links in the header view
Jan Kundrát
jkt at flaska.net
Thu Jan 3 11:58:42 UTC 2013
Git commit 978603c88ea1fd6e86a9f7c0d18b527710c06502 by Jan Kundrát.
Committed on 03/01/2013 at 12:48.
Pushed by jkt into branch 'master'.
GUI: don't show weird tooltips for non-mailto links in the header view
M +3 -3 src/Gui/MessageView.cpp
http://commits.kde.org/trojita/978603c88ea1fd6e86a9f7c0d18b527710c06502
diff --git a/src/Gui/MessageView.cpp b/src/Gui/MessageView.cpp
index 3d611bd..c532928 100644
--- a/src/Gui/MessageView.cpp
+++ b/src/Gui/MessageView.cpp
@@ -464,13 +464,13 @@ void MessageView::externalsEnabled()
void MessageView::linkInTitleHovered(const QString &target)
{
- if (target.isEmpty()) {
+ QUrl url(target);
+
+ if (target.isEmpty() || url.scheme().toLower() != QLatin1String("mailto")) {
header->setToolTip(QString());
return;
}
- QUrl url(target);
-
QString frontOfAtSign, afterAtSign;
if (url.path().indexOf(QLatin1String("@")) != -1) {
QStringList chunks = url.path().split(QLatin1String("@"));
More information about the kde-doc-english
mailing list