summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <tsdgeos@terra.es>2012-04-30 18:16:03 (GMT)
committerAlbert Astals Cid <tsdgeos@terra.es>2012-04-30 18:16:53 (GMT)
commitc9b6191945a2416156e418712dca1fda7f4a8820 (patch)
tree99007335b8395447eb62fe8ac4aa843de7c7ec50
parent6af5b4b7b319ce0a3cdf453212f763ea052db0a0 (diff)
Do not show the email icon if there is no email for that author
-rw-r--r--kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp b/kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp
index d5f1342..3e8967c 100644
--- a/kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp
+++ b/kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp
@@ -121,11 +121,13 @@ void KAboutApplicationPersonListDelegate::updateItemWidgets( const QList<QWidget
mainLinks->setContentsMargins( 0, 0, 0, 0 );
mainLinks->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
KAction *action;
- action = qobject_cast< KAction * >( mainLinks->actions().at( EmailAction ) );
- action->setToolTip( i18nc( "Action to send an email to a contributor",
- "Email contributor\n%1", profile.email() ) );
- action->setData( QString( QLatin1String( "mailto:") + profile.email() ) );
- action->setVisible( true );
+ if( !profile.email().isEmpty() ) {
+ action = qobject_cast< KAction * >( mainLinks->actions().at( EmailAction ) );
+ action->setToolTip( i18nc( "Action to send an email to a contributor",
+ "Email contributor\n%1", profile.email() ) );
+ action->setData( QString( QLatin1String( "mailto:") + profile.email() ) );
+ action->setVisible( true );
+ }
if( !profile.homepage().isEmpty() ) {
action = qobject_cast< KAction * >( mainLinks->actions().at( HomepageAction ) );
action->setToolTip( i18n( "Visit contributor's homepage\n%1", profile.homepage().url() ) );