]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tagcloud/tagcloud.cpp
Improve the performance of the code part which checks which items are visible. Althou...
[dolphin.git] / src / tagcloud / tagcloud.cpp
index 5f406a79645b3d1521e0b4d931a0e9c681bb86d2..e59074fab52334331eaec4656ee3ad99f0b0ded7 100644 (file)
@@ -131,7 +131,7 @@ public:
           hoverTag( 0 ),
           cachedHfwWidth( -1 ),
           m_parent( parent ) {
-        newTagNode.text = i18n( "New Tag..." );
+        newTagNode.text = i18nc( "@label", "New Tag..." );
     }
 
     int maxFontSize;
@@ -651,7 +651,7 @@ void Nepomuk::TagCloud::showTags( const QList<Tag>& tags )
     d->showAllTags = false;
     d->invalidateCachedValues();
     d->nodes.clear();
-    Q_FOREACH( Tag tag, tags ) {
+    Q_FOREACH( const Tag &tag, tags ) {
         TagNode node;
         node.tag = tag;
         node.weight = d->calculateWeight( tag );
@@ -736,7 +736,7 @@ QSize Nepomuk::TagCloud::minimumSizeHint() const
     // If we have tags d->rebuildCloud() has been called at least once,
     // thus, we have proper rects (i.e. needed sizes)
     if ( d->nodes.isEmpty() && !d->newTagButtonEnabled ) {
-        return QSize( fontMetrics().width( i18n( "No Tags" ) ), fontMetrics().height() );
+        return QSize( fontMetrics().width( i18nc( "@label Indicator when no tags defined", "No Tags" ) ), fontMetrics().height() );
     }
     else {
         QSize size;