[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib/geodata/scene
From:       Jens-Michael Hoffmann <jensmh () gmx ! de>
Date:       2009-07-22 0:05:09
Message-ID: 1248221109.776499.2294.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1000777 by jmhoffmann:

Increase localness of variables.


 M  +11 -17    GeoSceneMapTheme.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneMapTheme.cpp #1000776:1000777
@@ -95,22 +95,18 @@
     }
 
     QStringList  mapfiles;
-    QStringList  tmp;
-    QString      themedir;
-    QString      themedirname;
-    QString      themexml;
 
     QStringListIterator  it( localmapdirs );
     while ( it.hasNext() ) {
-        themedir = it.next() + '/';
-        themedirname = QDir( themedir ).dirName();
+        QString themedir = it.next() + '/';
+        QString themedirname = QDir( themedir ).dirName();
 
-        tmp = ( QDir( themedir ) ).entryList( QStringList( "*.dgml" ),
-                                              QDir::Files | QDir::NoSymLinks );
+        QStringList tmp = ( QDir( themedir ) ).entryList( QStringList( "*.dgml" ),
+                                                          QDir::Files | QDir::NoSymLinks );
         if ( !tmp.isEmpty() ) {
             QStringListIterator  k( tmp );
             while ( k.hasNext() ) {
-                themexml = k.next();
+                QString themexml = k.next();
                 mapfiles << themedirname + '/' + themexml;
             }
         }
@@ -118,15 +114,15 @@
 
     QStringListIterator  j( sysmapdirs );
     while ( j.hasNext() ) {
-        themedir = j.next();
-        themedirname = QDir( themedir ).path().section( '/', -2, -1);
+        QString themedir = j.next();
+        QString themedirname = QDir( themedir ).path().section( '/', -2, -1 );
 
-        tmp = ( QDir( themedir ) ).entryList( QStringList( "*.dgml" ),
-                                              QDir::Files | QDir::NoSymLinks );
+        QStringList tmp = ( QDir( themedir ) ).entryList( QStringList( "*.dgml" ),
+                                                          QDir::Files | QDir::NoSymLinks );
         if ( !tmp.isEmpty() ) {
             QStringListIterator  l( tmp );
             while ( l.hasNext() ) {
-                themexml = l.next();
+                QString themexml = l.next();
                 mapfiles << themedirname + '/' + themexml;
             }
         }
@@ -178,10 +174,8 @@
                                 tr( maptheme->name().toUtf8() ),
                                 Qt::DisplayRole );
 
+        QString relativePath = "maps/" + maptheme->prefix() + '/' + maptheme->icon();
         QPixmap themeIconPixmap;
-        QString relativePath;
-
-        relativePath = "maps/" +  maptheme->prefix() + '/' + maptheme->icon();
         themeIconPixmap.load( MarbleDirs::path( relativePath ) );
 
         if ( themeIconPixmap.isNull() ) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic