StelGLUtilityFunctions.cpp   StelGLUtilityFunctions.cpp 
skipping to change at line 21 skipping to change at line 21
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include <QDebug> #include <QDebug>
#include <QDir>
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelGLUtilityFunctions.hpp" #include "StelGLUtilityFunctions.hpp"
//! Utility function that returns a filename with changed file extension. //! Utility function that returns a filename with changed file extension.
static QString withFileExtension(const QString& filename, const QString& ne wExt) static QString withFileExtension(const QString& filename, const QString& ne wExt)
{ {
const int lastSep = filename.lastIndexOf('/'); const int lastSep = filename.lastIndexOf('/');
const int extStart = filename.lastIndexOf('.') + 1; const int extStart = filename.lastIndexOf('.') + 1;
// If there's no dot in the filename, just append the extension. // If there's no dot in the filename, just append the extension.
skipping to change at line 78 skipping to change at line 79
const QString pvr1 = withFileExtension(filename, "pvr"); const QString pvr1 = withFileExtension(filename, "pvr");
const QString pvr2 = withFileExtension("textures/" + filenam e, "pvr"); const QString pvr2 = withFileExtension("textures/" + filenam e, "pvr");
if(findTextureFile(pvr1, result, errorMessage)) {return resu lt;} if(findTextureFile(pvr1, result, errorMessage)) {return resu lt;}
if(findTextureFile(pvr2, result, errorMessage)) {return resu lt;} if(findTextureFile(pvr2, result, errorMessage)) {return resu lt;}
} }
if(findTextureFile(filename, result, errorMessage)) {return result;} if(findTextureFile(filename, result, errorMessage)) {return result;}
if(findTextureFile("textures/" + filename, result, errorMessage)) {r eturn result;} if(findTextureFile("textures/" + filename, result, errorMessage)) {r eturn result;}
qWarning() << "WARNING : Couldn't find texture file " qWarning() << "WARNING : Couldn't find texture file "
<< filename << ": " << result; << QDir::toNativeSeparators(filename) << ": " << result;
return QString(); return QString();
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/