[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/dialogs
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2010-11-12 20:59:59
Message-ID: 20101112205959.0D9F3AC89E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1196226 by adawit:
Make it compile with QT_USE_FAST_CONCATENATION and QT_USE_FAST_OPERATOR_PLUS flags
M +16 -5 kaboutapplicationpersonlistdelegate_p.cpp
--- trunk/KDE/kdelibs/kdeui/dialogs/kaboutapplicationpersonlistdelegate_p.cpp #1196225:1196226
@@ -118,11 +118,22 @@
label->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
QString text;
- text += "<b>" + profile.name() +"</b>";
- text += profile.task().isEmpty() ? "" : "<br><i>" + profile.task() + "</i>";
- text += profile.location().isEmpty() ? "" : "<br>" + profile.location();
+ text += QLatin1String("<b>");
+ text += profile.name();
+ text += QLatin1String("</b>");
- int labelRows = text.count( "<br>" ) + 1;
+ if (!profile.task().isEmpty()) {
+ text += QLatin1String("<br><i>");
+ text += profile.task();
+ text += QLatin1String("</i>");
+ }
+
+ if (!profile.location().isEmpty()) {
+ text += QLatin1String("<br>");
+ text += profile.location();
+ }
+
+ int labelRows = text.count( QLatin1String("<br>") ) + 1;
label->move( widgetsRect.left(), widgetsRect.top() );
label->resize( widgetsRect.width(), option.fontMetrics.height() * labelRows + margin );
label->setContentsMargins( 0, 0, 0, 0 );
@@ -139,7 +150,7 @@
KAction *action;
action = qobject_cast< KAction * >( mainLinks->actions().at( EmailAction ) );
action->setToolTip( profile.email() );
- action->setData( QString( "mailto:" + profile.email() ) );
+ action->setData( QString( QLatin1String("mailto:") + profile.email() ) );
action->setVisible( true );
if( !profile.homepage().isEmpty() ) {
action = qobject_cast< KAction * >( mainLinks->actions().at( HomepageAction ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic