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

Jens-Michael Hoffmann jensmh at gmx.de
Tue Jan 26 16:28:31 CET 2010


SVN commit 1080620 by jmhoffmann:

Pass parameters by reference to const instead of by value.


 M  +5 -4      FileStorageWatcher.cpp  
 M  +4 -4      FileStorageWatcher.h  


--- trunk/KDE/kdeedu/marble/src/lib/FileStorageWatcher.cpp #1080619:1080620
@@ -84,7 +84,7 @@
     emit variableChanged();
 }
 
-void FileStorageWatcherThread::updateTheme( QString mapTheme )
+void FileStorageWatcherThread::updateTheme( const QString &mapTheme )
 {
     mDebug() << "Theme changed to " << mapTheme;
     m_themeMutex.lock();
@@ -199,7 +199,8 @@
     }
 }
 
-void FileStorageWatcherThread::ensureSizePerPlanet( QString planetDirectory, QString currentTheme )
+void FileStorageWatcherThread::ensureSizePerPlanet( const QString &planetDirectory,
+                                                    const QString &currentTheme )
 {
     mDebug() << "Deleting from folder: " << planetDirectory;
     
@@ -238,7 +239,7 @@
     return s1.toInt() > s2.toInt();
 }
 
-void FileStorageWatcherThread::ensureSizePerTheme( QString themeDirectory )
+void FileStorageWatcherThread::ensureSizePerTheme( const QString &themeDirectory )
 {
     mDebug() << "Deleting from folder: " << themeDirectory;
 
@@ -366,7 +367,7 @@
     emit cleared();
 }
 
-void FileStorageWatcher::updateTheme( QString mapTheme )
+void FileStorageWatcher::updateTheme( const QString &mapTheme )
 {
     QMutexLocker locker( m_themeLimitMutex );
     if( m_started )
--- trunk/KDE/kdeedu/marble/src/lib/FileStorageWatcher.h #1080619:1080620
@@ -59,7 +59,7 @@
 	 *
 	 * @param mapTheme The identifier of the new theme.
 	 */
-	void updateTheme( QString mapTheme );
+	void updateTheme( const QString &mapTheme );
 	
 	/**
 	 * Stop doing things that take a long time to quit.
@@ -83,12 +83,12 @@
 	/**
 	 * Deletes files of a planet if needed
 	 */
-	void ensureSizePerPlanet( QString planetDirectory, QString currentTheme = QString() );
+	void ensureSizePerPlanet( const QString &planetDirectory, const QString &currentTheme = QString() );
 	
 	/**
 	 * Deletes files of a theme if needed
 	 */
-	void ensureSizePerTheme( QString themeDirectory );
+	void ensureSizePerTheme( const QString &themeDirectory );
 	
 	/**
 	 * Returns true if it is necessary to delete files.
@@ -154,7 +154,7 @@
 	 *
 	 * @param mapTheme The identifier of the new theme.
 	 */
-	void updateTheme( QString mapTheme );
+	void updateTheme( const QString &mapTheme );
 	
     Q_SIGNALS:
 	void sizeChanged( qint64 bytes );


More information about the Marble-commits mailing list