[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Jens-Michael Hoffmann
jensmh at gmx.de
Wed Jul 22 02:05:09 CEST 2009
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() ) {
More information about the Marble-commits
mailing list