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

List:       kde-commits
Subject:    playground/games/granatier/src
From:       Mathias Kraus <k.hias () gmx ! de>
Date:       2009-09-28 20:17:03
Message-ID: 1254169023.445971.25911.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1029031 by mkraus:

add more places to look for clanbomber maps

 M  +9 -5      arenaselector.cpp  


--- trunk/playground/games/granatier/src/arenaselector.cpp #1029030:1029031
@@ -216,21 +216,25 @@
     //find the clanbomber files
     QStringList listClanbomberPaths;
     listClanbomberPaths.append("/usr/share/games/clanbomber/maps/");
+    listClanbomberPaths.append("/usr/share/apps/clanbomber/maps/");
+    listClanbomberPaths.append("/usr/local/share/games/clanbomber/maps/");
+    listClanbomberPaths.append("/usr/local/share/apps/clanbomber/maps/");
+    listClanbomberPaths.append("/usr/games/clanbomber/maps/");
+    listClanbomberPaths.append("/usr/local/games/clanbomber/maps/");
     listClanbomberPaths.append(QDir::homePath() + "/.clanbomber/maps/");
-    for(int ii = 0; ii < listClanbomberPaths.count(); ii++)
+    for(int i = 0; i < listClanbomberPaths.count(); i++)
     {
-        QString strDirectoryPath = listClanbomberPaths[ii];
-        QStringList listMaps;
-        QDir clanbomberDir(strDirectoryPath);
+        QDir clanbomberDir(listClanbomberPaths[i]);
         if(!clanbomberDir.exists())
         {
             continue;
         }
         
+        QStringList listMaps;
         listMaps = clanbomberDir.entryList(QStringList("*.map"));
         for(int j = 0; j < listMaps.count(); j++)
         {
-            QFile mapFile(strDirectoryPath + listMaps[j]);
+            QFile mapFile(listClanbomberPaths[i] + listMaps[j]);
             mapFile.open(QIODevice::ReadOnly | QIODevice::Text);
             QTextStream readStream(&mapFile);
             
[prev in list] [next in list] [prev in thread] [next in thread] 

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