[Marble-commits] KDE/kdeedu/marble/src/lib

Jens-Michael Hoffmann jensmh at gmx.de
Fri Mar 26 17:41:31 CET 2010


SVN commit 1107738 by jmhoffmann:

PlacemarkInfoDialog: pass method arguments by reference to const instead of by value.

 M  +2 -1      PlacemarkInfoDialog.cpp  
 M  +4 -5      PlacemarkInfoDialog.h  


--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkInfoDialog.cpp #1107737:1107738
@@ -16,6 +16,7 @@
 
 #include <QtCore/QFile>
 #include <QtCore/QLocale>
+#include <QtCore/QString>
 #include <QtCore/QTimer>
 #include <QtGui/QFont>
 #include <QtGui/QStatusBar>
@@ -48,7 +49,7 @@
     showContent();
 }
 
-void PlacemarkInfoDialog::showMessage( QString text )
+void PlacemarkInfoDialog::showMessage( const QString& text )
 {
     QFont statusFont = QStatusBar().font();
     statusFont.setPointSize( qRound( 0.9 * statusFont.pointSize() ) );
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkInfoDialog.h #1107737:1107738
@@ -13,10 +13,10 @@
 #ifndef PLACEMARKINFODIALOG_H
 #define PLACEMARKINFODIALOG_H
 
-
 #include <QtCore/QPersistentModelIndex>
-#include <QtCore/QString>
 
+class QString;
+
 // FIXME: remove "using namespace" from header
 namespace Marble
 {
@@ -28,7 +28,6 @@
 namespace Marble
 {
 class DeferredFlag;
-class Placemark;
 
 class PlacemarkInfoDialog : public QDialog, private Ui::PlacemarkInfoDialog
 {
@@ -39,11 +38,11 @@
     explicit PlacemarkInfoDialog( const QPersistentModelIndex &index, QWidget *parent = 0 );
 
  Q_SIGNALS:
-    void source( QString );
+    void source( const QString& );
     
  public Q_SLOTS:
     void setFlagLabel();
-    void showMessage( QString text );
+    void showMessage( const QString& text );
 
  protected:
     void showContent();


More information about the Marble-commits mailing list