StelTextureBackend.hpp   StelTextureBackend.hpp 
skipping to change at line 27 skipping to change at line 27
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELTEXTUREBACKEND_HPP_ #ifndef _STELTEXTUREBACKEND_HPP_
#define _STELTEXTUREBACKEND_HPP_ #define _STELTEXTUREBACKEND_HPP_
#include <QDebug> #include <QDebug>
#include <QObject> #include <QObject>
#include <QSize> #include <QSize>
#include <QString> #include <QString>
#include <QDir>
//! Possible states of a texture. //! Possible states of a texture.
enum TextureStatus enum TextureStatus
{ {
//! Texture is not loaded yet. //! Texture is not loaded yet.
//! //!
//! Only lazily loaded textures are returned with this state. If bou nd, //! Only lazily loaded textures are returned with this state. If bou nd,
//! the texture starts loading (meanwhile, a placeholder texture wil l be used) //! the texture starts loading (meanwhile, a placeholder texture wil l be used)
//! //!
//! This state can only change into Loading. //! This state can only change into Loading.
skipping to change at line 203 skipping to change at line 204
//! Must be called when an error occurs during loading. //! Must be called when an error occurs during loading.
//! //!
//! Texture loading is the only stage when an error may occur //! Texture loading is the only stage when an error may occur
//! (i.e. the texture can't just become invalid at any time). //! (i.e. the texture can't just become invalid at any time).
//! Asserts that status is loading, changes it to error, and specifi es error message. //! Asserts that status is loading, changes it to error, and specifi es error message.
void errorOccured(const QString& error) void errorOccured(const QString& error)
{ {
invariant(); invariant();
if(status != TextureStatus_Loading) if(status != TextureStatus_Loading)
{ {
qWarning() << "Unexpected error - texture " << path; qWarning() << "Unexpected error - texture " << QDir: :toNativeSeparators(path);
qWarning() << "Texture status: " << textureStatusNam e(status); qWarning() << "Texture status: " << textureStatusNam e(status);
Q_ASSERT_X(false, Q_FUNC_INFO, Q_ASSERT_X(false, Q_FUNC_INFO,
"The only time an error can occur with a texture is during loading"); "The only time an error can occur with a texture is during loading");
} }
qWarning() << "Error occured during loading of texture " << path << qWarning() << "Error occured during loading of texture " << QDir::toNativeSeparators(path) <<
": " << error; ": " << error;
errorMessage = error; errorMessage = error;
status = TextureStatus_Error; status = TextureStatus_Error;
invariant(); invariant();
} }
private: private:
//! Stores the error message if status is TextureStatus_Error. //! Stores the error message if status is TextureStatus_Error.
QString errorMessage; QString errorMessage;
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 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/