[Kst] branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at yahoo.com
Sun Nov 15 17:49:52 CET 2009


SVN commit 1049661 by kuemmel:

pass by reference

 M  +2 -2      legendtab.cpp  
 M  +2 -2      legendtab.h  


--- branches/work/kst/portto4/kst/src/libkstapp/legendtab.cpp #1049660:1049661
@@ -141,7 +141,7 @@
 }
 
 
-void LegendTab::setDisplayedRelations(QStringList displayedRelations, QStringList displayedRelationTips) {
+void LegendTab::setDisplayedRelations(const QStringList& displayedRelations, const QStringList& displayedRelationTips) {
   _displayedRelationList->clear();
   _displayedRelationList->addItems(displayedRelations);
   for (int i=0; i<_displayedRelationList->count(); i++) {
@@ -150,7 +150,7 @@
 }
 
 
-void LegendTab::setAvailableRelations(QStringList availableRelations, QStringList availableRelationTips) {
+void LegendTab::setAvailableRelations(const QStringList& availableRelations, const QStringList& availableRelationTips) {
   _availableRelationList->clear();
   _availableRelationList->addItems(availableRelations);
   for (int i=0; i<_availableRelationList->count(); i++) {
--- branches/work/kst/portto4/kst/src/libkstapp/legendtab.h #1049660:1049661
@@ -27,8 +27,8 @@
     LegendTab(QWidget *parent = 0);
     virtual ~LegendTab();
 
-    void setDisplayedRelations(QStringList displayedRelations, QStringList displayedRelationTips);
-    void setAvailableRelations(QStringList availableRelations, QStringList availableRelationTips);
+    void setDisplayedRelations(const QStringList& displayedRelations, const QStringList& displayedRelationTips);
+    void setAvailableRelations(const QStringList& availableRelations, const QStringList& availableRelationTips);
 
     QStringList displayedRelations();
 


More information about the Kst mailing list